Index: data/epiphany.schemas.in
===================================================================
RCS file: /cvs/gnome/epiphany/data/epiphany.schemas.in,v
retrieving revision 1.48
diff -u -p -r1.48 epiphany.schemas.in
--- data/epiphany.schemas.in	6 Nov 2003 10:36:38 -0000	1.48
+++ data/epiphany.schemas.in	20 Nov 2003 19:22:54 -0000
@@ -190,6 +190,17 @@
         </locale>
       </schema>
       <schema>
+        <key>/schemas/apps/epiphany/general/hide_menubar</key>
+        <applyto>/apps/epiphany/general/hide_menubar</applyto>
+        <owner>epiphany</owner>
+        <type>bool</type>
+        <default>0</default>
+        <locale name="C">
+        <short>Hide menubar by default</short>
+        <long>Hide menubar by default.</long>
+        </locale>
+      </schema>
+      <schema>
         <key>/schemas/apps/epiphany/web/default_encoding</key>
         <applyto>/apps/epiphany/web/default_encoding</applyto>
         <owner>epiphany</owner>
@@ -482,6 +493,17 @@
         <locale name="C">
         <short>Enable JavaScript</short>
         <long>Enable JavaScript.</long>
+        </locale>
+      </schema>
+      <schema>
+        <key>/schemas/apps/epiphany/lockdown/disable_javascript_chrome</key>
+        <applyto>/apps/epiphany/lockdown/disable_javascript_chrome</applyto>
+        <owner>epiphany</owner>
+        <type>bool</type>
+        <default>0</default>
+        <locale name="C">
+        <short>Disable JavaScript chrome control</short>
+        <long>Disable JavaScript's control over window chrome.</long>
         </locale>
       </schema>
     </schemalist>
Index: lib/ephy-prefs.h
===================================================================
RCS file: /cvs/gnome/epiphany/lib/ephy-prefs.h,v
retrieving revision 1.19
diff -u -p -r1.19 ephy-prefs.h
--- lib/ephy-prefs.h	4 Nov 2003 21:43:08 -0000	1.19
+++ lib/ephy-prefs.h	20 Nov 2003 19:22:54 -0000
@@ -30,6 +30,7 @@ G_BEGIN_DECLS
 #define CONF_WINDOWS_SHOW_TOOLBARS "/apps/epiphany/general/show_toolbars"
 #define CONF_WINDOWS_SHOW_BOOKMARKS_BAR "/apps/epiphany/general/show_bookmarks_bar"
 #define CONF_WINDOWS_SHOW_STATUSBAR "/apps/epiphany/general/show_statusbar"
+#define CONF_WINDOWS_HIDE_MENUBAR "/apps/epiphany/general/hide_menubar"
 #define CONF_INTERFACE_MIDDLE_CLICK_OPEN_URL "/apps/epiphany/general/middle_click_open_url"
 #define CONF_AUTO_OPEN_DOWNLOADS "/apps/epiphany/general/auto_open_downloads"
 #define CONF_DESKTOP_IS_HOME_DIR "/apps/nautilus/preferences/desktop_is_home_dir"
@@ -40,6 +41,9 @@ G_BEGIN_DECLS
 #define CONF_STATE_OPEN_DIR           "/apps/epiphany/directories/open"
 #define CONF_STATE_DOWNLOAD_DIR    "/apps/epiphany/directories/download"
 #define CONF_STATE_UPLOAD_DIR	      "/apps/epiphany/directories/upload"
+
+/* Lockdown */
+#define CONF_LOCKDOWN_DISABLE_JAVASCRIPT_CHROME  "/apps/epiphany/lockdown/disable_javascript_chrome"
 
 /* System prefs */
 #define CONF_DESKTOP_FTP_HANDLER "/desktop/gnome/url-handlers/ftp/command"
Index: src/ephy-main.c
===================================================================
RCS file: /cvs/gnome/epiphany/src/ephy-main.c,v
retrieving revision 1.19
diff -u -p -r1.19 ephy-main.c
--- src/ephy-main.c	14 Nov 2003 17:11:16 -0000	1.19
+++ src/ephy-main.c	20 Nov 2003 19:22:54 -0000
@@ -157,6 +157,7 @@ main (int argc, char *argv[])
 	ephy_file_helpers_init ();
 	ephy_stock_icons_init ();
 	eel_gconf_monitor_add ("/apps/epiphany/general");
