From d1920eadf30437f3e122415a520e0186085a9b80 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Mon, 25 Sep 2017 21:20:38 -0400 Subject: mq_tab_body_new(): Accept and save MqTab --- (limited to 'src') diff --git a/src/tab-body.c b/src/tab-body.c index 808a10b..1407b01 100644 --- a/src/tab-body.c +++ b/src/tab-body.c @@ -25,13 +25,15 @@ #include #include "tab-body.h" +#include "tab.h" MqTabBody * -mq_tab_body_new(gchar *uri) +mq_tab_body_new(MqTab *tab, gchar *uri) { MqTabBody *body; body = malloc(sizeof(*body)); + body->tab = tab; body->web_view = WEBKIT_WEB_VIEW(webkit_web_view_new()); if (uri) { diff --git a/src/tab-body.h b/src/tab-body.h index e38f97c..332cfeb 100644 --- a/src/tab-body.h +++ b/src/tab-body.h @@ -27,13 +27,16 @@ typedef struct MqTabBody MqTabBody; #include #include +#include "tab.h" + struct MqTabBody { + MqTab *tab; GtkWidget *container; WebKitWebView *web_view; }; MqTabBody * -mq_tab_body_new(gchar *uri); +mq_tab_body_new(MqTab *tab, gchar *uri); GtkWidget * mq_tab_body_get_container(MqTabBody *body); diff --git a/src/tab.c b/src/tab.c index e3d9f71..30d975b 100644 --- a/src/tab.c +++ b/src/tab.c @@ -313,7 +313,7 @@ init_non_root(MqWindow *window, gchar *uri) mq_tab_populate_tab(tab); tab->chrome = mq_tab_chrome_new(uri); - tab->body = mq_tab_body_new(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", G_CALLBACK(favicon_cb), tab); -- cgit v0.9.1