summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tab-body.c4
-rw-r--r--src/tab-body.h5
-rw-r--r--src/tab.c2
3 files changed, 8 insertions, 3 deletions
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 <webkit2/webkit2.h>
#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 <gtk/gtk.h>
#include <webkit2/webkit2.h>
+#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);