+	eel_gconf_monitor_add ("/apps/epiphany/lockdown");
 	bonobo_activate ();
 
 	ephy_shell = ephy_shell_new ();
@@ -182,6 +183,7 @@ main (int argc, char *argv[])
 	}
 
 	eel_gconf_monitor_remove ("/apps/epiphany/general");
+	eel_gconf_monitor_remove ("/apps/epiphany/lockdown");
 	ephy_state_save ();
 	ephy_file_helpers_shutdown ();
 	gnome_vfs_shutdown ();
Index: src/ephy-tab.c
===================================================================
RCS file: /cvs/gnome/epiphany/src/ephy-tab.c,v
retrieving revision 1.66
diff -u -p -r1.66 ephy-tab.c
--- src/ephy-tab.c	11 Nov 2003 10:19:04 -0000	1.66
+++ src/ephy-tab.c	20 Nov 2003 19:22:54 -0000
@@ -870,7 +870,7 @@ ephy_tab_new_window_cb (EphyEmbed *embed
 	EphyWindow *window;
 
 	window = ephy_window_new ();
-	ephy_window_set_chrome (window, chromemask);
+	ephy_window_request_chrome (window, chromemask);
 
 	new_tab = ephy_tab_new ();
         ephy_window_add_tab (window, new_tab, EPHY_NOTEBOOK_INSERT_GROUPED, FALSE);
@@ -928,7 +928,6 @@ ephy_tab_size_to_cb (EphyEmbed *embed, g
 	GtkWidget *notebook;
 	EphyWindow *window;
 	GtkWidget *widget;
-	EmbedChromeMask chromemask;
 
 	tab->priv->width = width;
 	tab->priv->height = height;
@@ -936,7 +935,6 @@ ephy_tab_size_to_cb (EphyEmbed *embed, g
 	window = tab->priv->window;
 	notebook = ephy_window_get_notebook (window);
 	widget = GTK_WIDGET (embed);
-	chromemask = ephy_window_get_chrome (window);
 
 	/* Do not resize window with multiple tabs.
 	 * Do not resize window already showed because
Index: src/ephy-window.c
===================================================================
RCS file: /cvs/gnome/epiphany/src/ephy-window.c,v
retrieving revision 1.136
diff -u -p -r1.136 ephy-window.c
--- src/ephy-window.c	13 Nov 2003 17:28:04 -0000	1.136
+++ src/ephy-window.c	20 Nov 2003 19:22:54 -0000
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 /*
  *  Copyright (C) 2000, 2001, 2002, 2003 Marco Pesenti Gritti
  *
@@ -306,11 +307,19 @@ struct EphyWindowPrivate
 	EphyTab *active_tab;
 	EphyDialog *find_dialog;
 	EphyDialog *print_dialog;
-	EmbedChromeMask chrome_mask;
+	EmbedChromeMask requested_chrome_mask;
+	EmbedChromeMask actual_chrome_mask;
 	gboolean closing;
 	gboolean is_fullscreen;
+	gboolean is_ppview;
 	gboolean has_size;
 	guint num_tabs;
+
+	guint disable_js_chrome_notifier_id;
+	guint show_toolbars_notifier_id;
+	guint show_bookmarks_bar_notifier_id;
+	guint show_statusbar_notifier_id;
+	guint hide_menubar_notifier_id;
 };
 
 enum
@@ -429,10 +438,11 @@ exit_fullscreen_button_clicked_cb (GtkWi
 }
 
 static void
-update_chromes_visibility (EphyWindow *window, EmbedChromeMask flags)
+update_chromes_visibility (EphyWindow *window)
 {
 	GtkWidget *menubar;
 	gboolean fullscreen;
+	EmbedChromeMask flags = window->priv->actual_chrome_mask;
 
 	fullscreen = window->priv->is_fullscreen;
 
@@ -481,6 +491,49 @@ update_chromes_visibility (EphyWindow *w
 }
 
 static void
+update_chrome(EphyWindow *window)
+{
+	EmbedChromeMask chrome_mask;
+
+	if (window->priv->is_ppview) {
+		window->priv->actual_chrome_mask = EMBED_CHROME_PPVIEWTOOLBARON;
+	} else {
+		if (eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_JAVASCRIPT_CHROME)) {
+			chrome_mask = EMBED_CHROME_DEFAULT;
+		} else {
+			chrome_mask = window->priv->requested_chrome_mask;
+		}
+
+		if ((chrome_mask & EMBED_CHROME_BOOKMARKSBAR_DEFAULT) ||
+		    (chrome_mask & EMBED_CHROME_DEFAULT)) {
+			/* keep only not layout flags */
+			chrome_mask &= (EMBED_CHROME_WINDOWRAISED |
+					EMBED_CHROME_WINDOWLOWERED |
+					EMBED_CHROME_CENTERSCREEN |
+					EMBED_CHROME_OPENASDIALOG |
+					EMBED_CHROME_OPENASPOPUP);
+
+			/* Load defaults */
+			if (eel_gconf_get_boolean (CONF_WINDOWS_SHOW_TOOLBARS)) {
+				chrome_mask |= EMBED_CHROME_TOOLBARON;
+			}
+			if (eel_gconf_get_boolean (CONF_WINDOWS_SHOW_BOOKMARKS_BAR)) {
+				chrome_mask |= EMBED_CHROME_BOOKMARKSBARON;
+			}
+			if (eel_gconf_get_boolean (CONF_WINDOWS_SHOW_STATUSBAR)) {
+				chrome_mask |= EMBED_CHROME_STATUSBARON;
+			}
+			if (!eel_gconf_get_boolean (CONF_WINDOWS_HIDE_MENUBAR)) {
+				chrome_mask |= EMBED_CHROME_MENUBARON;
+			}
+		}
+		window->priv->actual_chrome_mask = chrome_mask;
+	}
+
+	update_chromes_visibility (window);
+}
+
+static void
 ephy_window_fullscreen (EphyWindow *window)
 {
 	GtkWidget *popup, *button, *icon, *label, *hbox;
@@ -517,7 +570,7 @@ ephy_window_fullscreen (EphyWindow *wind
                           "size-changed", G_CALLBACK (size_changed_cb),
 			  popup);
 
-	update_chromes_visibility (window, window->priv->chrome_mask);
+	update_chromes_visibility (window);
 }
 
 static void
