diff options
author | Peter Harvey <peter.a.harvey@gmail.com> | 2006-02-24 20:44:04 +0800 |
---|---|---|
committer | Peter Anthony Harvey <paharvey@src.gnome.org> | 2006-02-24 20:44:04 +0800 |
commit | 911c3d33e3f1c699ca9d7ed46a2ec2352a6aa1e5 (patch) | |
tree | c708ae5daaa21075f11aaad916f807246f9286c4 /lib | |
parent | ff0cbed74448d4dc4def4ac856526fb23ffc089e (diff) | |
download | gsoc2013-epiphany-911c3d33e3f1c699ca9d7ed46a2ec2352a6aa1e5.tar gsoc2013-epiphany-911c3d33e3f1c699ca9d7ed46a2ec2352a6aa1e5.tar.gz gsoc2013-epiphany-911c3d33e3f1c699ca9d7ed46a2ec2352a6aa1e5.tar.bz2 gsoc2013-epiphany-911c3d33e3f1c699ca9d7ed46a2ec2352a6aa1e5.tar.lz gsoc2013-epiphany-911c3d33e3f1c699ca9d7ed46a2ec2352a6aa1e5.tar.xz gsoc2013-epiphany-911c3d33e3f1c699ca9d7ed46a2ec2352a6aa1e5.tar.zst gsoc2013-epiphany-911c3d33e3f1c699ca9d7ed46a2ec2352a6aa1e5.zip |
lib/egg/egg-editable-toolbar.c
2006-02-24 Peter Harvey <peter.a.harvey@gmail.com>
* lib/egg/egg-editable-toolbar.c
Made the "Show" menu items insensitive when the entire toolbar
is hidden.
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/egg/egg-editable-toolbar.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/egg/egg-editable-toolbar.c b/lib/egg/egg-editable-toolbar.c index 69b3ef03e..d56a9047a 100755 --- a/lib/egg/egg-editable-toolbar.c +++ b/lib/egg/egg-editable-toolbar.c @@ -817,6 +817,7 @@ toolbar_visibility_refresh (EggEditableToolbar *etoolbar) GtkToggleAction *action; GList *list; GString *string; + gboolean showing; char action_name[40]; char *action_label; char *tmp; @@ -839,6 +840,8 @@ toolbar_visibility_refresh (EggEditableToolbar *etoolbar) priv->visibility_id = gtk_ui_manager_new_merge_id (priv->manager); + showing = GTK_WIDGET_VISIBLE (etoolbar); + n_toolbars = egg_toolbars_model_n_toolbars (priv->model); for (i = 0; i < n_toolbars; i++) { @@ -918,6 +921,7 @@ toolbar_visibility_refresh (EggEditableToolbar *etoolbar) gtk_action_set_visible (GTK_ACTION (action), (egg_toolbars_model_get_flags (priv->model, i) & EGG_TB_MODEL_NOT_REMOVABLE) == 0); + gtk_action_set_sensitive (GTK_ACTION (action), showing); gtk_toggle_action_set_active (action, GTK_WIDGET_VISIBLE (get_dock_nth (etoolbar, i))); @@ -1306,6 +1310,9 @@ egg_editable_toolbar_init (EggEditableToolbar *etoolbar) priv = etoolbar->priv = EGG_EDITABLE_TOOLBAR_GET_PRIVATE (etoolbar); priv->save_hidden = TRUE; + + g_signal_connect (etoolbar, "notify::visible", + G_CALLBACK (toolbar_visibility_refresh), NULL); } static void |