diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-09-27 01:27:39 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-09-27 01:27:39 (EDT) |
commit | dfa5fc5f9dafb5f6c56e543da21d000a7498cfaf (patch) | |
tree | 65138a486a61181bc6a72113b9e0afc452ad927b /src | |
parent | ee9c711a94eabd665c65f44a3e80c78cf3d4d5e4 (diff) | |
download | marquee-dfa5fc5f9dafb5f6c56e543da21d000a7498cfaf.zip marquee-dfa5fc5f9dafb5f6c56e543da21d000a7498cfaf.tar.gz marquee-dfa5fc5f9dafb5f6c56e543da21d000a7498cfaf.tar.bz2 |
MqTabBody: Implement "Open ... in New Window" actions
Diffstat (limited to 'src')
-rw-r--r-- | src/tab-body.c | 24 |
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 \ |