From 9f48ae41d3b19a8777bbbfd6f8a57fcdadf3b1a5 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Thu, 21 Sep 2017 19:46:31 -0400 Subject: MqTab: Save WebKitWebView instance in struct --- (limited to 'src') diff --git a/src/tab.c b/src/tab.c index f5851ca..1f92183 100644 --- a/src/tab.c +++ b/src/tab.c @@ -35,8 +35,8 @@ mq_tab_new(gchar *uri, GtkWidget *tab_image, GtkWidget *tab_label) tab = malloc(sizeof(*tab)); tab->chrome = mq_tab_chrome_new(uri, tab_image, tab_label); tab->body = mq_tab_body_new(uri); - mq_tab_chrome_set_web_view(tab->chrome, - mq_tab_body_get_web_view(tab->body)); + tab->web_view = mq_tab_body_get_web_view(tab->body); + mq_tab_chrome_set_web_view(tab->chrome, tab->web_view); tab->container = gtk_grid_new(); gtk_grid_attach(GTK_GRID(tab->container), diff --git a/src/tab.h b/src/tab.h index d8fbcc9..14652fb 100644 --- a/src/tab.h +++ b/src/tab.h @@ -28,9 +28,10 @@ #include "tab-body.h" typedef struct { - GtkWidget *container; - MqTabChrome *chrome; - MqTabBody *body; + GtkWidget *container; + MqTabChrome *chrome; + MqTabBody *body; + WebKitWebView *web_view; } MqTab; MqTab * -- cgit v0.9.1