diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/tab-chrome.c | 10 | ||||
-rw-r--r-- | src/tab-chrome.h | 6 | ||||
-rw-r--r-- | src/tab.c | 3 |
3 files changed, 10 insertions, 9 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c index 40f7ed2..6b3e2ad 100644 --- a/src/tab-chrome.c +++ b/src/tab-chrome.c @@ -344,7 +344,7 @@ zoom_in_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqTabChrome *chrome) static void find_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqTabChrome *chrome) { - mq_find_toolbar_reveal(MQ_FIND_TOOLBAR(chrome->find_toolbar)); + mq_find_toolbar_reveal(chrome->find_toolbar); gtk_widget_hide(chrome->menu_popover); } @@ -752,23 +752,21 @@ navigation_toolbar_new(MqTabChrome *chrome, const gchar *uri) } MqTabChrome * -mq_tab_chrome_new(MqTab *tab, MqWebView *web_view, const gchar *uri) +mq_tab_chrome_new(MqTab *tab, MqFindToolbar *find_toolbar, MqWebView *web_view, + const gchar *uri) { MqTabChrome *chrome; chrome = malloc(sizeof(*chrome)); chrome->config = mq_application_get_config(mq_tab_get_application(tab)); chrome->tab = tab; + chrome->find_toolbar = find_toolbar; chrome->web_view = web_view; 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); - chrome->find_toolbar = mq_find_toolbar_new(web_view); - gtk_box_pack_start(GTK_BOX(chrome->container), chrome->find_toolbar, - FALSE, FALSE, 0); - return chrome; } diff --git a/src/tab-chrome.h b/src/tab-chrome.h index 25ac888..3333453 100644 --- a/src/tab-chrome.h +++ b/src/tab-chrome.h @@ -28,6 +28,7 @@ typedef struct MqTabChrome MqTabChrome; #include <webkit2/webkit2.h> #include "tab.h" +#include "find-toolbar.h" #include "web-view.h" struct MqTabChrome { @@ -42,8 +43,8 @@ struct MqTabChrome { GtkToolItem *stop_reload_button; GtkWidget *uri_entry; PangoAttrList *hovered_link_style; + MqFindToolbar *find_toolbar; MqWebView *web_view; - GtkWidget *find_toolbar; gboolean load_failed; gint back_items; GtkToolItem *menu_button; @@ -53,7 +54,8 @@ struct MqTabChrome { }; MqTabChrome * -mq_tab_chrome_new(MqTab *tab, MqWebView *web_view, const gchar *uri); +mq_tab_chrome_new(MqTab *tab, MqFindToolbar *find_toolbar, MqWebView *web_view, + const gchar *uri); GtkWidget * mq_tab_chrome_get_container(MqTabChrome *chrome); @@ -446,7 +446,8 @@ init_non_root(const gchar *uri, MqTab *source) find_toolbar = mq_find_toolbar_new(MQ_WEB_VIEW(tab->web_view)); - tab->chrome = mq_tab_chrome_new(tab, MQ_WEB_VIEW(tab->web_view), uri); + tab->chrome = mq_tab_chrome_new(tab, MQ_FIND_TOOLBAR(find_toolbar), + MQ_WEB_VIEW(tab->web_view), uri); tab->container = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); gtk_box_pack_start(GTK_BOX(tab->container), |