summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-25 21:20:38 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-25 21:20:38 (EDT)
commitd1920eadf30437f3e122415a520e0186085a9b80 (patch)
tree53bf70210bc6661601d9137228930a6d922c3834 /src
parent4e651fbca7f8859a0ae2249ea0d364dea8bb1c5f (diff)
downloadmarquee-d1920eadf30437f3e122415a520e0186085a9b80.zip
marquee-d1920eadf30437f3e122415a520e0186085a9b80.tar.gz
marquee-d1920eadf30437f3e122415a520e0186085a9b80.tar.bz2
mq_tab_body_new(): Accept and save MqTab
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);