@@ -532,7 +585,7 @@ ephy_window_unfullscreen (EphyWindow *wi
 	gtk_widget_destroy (window->priv->exit_fullscreen_popup);
 	window->priv->exit_fullscreen_popup = NULL;
 
-	update_chromes_visibility (window, window->priv->chrome_mask);
+	update_chromes_visibility (window);
 }
 
 static gboolean
@@ -1062,7 +1115,7 @@ show_embed_popup (EphyWindow *window, Ep
 	EphyEmbedEventType type;
 
 	/* Do not show the menu in print preview mode */
-	if (window->priv->chrome_mask & EMBED_CHROME_PPVIEWTOOLBARON)
+	if (window->priv->is_ppview)
 	{
 		return;
 	}
@@ -1485,6 +1538,35 @@ ensure_default_icon (void)
 }
 
 static void
+update_layout_toggles (EphyWindow *window)
+{
+	GtkActionGroup *action_group = GTK_ACTION_GROUP (window->priv->action_group);
+	GtkAction *action;
+
+	action = gtk_action_group_get_action (action_group, "ViewToolbar");
+	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
+				      eel_gconf_get_boolean (CONF_WINDOWS_SHOW_TOOLBARS));
+
+	action = gtk_action_group_get_action (action_group, "ViewBookmarksBar");
+	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
+				      eel_gconf_get_boolean (CONF_WINDOWS_SHOW_BOOKMARKS_BAR));
+
+	action = gtk_action_group_get_action (action_group, "ViewStatusbar");
+	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
+				      eel_gconf_get_boolean (CONF_WINDOWS_SHOW_STATUSBAR));
+}
+
+static void
+chrome_notifier (GConfClient *client,
+		 guint cnxn_id,
+		 GConfEntry *entry,
+		 EphyWindow *window)
+{
+	update_chrome (window);
+	update_layout_toggles(window);
+}
+
+static void
 ephy_window_init (EphyWindow *window)
 {
 	EphyExtension *manager;
@@ -1494,12 +1576,14 @@ ephy_window_init (EphyWindow *window)
 	window->priv = EPHY_WINDOW_GET_PRIVATE (window);
 
 	window->priv->active_tab = NULL;
-	window->priv->chrome_mask = 0;
+	window->priv->requested_chrome_mask = EMBED_CHROME_DEFAULT;
+	window->priv->actual_chrome_mask = 0;
 	window->priv->closing = FALSE;
 	window->priv->ppview_toolbar = NULL;
 	window->priv->exit_fullscreen_popup = NULL;
 	window->priv->num_tabs = 0;
 	window->priv->is_fullscreen = FALSE;
+	window->priv->is_ppview = FALSE;
 	window->priv->has_size = FALSE;
 
 	ensure_default_icon ();
@@ -1527,33 +1611,42 @@ ephy_window_init (EphyWindow *window)
 	window->priv->enc_menu = ephy_encoding_menu_new (window);
 	window->priv->bmk_menu = ephy_bookmarks_menu_new (window);
 
+	window->priv->disable_js_chrome_notifier_id = eel_gconf_notification_add
+		(CONF_LOCKDOWN_DISABLE_JAVASCRIPT_CHROME,
+		 (GConfClientNotifyFunc)chrome_notifier, window);
+
+	window->priv->show_toolbars_notifier_id = eel_gconf_notification_add
+		(CONF_WINDOWS_SHOW_TOOLBARS,
+		 (GConfClientNotifyFunc)chrome_notifier, window);
+
+	window->priv->show_bookmarks_bar_notifier_id = eel_gconf_notification_add
+		(CONF_WINDOWS_SHOW_BOOKMARKS_BAR,
+		 (GConfClientNotifyFunc)chrome_notifier, window);
+
+	window->priv->show_statusbar_notifier_id = eel_gconf_notification_add
+		(CONF_WINDOWS_SHOW_STATUSBAR,
+		 (GConfClientNotifyFunc)chrome_notifier, window);
+
+	window->priv->hide_menubar_notifier_id = eel_gconf_notification_add
+		(CONF_WINDOWS_HIDE_MENUBAR,
+		 (GConfClientNotifyFunc)chrome_notifier, window);
+
 	/* Once the window is fully created let the extensions attach to it */
 	manager = EPHY_EXTENSION (ephy_shell_get_extensions_manager (ephy_shell));
 	ephy_extension_attach_window (manager, window);
 }
 
 static void
