diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2003-06-14 07:13:57 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2003-06-14 07:13:57 +0800 |
commit | f7f4b30f8e6d8f2a74114d3b8689ea921e0e4a86 (patch) | |
tree | 59d82205cf28609adc4d9e15982a132849ba29a9 /src/ephy-tab.c | |
parent | ba1b334527bccd32be59964d3f18d6883f4bee39 (diff) | |
download | gsoc2013-epiphany-f7f4b30f8e6d8f2a74114d3b8689ea921e0e4a86.tar gsoc2013-epiphany-f7f4b30f8e6d8f2a74114d3b8689ea921e0e4a86.tar.gz gsoc2013-epiphany-f7f4b30f8e6d8f2a74114d3b8689ea921e0e4a86.tar.bz2 gsoc2013-epiphany-f7f4b30f8e6d8f2a74114d3b8689ea921e0e4a86.tar.lz gsoc2013-epiphany-f7f4b30f8e6d8f2a74114d3b8689ea921e0e4a86.tar.xz gsoc2013-epiphany-f7f4b30f8e6d8f2a74114d3b8689ea921e0e4a86.tar.zst gsoc2013-epiphany-f7f4b30f8e6d8f2a74114d3b8689ea921e0e4a86.zip |
Make visibility a tab GObject property.
2003-06-14 Christian Persch <chpe@cvs.gnome.org>
* src/ephy-tab.c: (ephy_tab_get_property), (ephy_tab_set_property),
(ephy_tab_class_init), (ephy_tab_get_visibility),
(ephy_tab_visibility_cb):
Make visibility a tab GObject property.
* src/ephy-window.h:
* src/ephy-window.c: (sync_tab_visibility), (update_window_visibility),
(tab_added_cb), (tab_removed_cb):
Sync on tab visibility changes.
Diffstat (limited to 'src/ephy-tab.c')
-rw-r--r-- | src/ephy-tab.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/ephy-tab.c b/src/ephy-tab.c index 5bb0a5e25..72069955f 100644 --- a/src/ephy-tab.c +++ b/src/ephy-tab.c @@ -85,6 +85,7 @@ enum PROP_NAVIGATION, PROP_SECURITY, PROP_TITLE, + PROP_VISIBLE, PROP_WINDOW, PROP_ZOOM }; @@ -164,6 +165,7 @@ ephy_tab_set_property (GObject *object, case PROP_NAVIGATION: case PROP_SECURITY: case PROP_TITLE: + case PROP_VISIBLE: case PROP_ZOOM: /* read only */ break; @@ -204,6 +206,9 @@ ephy_tab_get_property (GObject *object, case PROP_TITLE: g_value_set_string (value, tab->priv->title); break; + case PROP_VISIBLE: + g_value_set_boolean (value, tab->priv->visibility); + break; case PROP_WINDOW: g_value_set_object (value, tab->priv->window); break; @@ -305,6 +310,14 @@ ephy_tab_class_init (EphyTabClass *class) G_PARAM_READABLE)); g_object_class_install_property (object_class, + PROP_LOAD_STATUS, + g_param_spec_boolean ("visible", + "Visibility", + "The tab's visibility", + TRUE, + G_PARAM_READABLE)); + + g_object_class_install_property (object_class, PROP_WINDOW, g_param_spec_object ("window", "Window", @@ -486,9 +499,10 @@ ephy_tab_set_visibility (EphyTab *tab, gboolean visible) { g_return_if_fail (IS_EPHY_TAB (tab)); - g_return_if_fail (tab->priv->window != NULL); tab->priv->visibility = visible; + + g_object_notify (G_OBJECT (tab), "visible"); } static void @@ -796,10 +810,6 @@ ephy_tab_visibility_cb (EphyEmbed *embed, gboolean visibility, } ephy_tab_set_visibility (tab, visibility); - - g_return_if_fail (tab->priv->window != NULL); - - ephy_window_update_control (tab->priv->window, WindowVisibilityControl); } static void |