summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-27 01:11:47 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-27 01:11:47 (EDT)
commitd2d1f042be847f304bb41c9aea8fe02349c7ffce (patch)
tree5a3bb6b207b57831cbb8ff9054f13bbf775d4ed3 /src
parentcbf28f6fa88d349a6fa5485c7fbae7eeab292aac (diff)
downloadmarquee-d2d1f042be847f304bb41c9aea8fe02349c7ffce.zip
marquee-d2d1f042be847f304bb41c9aea8fe02349c7ffce.tar.gz
marquee-d2d1f042be847f304bb41c9aea8fe02349c7ffce.tar.bz2
MqTabBody: Implement "Open ... in New Tab" action callbacks
Diffstat (limited to 'src')
-rw-r--r--src/tab-body.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/tab-body.c b/src/tab-body.c
index b98b65f..77573aa 100644
--- a/src/tab-body.c
+++ b/src/tab-body.c
@@ -42,7 +42,9 @@ static void
menu_open_link_tab_activate_cb(GtkAction __attribute__((unused)) *action,
MqTabBody *body)
{
- g_print("Open Link in New Tab\n");
+ mq_tab_new_relative(
+ webkit_hit_test_result_get_link_uri(body->hit_test_result),
+ body->tab);
}
static void
@@ -64,7 +66,9 @@ static void
menu_open_image_tab_activate_cb(GtkAction __attribute__((unused)) *action,
MqTabBody *body)
{
- g_print("Open Image in New Tab\n");
+ mq_tab_new_relative(
+ webkit_hit_test_result_get_image_uri(body->hit_test_result),
+ body->tab);
}
static void
@@ -86,7 +90,9 @@ static void
menu_open_video_tab_activate_cb(GtkAction __attribute__((unused)) *action,
MqTabBody *body)
{
- g_print("Open Video in New Tab\n");
+ mq_tab_new_relative(
+ webkit_hit_test_result_get_media_uri(body->hit_test_result),
+ body->tab);
}
static void
@@ -108,7 +114,9 @@ static void
menu_open_audio_tab_activate_cb(GtkAction __attribute__((unused)) *action,
MqTabBody *body)
{
- g_print("Open Audio in New Tab\n");
+ mq_tab_new_relative(
+ webkit_hit_test_result_get_media_uri(body->hit_test_result),
+ body->tab);
}
static void