-save_window_chrome (EphyWindow *window)
-{
-	EmbedChromeMask flags = window->priv->chrome_mask;
-
-	if (!(flags & EMBED_CHROME_OPENASPOPUP) &&
-	    !(flags & EMBED_CHROME_PPVIEWTOOLBARON))
-	{
-		eel_gconf_set_boolean (CONF_WINDOWS_SHOW_BOOKMARKS_BAR,
-				       flags & EMBED_CHROME_BOOKMARKSBARON);
-		eel_gconf_set_boolean (CONF_WINDOWS_SHOW_TOOLBARS,
-				       flags & EMBED_CHROME_TOOLBARON);
-		eel_gconf_set_boolean (CONF_WINDOWS_SHOW_STATUSBAR,
-				       flags & EMBED_CHROME_STATUSBARON);
-	}
-}
-
-static void
 ephy_window_finalize (GObject *object)
 {
         EphyWindow *window = EPHY_WINDOW (object);
 
+	eel_gconf_notification_remove (window->priv->disable_js_chrome_notifier_id);
+	eel_gconf_notification_remove (window->priv->show_toolbars_notifier_id);
+	eel_gconf_notification_remove (window->priv->show_bookmarks_bar_notifier_id);
+	eel_gconf_notification_remove (window->priv->show_statusbar_notifier_id);
+	eel_gconf_notification_remove (window->priv->hide_menubar_notifier_id);
+
 	if (window->priv->find_dialog)
 	{
 		g_object_unref (G_OBJECT (window->priv->find_dialog));
@@ -1590,81 +1683,20 @@ ephy_window_new (void)
 	return EPHY_WINDOW (g_object_new (EPHY_TYPE_WINDOW, NULL));
 }
 
-EmbedChromeMask
-ephy_window_get_chrome (EphyWindow *window)
-{
-	return window->priv->chrome_mask;
-}
-
-static void
-translate_default_chrome (EmbedChromeMask *chrome_mask)
-{
-	gboolean bbar;
-
-	bbar = (*chrome_mask & EMBED_CHROME_BOOKMARKSBAR_DEFAULT) ||
-	       (*chrome_mask & EMBED_CHROME_DEFAULT);
-
-	/* keep only not layout flags */
-	*chrome_mask &= (EMBED_CHROME_WINDOWRAISED |
-			 EMBED_CHROME_WINDOWLOWERED |
-			 EMBED_CHROME_CENTERSCREEN |
-			 EMBED_CHROME_OPENASDIALOG |
-			 EMBED_CHROME_OPENASPOPUP);
-
-	/* Load defaults */
-	if (eel_gconf_get_boolean (CONF_WINDOWS_SHOW_STATUSBAR))
-	{
-		*chrome_mask |= EMBED_CHROME_STATUSBARON;
-	}
-	if (eel_gconf_get_boolean (CONF_WINDOWS_SHOW_TOOLBARS))
-	{
-		*chrome_mask |= EMBED_CHROME_TOOLBARON;
-	}
-	if (eel_gconf_get_boolean (CONF_WINDOWS_SHOW_BOOKMARKS_BAR) && bbar)
-	{
-		*chrome_mask |= EMBED_CHROME_BOOKMARKSBARON;
-	}
-
-	*chrome_mask |= EMBED_CHROME_MENUBARON;
-}
-
-static void
-update_layout_toggles (EphyWindow *window)
+void
+ephy_window_request_chrome (EphyWindow *window,
+			    EmbedChromeMask flags)
 {
-	GtkActionGroup *action_group = GTK_ACTION_GROUP (window->priv->action_group);
-	EmbedChromeMask mask = window->priv->chrome_mask;
-	GtkAction *action;
-
-	action = gtk_action_group_get_action (action_group, "ViewToolbar");
-	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
-				      mask & EMBED_CHROME_TOOLBARON);
-
-	action = gtk_action_group_get_action (action_group, "ViewBookmarksBar");
-	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
-				      mask & EMBED_CHROME_BOOKMARKSBARON);
-
-	action = gtk_action_group_get_action (action_group, "ViewStatusbar");
-	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
-				      mask & EMBED_CHROME_STATUSBARON);
+	window->priv->requested_chrome_mask = flags;
+	update_chrome (window);
 }
 
 void
