aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyril Brulebois <cyrilbois@src.gnome.org>2007-11-12 06:37:37 +0800
committerCyril Brulebois <cyrilbois@src.gnome.org>2007-11-12 06:37:37 +0800
commitec328b5c31da2accae0a52e47a259fb15c07ad8c (patch)
treef462b1f759ebbef6e95c86edaa2b09361025d46f
parente36d7612882a26dfafbf4aafb0a74a73af116a50 (diff)
downloadgsoc2013-epiphany-ec328b5c31da2accae0a52e47a259fb15c07ad8c.tar
gsoc2013-epiphany-ec328b5c31da2accae0a52e47a259fb15c07ad8c.tar.gz
gsoc2013-epiphany-ec328b5c31da2accae0a52e47a259fb15c07ad8c.tar.bz2
gsoc2013-epiphany-ec328b5c31da2accae0a52e47a259fb15c07ad8c.tar.lz
gsoc2013-epiphany-ec328b5c31da2accae0a52e47a259fb15c07ad8c.tar.xz
gsoc2013-epiphany-ec328b5c31da2accae0a52e47a259fb15c07ad8c.tar.zst
gsoc2013-epiphany-ec328b5c31da2accae0a52e47a259fb15c07ad8c.zip
Hide Back/Forward buttons when disable_history lockdown key is enabled. Make
the call to gtk_widget_show() in editable toolbar's create_item_from_action() conditional. Fixes bug #394795. svn path=/trunk/; revision=7663
-rw-r--r--lib/egg/egg-editable-toolbar.c6
-rw-r--r--src/ephy-lockdown.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/egg/egg-editable-toolbar.c b/lib/egg/egg-editable-toolbar.c
index d65b7eb97..2a6780f54 100644
--- a/lib/egg/egg-editable-toolbar.c
+++ b/lib/egg/egg-editable-toolbar.c
@@ -579,12 +579,14 @@ create_item_from_action (EggEditableToolbar *etoolbar,
const char *name)
{
GtkToolItem *item;
+ gboolean visible;
g_return_val_if_fail (name != NULL, NULL);
if (strcmp (name, "_separator") == 0)
{
item = gtk_separator_tool_item_new ();
+ visible = TRUE;
}
else
{
@@ -601,9 +603,11 @@ create_item_from_action (EggEditableToolbar *etoolbar,
g_signal_connect_object (action, "notify::sensitive",
G_CALLBACK (action_sensitive_cb), item, 0);
+ visible = gtk_action_get_visible (action);
}
- gtk_widget_show (GTK_WIDGET (item));
+ if (visible)
+ gtk_widget_show (GTK_WIDGET (item));
g_object_set_data_full (G_OBJECT (item), EGG_ITEM_NAME,
g_strdup (name), g_free);
diff --git a/src/ephy-lockdown.c b/src/ephy-lockdown.c
index 5e447f770..526caa5c7 100644
--- a/src/ephy-lockdown.c
+++ b/src/ephy-lockdown.c
@@ -166,9 +166,11 @@ update_window (EphyWindow *window,
action = gtk_action_group_get_action (action_group, "GoHistory");
ephy_action_change_sensitivity_flags (action, LOCKDOWN_FLAG, disabled);
action = gtk_action_group_get_action (special_toolbar_action_group, "NavigationBack");
+ gtk_action_set_visible (action, !disabled);
ephy_action_change_sensitivity_flags (action, LOCKDOWN_FLAG, disabled);
action = gtk_action_group_get_action (special_toolbar_action_group, "NavigationForward");
ephy_action_change_sensitivity_flags (action, LOCKDOWN_FLAG, disabled);
+ gtk_action_set_visible (action, !disabled);
disabled = eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_BOOKMARK_EDITING);
action = gtk_action_group_get_action (action_group, "GoBookmarks");