summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-18 00:49:31 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-18 00:54:02 (EDT)
commit9c0e2f81061be7366c293d2d7b3e536ae9cc4020 (patch)
tree2d173a839ab1aa0ced6176b4e08e8df2798d5776 /src
parent748f2e2c0f3b5df9c9c55b322723c863b253a5a4 (diff)
downloadmarquee-9c0e2f81061be7366c293d2d7b3e536ae9cc4020.zip
marquee-9c0e2f81061be7366c293d2d7b3e536ae9cc4020.tar.gz
marquee-9c0e2f81061be7366c293d2d7b3e536ae9cc4020.tar.bz2
MqNavigationToolbar: Use MqTabPage
Diffstat (limited to 'src')
-rw-r--r--src/toolbars/navigation-toolbar.c30
-rw-r--r--src/toolbars/navigation-toolbar.h2
2 files changed, 17 insertions, 15 deletions
diff --git a/src/toolbars/navigation-toolbar.c b/src/toolbars/navigation-toolbar.c
index d6e3131..7fd2d7b 100644
--- a/src/toolbars/navigation-toolbar.c
+++ b/src/toolbars/navigation-toolbar.c
@@ -26,7 +26,7 @@
#include <webkit2/webkit2.h>
#include "../config.h"
-#include "../tab.h"
+#include "../tab-page.h"
#include "../web-view.h"
#include "find-toolbar.h"
#include "navigation/back-forward-button-box.h"
@@ -38,7 +38,7 @@
struct _MqNavigationToolbar {
GtkToolbar parent_instance;
MqConfig *config;
- MqTab *tab;
+ MqTabPage *tab_page;
MqFindToolbar *find_toolbar;
MqWebView *web_view;
gchar *uri;
@@ -46,7 +46,7 @@ struct _MqNavigationToolbar {
enum {
PROP_CONFIG = 1,
- PROP_TAB,
+ PROP_TAB_PAGE,
PROP_FIND_TOOLBAR,
PROP_WEB_VIEW,
PROP_URI,
@@ -95,7 +95,7 @@ constructed(GObject *object)
navigation_toolbar->web_view);
/* Menu button */
- menu_button = mq_main_menu_new(navigation_toolbar->tab,
+ menu_button = mq_main_menu_new(navigation_toolbar->tab_page,
navigation_toolbar->find_toolbar, navigation_toolbar->web_view);
/* Navigation toolbar */
@@ -134,8 +134,8 @@ get_property(GObject *object, guint property_id, GValue *value,
case PROP_CONFIG:
g_value_set_pointer(value, navigation_toolbar->config);
break;
- case PROP_TAB:
- g_value_set_pointer(value, navigation_toolbar->tab);
+ case PROP_TAB_PAGE:
+ g_value_set_object(value, navigation_toolbar->tab_page);
break;
case PROP_FIND_TOOLBAR:
g_value_set_object(value,
@@ -166,8 +166,9 @@ set_property(GObject *object, guint property_id, const GValue *value,
case PROP_CONFIG:
navigation_toolbar->config = g_value_get_pointer(value);
break;
- case PROP_TAB:
- navigation_toolbar->tab = g_value_get_pointer(value);
+ case PROP_TAB_PAGE:
+ navigation_toolbar->tab_page =
+ g_value_get_object(value);
break;
case PROP_FIND_TOOLBAR:
navigation_toolbar->find_toolbar =
@@ -204,10 +205,11 @@ mq_navigation_toolbar_class_init(MqNavigationToolbarClass *klass)
"The application's MqConfig instance",
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
- obj_properties[PROP_TAB] = g_param_spec_pointer(
- "tab",
- "MqTab",
- "The ancestral MqTab instance",
+ obj_properties[PROP_TAB_PAGE] = g_param_spec_object(
+ "tab-page",
+ "MqTabPage",
+ "The ancestral MqTabPage instance",
+ MQ_TYPE_TAB_PAGE,
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
obj_properties[PROP_FIND_TOOLBAR] = g_param_spec_object(
@@ -242,12 +244,12 @@ mq_navigation_toolbar_init(
}
GtkWidget *
-mq_navigation_toolbar_new(MqConfig *config, MqTab *tab,
+mq_navigation_toolbar_new(MqConfig *config, MqTabPage *tab_page,
MqFindToolbar *find_toolbar, MqWebView *web_view, const gchar *uri)
{
return g_object_new(MQ_TYPE_NAVIGATION_TOOLBAR,
"config", config,
- "tab", tab,
+ "tab-page", tab_page,
"find-toolbar", find_toolbar,
"web-view", web_view,
"uri", uri,
diff --git a/src/toolbars/navigation-toolbar.h b/src/toolbars/navigation-toolbar.h
index efaf2f6..99e9666 100644
--- a/src/toolbars/navigation-toolbar.h
+++ b/src/toolbars/navigation-toolbar.h
@@ -54,7 +54,7 @@ GType
mq_navigation_toolbar_get_type(void);
GtkWidget *
-mq_navigation_toolbar_new(MqConfig *config, MqTab *tab,
+mq_navigation_toolbar_new(MqConfig *config, MqTabPage *tab_page,
MqFindToolbar *find_toolbar, MqWebView *web_view, const gchar *uri);
G_END_DECLS