summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tab-body.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/tab-body.c b/src/tab-body.c
index 3e196e1..58f3eea 100644
--- a/src/tab-body.c
+++ b/src/tab-body.c
@@ -51,7 +51,11 @@ static void
menu_open_link_win_activate_cb(GtkAction __attribute__((unused)) *action,
MqTabBody *body)
{
- g_print("Open Link in New Window\n");
+ gchar *uris[2] = {
+ webkit_hit_test_result_get_link_uri(body->hit_test_result),
+ NULL
+ };
+ mq_application_add_window(body->tab->application, &uris);
}
static void
@@ -75,7 +79,11 @@ static void
menu_open_image_win_activate_cb(GtkAction __attribute__((unused)) *action,
MqTabBody *body)
{
- g_print("Open Image in New Window\n");
+ gchar *uris[2] = {
+ webkit_hit_test_result_get_image_uri(body->hit_test_result),
+ NULL
+ };
+ mq_application_add_window(body->tab->application, &uris);
}
static void
@@ -99,7 +107,11 @@ static void
menu_open_video_win_activate_cb(GtkAction __attribute__((unused)) *action,
MqTabBody *body)
{
- g_print("Open Video in New Window\n");
+ gchar *uris[2] = {
+ webkit_hit_test_result_get_media_uri(body->hit_test_result),
+ NULL
+ };
+ mq_application_add_window(body->tab->application, &uris);
}
static void
@@ -123,7 +135,11 @@ static void
menu_open_audio_win_activate_cb(GtkAction __attribute__((unused)) *action,
MqTabBody *body)
{
- g_print("Open Audio in New Window\n");
+ gchar *uris[2] = {
+ webkit_hit_test_result_get_media_uri(body->hit_test_result),
+ NULL
+ };
+ mq_application_add_window(body->tab->application, &uris);
}
#define ITEM_DECLS \