Expose browser notebook and panel as properties

This commit is contained in:
Christian Dywan 2008-11-18 02:02:59 +01:00
parent 5a1b766a43
commit 33804965a1

View file

@ -88,6 +88,8 @@ enum
PROP_MENUBAR, PROP_MENUBAR,
PROP_NAVIGATIONBAR, PROP_NAVIGATIONBAR,
PROP_NOTEBOOK,
PROP_PANEL,
PROP_URI, PROP_URI,
PROP_TAB, PROP_TAB,
PROP_STATUSBAR, PROP_STATUSBAR,
@ -1086,6 +1088,24 @@ midori_browser_class_init (MidoriBrowserClass* class)
GTK_TYPE_TOOLBAR, GTK_TYPE_TOOLBAR,
G_PARAM_READABLE)); G_PARAM_READABLE));
g_object_class_install_property (gobject_class,
PROP_NOTEBOOK,
g_param_spec_object (
"notebook",
"Notebook",
"The notebook containing the views",
GTK_TYPE_NOTEBOOK,
G_PARAM_READABLE));
g_object_class_install_property (gobject_class,
PROP_PANEL,
g_param_spec_object (
"panel",
"Panel",
"The side panel embedded in the browser",
MIDORI_TYPE_PANEL,
G_PARAM_READABLE));
g_object_class_install_property (gobject_class, g_object_class_install_property (gobject_class,
PROP_URI, PROP_URI,
g_param_spec_string ( g_param_spec_string (
@ -4567,6 +4587,12 @@ midori_browser_get_property (GObject* object,
case PROP_NAVIGATIONBAR: case PROP_NAVIGATIONBAR:
g_value_set_object (value, browser->navigationbar); g_value_set_object (value, browser->navigationbar);
break; break;
case PROP_NOTEBOOK:
g_value_set_object (value, browser->notebook);
break;
case PROP_PANEL:
g_value_set_object (value, browser->panel);
break;
case PROP_URI: case PROP_URI:
g_value_set_string (value, midori_browser_get_current_uri (browser)); g_value_set_string (value, midori_browser_get_current_uri (browser));
break; break;