From 6106d45731eab381735998a09761ebd7ed46a0ec Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Thu, 12 Oct 2017 02:23:29 -0400 Subject: MqTab: Drop mq_web_view_get_web_view() & a struct member The body and web_view struct members are now pointers to the same address, just with different types. body isn't used anywhere outside this instance initialization function, so it doesn't need to be saved in the struct. --- diff --git a/src/tab.c b/src/tab.c index 8a8ed86..7d1d9a7 100644 --- a/src/tab.c +++ b/src/tab.c @@ -437,8 +437,7 @@ init_non_root(const gchar *uri, MqTab *source) mq_tab_populate_tab(tab); tab->chrome = mq_tab_chrome_new(tab, uri); - tab->body = mq_web_view_new(tab, uri); - tab->web_view = mq_web_view_get_web_view(tab->body); + tab->web_view = WEBKIT_WEB_VIEW(mq_web_view_new(tab, uri)); g_signal_connect(tab->web_view, "notify::favicon", G_CALLBACK(favicon_cb), tab); g_signal_connect(tab->web_view, "notify::title", @@ -449,7 +448,7 @@ init_non_root(const gchar *uri, MqTab *source) gtk_box_pack_start(GTK_BOX(tab->container), mq_tab_chrome_get_container(tab->chrome), FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(tab->container), - GTK_WIDGET(tab->body), TRUE, TRUE, 0); + GTK_WIDGET(tab->web_view), TRUE, TRUE, 0); return tab; } diff --git a/src/tab.h b/src/tab.h index b512dae..adc674e 100644 --- a/src/tab.h +++ b/src/tab.h @@ -44,7 +44,6 @@ struct MqTab { MqWindow *window; GtkWidget *container; MqTabChrome *chrome; - MqWebView *body; GtkWidget *tab; GtkWidget *tab_image; GtkWidget *tab_label; -- cgit v0.9.1