aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r--src/ephy-window.c43
1 files changed, 22 insertions, 21 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 9a785e974..87a293a5c 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1724,32 +1724,40 @@ setup_notebook (EphyWindow *window)
return notebook;
}
-static EphyEmbedChrome
-get_default_chrome (void)
+static void
+ephy_window_set_chrome (EphyWindow *window, EphyEmbedChrome mask)
{
- EphyEmbedChrome chrome_mask = 0;
+ EphyEmbedChrome chrome_mask = mask;
+
+ if (mask == EPHY_EMBED_CHROME_ALL)
+ {
+ window->priv->should_save_chrome = TRUE;
+ }
- if (eel_gconf_get_boolean (CONF_WINDOWS_SHOW_TOOLBARS))
+ if (!eel_gconf_get_boolean (CONF_WINDOWS_SHOW_TOOLBARS))
{
- chrome_mask |= EPHY_EMBED_CHROME_TOOLBAR;
+ chrome_mask &= ~EPHY_EMBED_CHROME_TOOLBAR;
}
- if (eel_gconf_get_boolean (CONF_WINDOWS_SHOW_STATUSBAR))
+ if (!eel_gconf_get_boolean (CONF_WINDOWS_SHOW_STATUSBAR))
{
- chrome_mask |= EPHY_EMBED_CHROME_STATUSBAR;
+ chrome_mask &= ~EPHY_EMBED_CHROME_STATUSBAR;
}
- if (!eel_gconf_get_boolean (CONF_LOCKDOWN_HIDE_MENUBAR))
+ if (!eel_gconf_get_boolean (CONF_WINDOWS_SHOW_BOOKMARKS_BAR))
{
- chrome_mask |= EPHY_EMBED_CHROME_MENUBAR;
+ chrome_mask &= ~EPHY_EMBED_CHROME_BOOKMARKSBAR;
}
- if (eel_gconf_get_boolean (CONF_WINDOWS_SHOW_BOOKMARKS_BAR))
+ if (eel_gconf_get_boolean (CONF_LOCKDOWN_HIDE_MENUBAR))
{
- chrome_mask |= EPHY_EMBED_CHROME_BOOKMARKSBAR;
+ chrome_mask &= ~EPHY_EMBED_CHROME_MENUBAR;
}
- return chrome_mask;
+ window->priv->chrome = chrome_mask;
+
+ sync_chromes_visibility (window);
+ update_chromes_actions (window);
}
static void
@@ -1766,14 +1774,7 @@ ephy_window_set_property (GObject *object,
ephy_window_set_active_tab (window, g_value_get_object (value));
break;
case PROP_CHROME:
- window->priv->chrome = g_value_get_flags (value);
- if (window->priv->chrome == EPHY_EMBED_CHROME_DEFAULT)
- {
- window->priv->chrome = get_default_chrome ();
- window->priv->should_save_chrome = TRUE;
- }
- sync_chromes_visibility (window);
- update_chromes_actions (window);
+ ephy_window_set_chrome (window, g_value_get_flags (value));
break;
}
}
@@ -1825,7 +1826,7 @@ ephy_window_class_init (EphyWindowClass *klass)
"chrome",
"Window chrome",
EPHY_TYPE_EMBED_CHROME_MASK,
- EPHY_EMBED_CHROME_DEFAULT,
+ EPHY_EMBED_CHROME_ALL,
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_READWRITE));