aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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");