summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-23 03:34:53 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-23 03:35:44 (EDT)
commit58745ea1ae404debedca5fbec155a813fd41a253 (patch)
treebb2d6fd402a3aa4a799dfe0e9a41e842175761ca
parent0ef209971e2bcf2d5bcd8d802e58008e243e36ba (diff)
downloadmarquee-58745ea1ae404debedca5fbec155a813fd41a253.zip
marquee-58745ea1ae404debedca5fbec155a813fd41a253.tar.gz
marquee-58745ea1ae404debedca5fbec155a813fd41a253.tar.bz2
MqWebView: Adapt to new tree-less MqTabPage API
-rw-r--r--src/web-view.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/src/web-view.c b/src/web-view.c
index 2f6d765..93e9062 100644
--- a/src/web-view.c
+++ b/src/web-view.c
@@ -69,9 +69,9 @@ static void
menu_open_link_tab_activate_cb(GtkAction G_GNUC_UNUSED *action,
MqWebView *web_view)
{
- mq_tab_page_new_relative(
- webkit_hit_test_result_get_link_uri(web_view->hit_test_result),
- web_view->tab_page);
+ /* TODO: Use MqNotebook function. */
+ mq_tab_page_new(mq_tab_page_get_window(web_view->tab_page),
+ webkit_hit_test_result_get_link_uri(web_view->hit_test_result));
}
static void
@@ -99,9 +99,10 @@ static void
menu_open_image_tab_activate_cb(GtkAction G_GNUC_UNUSED *action,
MqWebView *web_view)
{
- mq_tab_page_new_relative(
- webkit_hit_test_result_get_image_uri(web_view->hit_test_result),
- web_view->tab_page);
+ /* TODO: Use MqNotebook function. */
+ mq_tab_page_new(mq_tab_page_get_window(web_view->tab_page),
+ webkit_hit_test_result_get_image_uri(
+ web_view->hit_test_result));
}
static void
@@ -129,9 +130,10 @@ static void
menu_open_video_tab_activate_cb(GtkAction G_GNUC_UNUSED *action,
MqWebView *web_view)
{
- mq_tab_page_new_relative(
- webkit_hit_test_result_get_media_uri(web_view->hit_test_result),
- web_view->tab_page);
+ /* TODO: Use MqNotebook function. */
+ mq_tab_page_new(mq_tab_page_get_window(web_view->tab_page),
+ webkit_hit_test_result_get_media_uri(
+ web_view->hit_test_result));
}
static void
@@ -159,9 +161,10 @@ static void
menu_open_audio_tab_activate_cb(GtkAction G_GNUC_UNUSED *action,
MqWebView *web_view)
{
- mq_tab_page_new_relative(
- webkit_hit_test_result_get_media_uri(web_view->hit_test_result),
- web_view->tab_page);
+ /* TODO: Use MqNotebook function. */
+ mq_tab_page_new(mq_tab_page_get_window(web_view->tab_page),
+ webkit_hit_test_result_get_media_uri(
+ web_view->hit_test_result));
}
static void
@@ -528,9 +531,9 @@ button_press_cb(GtkWidget *widget, GdkEventButton *event)
hit_test_result = web_view->mouse_target_hit_test_result;
if (webkit_hit_test_result_context_is_link(hit_test_result)) {
- mq_tab_page_new_relative(
- webkit_hit_test_result_get_link_uri(hit_test_result),
- web_view->tab_page);
+ /* TODO: Use MqNotebook function. */
+ mq_tab_page_new(mq_tab_page_get_window(web_view->tab_page),
+ webkit_hit_test_result_get_link_uri(hit_test_result));
} else if (webkit_hit_test_result_context_is_editable(hit_test_result)){
/* Let WebKit handle pasting from the primary clipboard into an
* editable element. */