aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-04-01 20:31:05 +0800
committerChristian Persch <chpe@src.gnome.org>2004-04-01 20:31:05 +0800
commit242a4fd05a48641f738e30cc27534623f545ddbc (patch)
tree177e91053815a516e7ace474f7ee68df930cfa79 /src
parent4af17ff6353de154008c21f25cc21cf5533ed650 (diff)
downloadgsoc2013-epiphany-242a4fd05a48641f738e30cc27534623f545ddbc.tar
gsoc2013-epiphany-242a4fd05a48641f738e30cc27534623f545ddbc.tar.gz
gsoc2013-epiphany-242a4fd05a48641f738e30cc27534623f545ddbc.tar.bz2
gsoc2013-epiphany-242a4fd05a48641f738e30cc27534623f545ddbc.tar.lz
gsoc2013-epiphany-242a4fd05a48641f738e30cc27534623f545ddbc.tar.xz
gsoc2013-epiphany-242a4fd05a48641f738e30cc27534623f545ddbc.tar.zst
gsoc2013-epiphany-242a4fd05a48641f738e30cc27534623f545ddbc.zip
Fix bookmarks toolbar visibility in fullscreen and print preview mode, as
2004-04-01 Christian Persch <chpe@cvs.gnome.org> * embed/ephy-embed.c: (ephy_embed_chrome_get_type): * embed/ephy-embed.h: * embed/mozilla/mozilla-embed.cpp: * src/ephy-window.c: (get_chromes_visibility), (sync_chromes_visibility), (update_chromes_actions), (get_default_chrome), (ephy_window_init), (sync_prefs_with_chrome), (ephy_window_view_bookmarksbar_cb): Fix bookmarks toolbar visibility in fullscreen and print preview mode, as well as for javascript popups. Fixes bug #138520.
Diffstat (limited to 'src')
-rw-r--r--src/ephy-window.c39
1 files changed, 21 insertions, 18 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 967d38236..89aa3504b 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -338,7 +338,6 @@ struct EphyWindowPrivate
guint help_message_cid;
EphyEmbedChrome chrome;
- gboolean show_bookmarksbar;
gboolean should_save_chrome;
guint disable_arbitrary_url_notifier_id;
@@ -457,7 +456,8 @@ exit_fullscreen_button_clicked_cb (GtkWidget *button, EphyWindow *window)
static void
get_chromes_visibility (EphyWindow *window, gboolean *show_menubar,
- gboolean *show_statusbar, gboolean *show_toolbar)
+ gboolean *show_statusbar, gboolean *show_toolbar,
+ gboolean *show_bookmarksbar)
{
EphyEmbedChrome flags = window->priv->chrome;
@@ -467,13 +467,14 @@ get_chromes_visibility (EphyWindow *window, gboolean *show_menubar,
*show_menubar = flags & EPHY_EMBED_CHROME_MENUBAR;
*show_statusbar = flags & EPHY_EMBED_CHROME_STATUSBAR;
*show_toolbar = flags & EPHY_EMBED_CHROME_TOOLBAR;
+ *show_bookmarksbar = flags & EPHY_EMBED_CHROME_BOOKMARKSBAR;
break;
case EPHY_WINDOW_MODE_FULLSCREEN:
*show_toolbar = flags & EPHY_EMBED_CHROME_TOOLBAR;
- *show_menubar = *show_statusbar = FALSE;
+ *show_menubar = *show_statusbar = *show_bookmarksbar = FALSE;
break;
default:
- *show_menubar = *show_statusbar = *show_toolbar = FALSE;
+ *show_menubar = *show_statusbar = *show_toolbar = *show_bookmarksbar = FALSE;
}
}
@@ -481,10 +482,11 @@ static void
sync_chromes_visibility (EphyWindow *window)
{
GtkWidget *menubar;
- gboolean show_statusbar, show_menubar, show_toolbar;
+ gboolean show_statusbar, show_menubar, show_toolbar, show_bookmarksbar;
get_chromes_visibility (window, &show_menubar,
- &show_statusbar, &show_toolbar);
+ &show_statusbar, &show_toolbar,
+ &show_bookmarksbar);
menubar = gtk_ui_manager_get_widget
(GTK_UI_MANAGER (window->ui_merge), "/menubar");
@@ -500,7 +502,7 @@ sync_chromes_visibility (EphyWindow *window)
}
toolbar_set_visibility (window->priv->toolbar, show_toolbar,
- window->priv->show_bookmarksbar);
+ show_bookmarksbar);
if (show_statusbar)
@@ -866,10 +868,11 @@ update_chromes_actions (EphyWindow *window)
{
GtkActionGroup *action_group = GTK_ACTION_GROUP (window->priv->action_group);
GtkAction *action;
- gboolean show_statusbar, show_menubar, show_toolbar;
+ gboolean show_statusbar, show_menubar, show_toolbar, show_bookmarksbar;
get_chromes_visibility (window, &show_menubar,
- &show_statusbar, &show_toolbar);
+ &show_statusbar, &show_toolbar,
+ &show_bookmarksbar);
action = gtk_action_group_get_action (action_group, "ViewToolbar");
g_signal_handlers_block_by_func (G_OBJECT (action),
@@ -884,8 +887,7 @@ update_chromes_actions (EphyWindow *window)
g_signal_handlers_block_by_func (G_OBJECT (action),
G_CALLBACK (ephy_window_view_bookmarksbar_cb),
window);
- gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
- window->priv->show_bookmarksbar);
+ gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), show_bookmarksbar);
g_signal_handlers_unblock_by_func (G_OBJECT (action),
G_CALLBACK (ephy_window_view_bookmarksbar_cb),
window);
@@ -1739,6 +1741,11 @@ get_default_chrome (void)
chrome_mask |= EPHY_EMBED_CHROME_MENUBAR;
}
+ if (eel_gconf_get_boolean (CONF_WINDOWS_SHOW_BOOKMARKS_BAR))
+ {
+ chrome_mask |= EPHY_EMBED_CHROME_BOOKMARKSBAR;
+ }
+
return chrome_mask;
}
@@ -1915,8 +1922,6 @@ ephy_window_init (EphyWindow *window)
window->priv->has_size = FALSE;
window->priv->should_save_chrome = FALSE;
window->priv->mode = EPHY_WINDOW_MODE_NORMAL;
- window->priv->show_bookmarksbar =
- eel_gconf_get_boolean (CONF_WINDOWS_SHOW_BOOKMARKS_BAR);
ensure_default_icon ();
@@ -2574,7 +2579,7 @@ sync_prefs_with_chrome (EphyWindow *window)
if (window->priv->should_save_chrome)
{
eel_gconf_set_boolean (CONF_WINDOWS_SHOW_BOOKMARKS_BAR,
- window->priv->show_bookmarksbar);
+ flags & EPHY_EMBED_CHROME_BOOKMARKSBAR);
eel_gconf_set_boolean (CONF_WINDOWS_SHOW_TOOLBARS,
flags & EPHY_EMBED_CHROME_TOOLBAR);
eel_gconf_set_boolean (CONF_WINDOWS_SHOW_STATUSBAR,
@@ -2616,8 +2621,6 @@ static void
ephy_window_view_bookmarksbar_cb (GtkAction *action,
EphyWindow *window)
{
- window->priv->show_bookmarksbar = gtk_toggle_action_get_active
- (GTK_TOGGLE_ACTION (action));
- sync_chromes_visibility (window);
- sync_prefs_with_chrome (window);
+ sync_chrome_with_view_toggle (action, window,
+ EPHY_EMBED_CHROME_BOOKMARKSBAR);
}