From a8ec2a404a8fdec019b72b46445fbc119432de15 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Thu, 12 Oct 2017 12:53:00 -0400 Subject: MqTabChrome: Set up find toolbar when Web view is set This makes the find toolbar code a little more self-contained. --- (limited to 'src') diff --git a/src/tab-chrome.c b/src/tab-chrome.c index 92acd63..f4d666c 100644 --- a/src/tab-chrome.c +++ b/src/tab-chrome.c @@ -740,6 +740,8 @@ find_toolbar_new(MqTabChrome *chrome) chrome->find_match_case = FALSE; chrome->find_searching = FALSE; + chrome->find_controller = webkit_web_view_get_find_controller( + WEBKIT_WEB_VIEW(chrome->web_view)); return chrome->find_revealer; } @@ -756,8 +758,6 @@ mq_tab_chrome_new(MqTab *tab, const gchar *uri) chrome->container = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); gtk_box_pack_start(GTK_BOX(chrome->container), navigation_toolbar_new(chrome, uri), FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(chrome->container), - find_toolbar_new(chrome), FALSE, FALSE, 0); return chrome; } @@ -983,7 +983,7 @@ void mq_tab_chrome_set_web_view(MqTabChrome *chrome, MqWebView *web_view) { chrome->web_view = web_view; - chrome->find_controller = webkit_web_view_get_find_controller( - WEBKIT_WEB_VIEW(web_view)); + gtk_box_pack_start(GTK_BOX(chrome->container), + find_toolbar_new(chrome), FALSE, FALSE, 0); connect_web_view(chrome); } -- cgit v0.9.1