-ephy_window_set_chrome (EphyWindow *window,
-			EmbedChromeMask flags)
+ephy_window_end_ppview (EphyWindow *window)
 {
-	if ((flags & EMBED_CHROME_DEFAULT) ||
-	    (flags & EMBED_CHROME_BOOKMARKSBAR_DEFAULT))
-	{
-		translate_default_chrome (&flags);
-	}
-
-	update_chromes_visibility (window, flags);
-
-	window->priv->chrome_mask = flags;
-
-	update_layout_toggles (window);
-
-	save_window_chrome (window);
+	window->priv->is_ppview = FALSE;
+	update_chrome (window);
+	ephy_notebook_set_show_tabs (EPHY_NOTEBOOK (window->priv->notebook), TRUE);
 }
 
 GtkWidget *
@@ -1777,17 +1809,15 @@ ephy_window_show (GtkWidget *widget)
 {
 	EphyWindow *window = EPHY_WINDOW(widget);
 
-	if (!window->priv->chrome_mask)
-	{
-		ephy_window_set_chrome (window, EMBED_CHROME_DEFAULT);
-	}
+	update_chrome (window);
+	update_layout_toggles(window);
 
 	if (!window->priv->has_size)
 	{
 		gboolean keep_state = TRUE;
 
 		/* Do not keep state of sized popups */
-		if (window->priv->chrome_mask & EMBED_CHROME_OPENASPOPUP)
+		if (window->priv->actual_chrome_mask & EMBED_CHROME_OPENASPOPUP)
 		{
 			EphyTab *tab;
 			int width, height;
@@ -1934,7 +1964,8 @@ static void
 print_dialog_preview_cb (EphyDialog *dialog,
 			 EphyWindow *window)
 {
-	ephy_window_set_chrome (window, EMBED_CHROME_PPVIEWTOOLBARON);
+	window->priv->is_ppview = TRUE;
+	update_chrome(window);
 	ephy_notebook_set_show_tabs (EPHY_NOTEBOOK (window->priv->notebook), FALSE);
 }
 
Index: src/ephy-window.h
===================================================================
RCS file: /cvs/gnome/epiphany/src/ephy-window.h,v
retrieving revision 1.16
diff -u -p -r1.16 ephy-window.h
--- src/ephy-window.h	18 Oct 2003 11:29:17 -0000	1.16
+++ src/ephy-window.h	20 Nov 2003 19:22:54 -0000
@@ -68,10 +68,10 @@ GType		  ephy_window_get_type		  (void);
 
 EphyWindow	 *ephy_window_new		  (void);
 
-void		  ephy_window_set_chrome	  (EphyWindow *window,
+void		  ephy_window_request_chrome	  (EphyWindow *window,
 						   EmbedChromeMask chrome_flags);
 
-EmbedChromeMask   ephy_window_get_chrome	  (EphyWindow *window);
+void		  ephy_window_end_ppview	  (EphyWindow *window);
 
 GtkWidget	 *ephy_window_get_notebook	  (EphyWindow *window);
 
Index: src/ppview-toolbar.c
===================================================================
RCS file: /cvs/gnome/epiphany/src/ppview-toolbar.c,v
retrieving revision 1.17
diff -u -p -r1.17 ppview-toolbar.c
--- src/ppview-toolbar.c	6 Nov 2003 16:32:12 -0000	1.17
+++ src/ppview-toolbar.c	20 Nov 2003 19:22:54 -0000
@@ -61,7 +61,6 @@ static GObjectClass *parent_class = NULL
 struct PPViewToolbarPrivate
 {
 	EphyWindow *window;
-	EmbedChromeMask original_mask;
 	GtkUIManager *ui_merge;
 	GtkActionGroup *action_group;
 	guint ui_id;
@@ -240,8 +239,6 @@ ppview_toolbar_set_window (PPViewToolbar
 	t->priv->window = window;
 	t->priv->ui_merge = GTK_UI_MANAGER (t->priv->window->ui_merge);
 
-	t->priv->original_mask = ephy_window_get_chrome (window);
-
 	t->priv->action_group = gtk_action_group_new ("PPViewActions");
 	gtk_action_group_set_translation_domain (t->priv->action_group, NULL);
 	gtk_action_group_add_actions (t->priv->action_group, entries,	
@@ -384,7 +381,6 @@ toolbar_cmd_ppv_close (GtkUIManager *mer
 {
 	EphyWindow *window;
 	EphyEmbed *embed;
-	GtkWidget *notebook;
 
 	g_return_if_fail (EPHY_IS_PPVIEW_TOOLBAR (t));
 
@@ -394,12 +390,7 @@ toolbar_cmd_ppv_close (GtkUIManager *mer
 	embed = ephy_window_get_active_embed (window);
 	g_return_if_fail (EPHY_IS_EMBED (embed));
 
-	ephy_window_set_chrome (window, t->priv->original_mask);
-
-	notebook = ephy_window_get_notebook (window);
-	g_return_if_fail (EPHY_IS_NOTEBOOK (notebook));
-
-	ephy_notebook_set_show_tabs (EPHY_NOTEBOOK (notebook), TRUE);
+	ephy_window_end_ppview (window);
 
 	ephy_embed_print_preview_close (embed);
 }
Index: src/window-commands.c
===================================================================
RCS file: /cvs/gnome/epiphany/src/window-commands.c,v
retrieving revision 1.94
diff -u -p -r1.94 window-commands.c
--- src/window-commands.c	12 Nov 2003 18:31:40 -0000	1.94
+++ src/window-commands.c	20 Nov 2003 19:22:54 -0000
@@ -553,57 +553,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
