From cb4d8dc5e1ed1aeec54e17557216b703a064d303 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 01 Oct 2017 05:33:55 -0400 Subject: mq_tab_chrome_new(): Accept and save MqTab argument --- (limited to 'src') diff --git a/src/tab-chrome.c b/src/tab-chrome.c index e368694..c57ca6a 100644 --- a/src/tab-chrome.c +++ b/src/tab-chrome.c @@ -26,6 +26,7 @@ #include #include "tab-chrome.h" +#include "tab.h" static void back_clicked_cb(GtkButton __attribute__((unused)) *toolbutton, @@ -506,11 +507,12 @@ navigation_toolbar_new(MqTabChrome *chrome, const gchar *uri) } MqTabChrome * -mq_tab_chrome_new(const gchar *uri) +mq_tab_chrome_new(MqTab *tab, const gchar *uri) { MqTabChrome *chrome; chrome = malloc(sizeof(*chrome)); + chrome->tab = tab; chrome->container = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); gtk_box_pack_start(GTK_BOX(chrome->container), diff --git a/src/tab-chrome.h b/src/tab-chrome.h index caa5a66..0fa8640 100644 --- a/src/tab-chrome.h +++ b/src/tab-chrome.h @@ -27,7 +27,10 @@ typedef struct MqTabChrome MqTabChrome; #include #include +#include "tab.h" + struct MqTabChrome { + MqTab *tab; GtkWidget *container; GtkWidget *back_forward_box; GtkWidget *back_button; @@ -46,7 +49,7 @@ struct MqTabChrome { }; MqTabChrome * -mq_tab_chrome_new(const gchar *uri); +mq_tab_chrome_new(MqTab *tab, const gchar *uri); GtkWidget * mq_tab_chrome_get_container(MqTabChrome *chrome); diff --git a/src/tab.c b/src/tab.c index c295976..fce870f 100644 --- a/src/tab.c +++ b/src/tab.c @@ -435,7 +435,7 @@ init_non_root(const gchar *uri) mq_tab_populate_tab(tab); - tab->chrome = mq_tab_chrome_new(uri); + tab->chrome = mq_tab_chrome_new(tab, uri); tab->body = mq_tab_body_new(tab, uri); tab->web_view = mq_tab_body_get_web_view(tab->body); g_signal_connect(tab->web_view, "notify::favicon", -- cgit v0.9.1