diff options
author | Cosimo Cecchi <cosimoc@svn.gnome.org> | 2007-09-12 23:30:03 +0800 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@src.gnome.org> | 2007-09-12 23:30:03 +0800 |
commit | 662bc04565b5f871500166b3e86ee3f6fbb2b429 (patch) | |
tree | 7d31044299df9e633850ab791fa0ca5a6f2c30ca /src/ephy-lockdown.c | |
parent | 996340290e12fa08e92787b87f724b0a9d6bccc5 (diff) | |
download | gsoc2013-epiphany-662bc04565b5f871500166b3e86ee3f6fbb2b429.tar.gz gsoc2013-epiphany-662bc04565b5f871500166b3e86ee3f6fbb2b429.tar.zst gsoc2013-epiphany-662bc04565b5f871500166b3e86ee3f6fbb2b429.zip |
Fix disable_toolbar_editing lockdown not respected for Remove and Move
2007-09-12 Cosimo Cecchi <cosimoc@svn.gnome.org>
* src/ephy-lockdown.c: (update_window):
Fix disable_toolbar_editing lockdown not respected for Remove and Move
actions on toolbar buttons. Bug #475641. Patch by Cyril Brulebois.
svn path=/trunk/; revision=7392
Diffstat (limited to 'src/ephy-lockdown.c')
-rw-r--r-- | src/ephy-lockdown.c | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/src/ephy-lockdown.c b/src/ephy-lockdown.c index 8e285d5a1..543108b0e 100644 --- a/src/ephy-lockdown.c +++ b/src/ephy-lockdown.c @@ -123,7 +123,8 @@ update_window (EphyWindow *window, EphyLockdown *lockdown) { GtkUIManager *manager; - GtkActionGroup *action_group, *popups_action_group, *toolbar_action_group; + GtkActionGroup *action_group, *popups_action_group; + GtkActionGroup *toolbar_action_group, *special_toolbar_action_group; GtkAction *action; gboolean disabled, fullscreen, print_setup_disabled, writable; @@ -132,8 +133,12 @@ update_window (EphyWindow *window, manager = GTK_UI_MANAGER (ephy_window_get_ui_manager (window)); action_group = find_action_group (manager, "WindowActions"); popups_action_group = find_action_group (manager, "PopupsActions"); - toolbar_action_group = find_action_group (manager, "SpecialToolbarActions"); - g_return_if_fail (action_group != NULL && popups_action_group != NULL && toolbar_action_group != NULL); + toolbar_action_group = find_action_group (manager, "ToolbarActions"); + special_toolbar_action_group = find_action_group (manager, "SpecialToolbarActions"); + g_return_if_fail (action_group != NULL + && popups_action_group != NULL + && toolbar_action_group != NULL + && special_toolbar_action_group != NULL); disabled = eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_PRINTING); print_setup_disabled = eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_PRINT_SETUP) || @@ -156,17 +161,17 @@ update_window (EphyWindow *window, disabled = eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_ARBITRARY_URL); action = gtk_action_group_get_action (action_group, "GoLocation"); ephy_action_change_sensitivity_flags (action, LOCKDOWN_FLAG, disabled); - action = gtk_action_group_get_action (toolbar_action_group, "Location"); + action = gtk_action_group_get_action (special_toolbar_action_group, "Location"); update_location_editable (window, action, !disabled); - action = gtk_action_group_get_action (toolbar_action_group, "NavigationUp"); + action = gtk_action_group_get_action (special_toolbar_action_group, "NavigationUp"); ephy_action_change_sensitivity_flags (action, LOCKDOWN_FLAG, disabled); disabled = eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_HISTORY); action = gtk_action_group_get_action (action_group, "GoHistory"); ephy_action_change_sensitivity_flags (action, LOCKDOWN_FLAG, disabled); - action = gtk_action_group_get_action (toolbar_action_group, "NavigationBack"); + action = gtk_action_group_get_action (special_toolbar_action_group, "NavigationBack"); ephy_action_change_sensitivity_flags (action, LOCKDOWN_FLAG, disabled); - action = gtk_action_group_get_action (toolbar_action_group, "NavigationForward"); + action = gtk_action_group_get_action (special_toolbar_action_group, "NavigationForward"); ephy_action_change_sensitivity_flags (action, LOCKDOWN_FLAG, disabled); disabled = eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_BOOKMARK_EDITING); @@ -195,9 +200,15 @@ update_window (EphyWindow *window, disabled = eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_TOOLBAR_EDITING); action = gtk_action_group_get_action (action_group, "ViewToolbarEditor"); ephy_action_change_sensitivity_flags (action, LOCKDOWN_FLAG, disabled); + action = gtk_action_group_get_action (toolbar_action_group, "MoveToolItem"); + ephy_action_change_sensitivity_flags (action, LOCKDOWN_FLAG, disabled); + action = gtk_action_group_get_action (toolbar_action_group, "RemoveToolItem"); + ephy_action_change_sensitivity_flags (action, LOCKDOWN_FLAG, disabled); + action = gtk_action_group_get_action (toolbar_action_group, "RemoveToolbar"); + ephy_action_change_sensitivity_flags (action, LOCKDOWN_FLAG, disabled); fullscreen = eel_gconf_get_boolean (CONF_LOCKDOWN_FULLSCREEN); - action = gtk_action_group_get_action (toolbar_action_group, "FileNewWindow"); + action = gtk_action_group_get_action (special_toolbar_action_group, "FileNewWindow"); ephy_action_change_sensitivity_flags (action, LOCKDOWN_FLAG, fullscreen); action = gtk_action_group_get_action (action_group, "ViewFullscreen"); ephy_action_change_sensitivity_flags (action, LOCKDOWN_FLAG, fullscreen); |