From 0ad2ce4e81dce4acb200da2aa761b8dcaa78118d Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 17 Sep 2017 03:13:43 -0400 Subject: src/tab-chrome.[ch]: Save navigation toolbar buttons --- (limited to 'src') diff --git a/src/tab-chrome.c b/src/tab-chrome.c index a66da19..d187e70 100644 --- a/src/tab-chrome.c +++ b/src/tab-chrome.c @@ -35,18 +35,14 @@ navigation_toolbar_new(MqTabChrome *chrome, gchar *uri) navigation_toolbar = GTK_TOOLBAR(gtk_toolbar_new()); /* Back button */ - gtk_toolbar_insert(navigation_toolbar, - gtk_tool_button_new( - gtk_image_new_from_icon_name("go-previous", 16), - "Back"), - -1); + chrome->back_button = gtk_tool_button_new( + gtk_image_new_from_icon_name("go-previous", 16), "Back"); + gtk_toolbar_insert(navigation_toolbar, chrome->back_button, -1); /* Forward button */ - gtk_toolbar_insert(navigation_toolbar, - gtk_tool_button_new( - gtk_image_new_from_icon_name("go-next", 16), - "Forward"), - -1); + chrome->forward_button = gtk_tool_button_new( + gtk_image_new_from_icon_name("go-next", 16), "Forward"); + gtk_toolbar_insert(navigation_toolbar, chrome->forward_button, -1); /* URI bar */ uri_toolitem = gtk_tool_item_new(); @@ -169,6 +165,7 @@ connect_web_view(MqTabChrome *chrome) G_CALLBACK(load_progress_cb), chrome); g_signal_connect(chrome->web_view, "notify::uri", G_CALLBACK(uri_cb), chrome); + /* FIXME: Doesn't work? */ g_signal_connect(chrome->web_view, "notify::favicon", G_CALLBACK(favicon_cb), chrome); g_signal_connect(chrome->web_view, "notify::title", diff --git a/src/tab-chrome.h b/src/tab-chrome.h index 035be40..3d08cad 100644 --- a/src/tab-chrome.h +++ b/src/tab-chrome.h @@ -30,6 +30,8 @@ typedef struct { GtkWidget *tab_label; guint tab_position; GtkWidget *container; + GtkToolItem *back_button; + GtkToolItem *forward_button; GtkWidget *uri_entry; WebKitWebView *web_view; } MqTabChrome; -- cgit v0.9.1