aboutsummaryrefslogtreecommitdiffstats
path: root/src/window-commands.c
diff options
context:
space:
mode:
authorChris Lahey <clahey@ximian.com>2003-11-30 19:38:12 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-11-30 19:38:12 +0800
commit3ee87498b5087ca1e7bd78142ee6c5539673b09f (patch)
tree97a99ba23db0a53c41d19154eb15956b17b9f6f2 /src/window-commands.c
parentf84a5ff4e920c25d089786864f1ae2cdd94586d6 (diff)
downloadgsoc2013-epiphany-3ee87498b5087ca1e7bd78142ee6c5539673b09f.tar
gsoc2013-epiphany-3ee87498b5087ca1e7bd78142ee6c5539673b09f.tar.gz
gsoc2013-epiphany-3ee87498b5087ca1e7bd78142ee6c5539673b09f.tar.bz2
gsoc2013-epiphany-3ee87498b5087ca1e7bd78142ee6c5539673b09f.tar.lz
gsoc2013-epiphany-3ee87498b5087ca1e7bd78142ee6c5539673b09f.tar.xz
gsoc2013-epiphany-3ee87498b5087ca1e7bd78142ee6c5539673b09f.tar.zst
gsoc2013-epiphany-3ee87498b5087ca1e7bd78142ee6c5539673b09f.zip
Marco Pesenti Gritti <marco@gnome.org>
2003-11-30 Chris Lahey <clahey@ximian.com> Marco Pesenti Gritti <marco@gnome.org> * data/Makefile.am: * data/epiphany-lockdown.schemas.in: * src/ephy-main.c: (main): * src/ephy-tab.c: (ephy_tab_new_window_cb), (ephy_tab_size_to_cb): * src/ephy-window.c: (update_chromes_visibility), (update_chrome), (ephy_window_fullscreen), (ephy_window_unfullscreen), (show_embed_popup), (update_layout_toggles), (chrome_notifier), (ephy_window_init), (ephy_window_finalize), (ephy_window_request_chrome), (ephy_window_set_print_preview), (ephy_window_show), (print_dialog_preview_cb): * src/ephy-window.h: * src/ppview-toolbar.c: (ppview_toolbar_set_window), (toolbar_cmd_ppv_close): * src/window-commands.c: (window_cmd_view_bookmarks_bar), (window_cmd_view_toolbar), (window_cmd_view_statusbar): Implement lockdown pref to not allow javascript to modify chromes. Do necessary changes to chromes code to make it possible.
Diffstat (limited to 'src/window-commands.c')
-rw-r--r--src/window-commands.c33
1 files changed, 3 insertions, 30 deletions
diff --git a/src/window-commands.c b/src/window-commands.c
index b86db7377..25ee9bff7 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -556,57 +556,30 @@ void
window_cmd_view_bookmarks_bar (GtkAction *action,
EphyWindow *window)
{
- EmbedChromeMask mask;
gboolean active;
- gboolean current_state;
- mask = ephy_window_get_chrome (window);
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
- current_state = (mask & EMBED_CHROME_BOOKMARKSBARON) > 0;
-
- if (active != current_state)
- {
- mask ^= EMBED_CHROME_BOOKMARKSBARON;
- ephy_window_set_chrome (window, mask);
- }
+ eel_gconf_set_boolean (CONF_WINDOWS_SHOW_BOOKMARKS_BAR, active);
}
void
window_cmd_view_toolbar (GtkAction *action,
EphyWindow *window)
{
- EmbedChromeMask mask;
gboolean active;
- gboolean current_state;
- mask = ephy_window_get_chrome (window);
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
- current_state = (mask & EMBED_CHROME_TOOLBARON) > 0;
-
- if (active != current_state)
- {
- mask ^= EMBED_CHROME_TOOLBARON;
- ephy_window_set_chrome (window, mask);
- }
+ eel_gconf_set_boolean (CONF_WINDOWS_SHOW_TOOLBARS, active);
}
void
window_cmd_view_statusbar (GtkAction *action,
EphyWindow *window)
{
- EmbedChromeMask mask;
gboolean active;
- gboolean current_state;
- mask = ephy_window_get_chrome (window);
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
- current_state = (mask & EMBED_CHROME_STATUSBARON) > 0;
-
- if (active != current_state)
- {
- mask ^= EMBED_CHROME_STATUSBARON;
- ephy_window_set_chrome (window, mask);
- }
+ eel_gconf_set_boolean (CONF_WINDOWS_SHOW_STATUSBAR, active);
}
void