aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-window.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2004-04-18 18:35:44 +0800
committerChristian Persch <chpe@src.gnome.org>2004-04-18 18:35:44 +0800
commit253cdd5d4d4969687f0c739cc751fa9a96c42600 (patch)
tree752d5711617ce980cefd5532fd996a18e954cc80 /src/ephy-window.c
parent4d702bd73bf61dd1b8df432da802adcc3785fd0a (diff)
downloadgsoc2013-epiphany-253cdd5d4d4969687f0c739cc751fa9a96c42600.tar
gsoc2013-epiphany-253cdd5d4d4969687f0c739cc751fa9a96c42600.tar.gz
gsoc2013-epiphany-253cdd5d4d4969687f0c739cc751fa9a96c42600.tar.bz2
gsoc2013-epiphany-253cdd5d4d4969687f0c739cc751fa9a96c42600.tar.lz
gsoc2013-epiphany-253cdd5d4d4969687f0c739cc751fa9a96c42600.tar.xz
gsoc2013-epiphany-253cdd5d4d4969687f0c739cc751fa9a96c42600.tar.zst
gsoc2013-epiphany-253cdd5d4d4969687f0c739cc751fa9a96c42600.zip
Fix chrome for new windows opened from _blank target. Fixes bug #139512.
2004-04-18 Marco Pesenti Gritti <marco@gnome.org> * embed/ephy-embed.c: (ephy_embed_chrome_get_type): * embed/ephy-embed.h: * embed/mozilla/mozilla-embed.cpp: * src/ephy-window.c: (ephy_window_set_chrome), (ephy_window_set_property), (ephy_window_class_init): Fix chrome for new windows opened from _blank target. Fixes bug #139512.
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));