aboutsummaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--ChangeLog13
-rw-r--r--embed/ephy-embed.c7
-rw-r--r--embed/ephy-embed.h9
-rw-r--r--embed/mozilla/mozilla-embed.cpp1
-rw-r--r--src/ephy-window.c39
5 files changed, 44 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index 35bb62f8b..a0e805ccf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+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.
+
2004-03-31 Christian Persch <chpe@cvs.gnome.org>
* configure.in:
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index 00f8b25d8..9f1686840 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -40,9 +40,10 @@ ephy_embed_chrome_get_type (void)
static const GFlagsValue values[] =
{
{ EPHY_EMBED_CHROME_DEFAULT, "EPHY_EMBED_CHROME_DEFAULT", "default" },
- { EPHY_EMBED_CHROME_MENUBAR, "EPHY_EMBED_CHROME_MENUBARON", "menubar" },
- { EPHY_EMBED_CHROME_TOOLBAR, "EPHY_EMBED_CHROME_TOOLBARON", "toolbar" },
- { EPHY_EMBED_CHROME_STATUSBAR, "EPHY_EMBED_CHROME_STATUSBARON", "statusbar" },
+ { EPHY_EMBED_CHROME_MENUBAR, "EPHY_EMBED_CHROME_MENUBAR", "menubar" },
+ { EPHY_EMBED_CHROME_TOOLBAR, "EPHY_EMBED_CHROME_TOOLBAR", "toolbar" },
+ { EPHY_EMBED_CHROME_STATUSBAR, "EPHY_EMBED_CHROME_STATUSBAR", "statusbar" },
+ { EPHY_EMBED_CHROME_BOOKMARKSBAR, "EPHY_EMBED_CHROME_BOOKMARKSBAR", "bookmarksbar" },
{ 0, NULL, NULL }
};
diff --git a/embed/ephy-embed.h b/embed/ephy-embed.h
index 217d3df2a..c2fcb2e91 100644
--- a/embed/ephy-embed.h
+++ b/embed/ephy-embed.h
@@ -59,10 +59,11 @@ typedef enum
typedef enum
{
- EPHY_EMBED_CHROME_DEFAULT = 1 << 0,
- EPHY_EMBED_CHROME_MENUBAR = 1 << 1,
- EPHY_EMBED_CHROME_TOOLBAR = 1 << 2,
- EPHY_EMBED_CHROME_STATUSBAR = 1 << 3
+ EPHY_EMBED_CHROME_DEFAULT = 1 << 0,
+ EPHY_EMBED_CHROME_MENUBAR = 1 << 1,
+ EPHY_EMBED_CHROME_TOOLBAR = 1 << 2,
+ EPHY_EMBED_CHROME_STATUSBAR = 1 << 3,
+ EPHY_EMBED_CHROME_BOOKMARKSBAR = 1 << 4
} EphyEmbedChrome;
typedef enum
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp
index e02abad73..8f0fe578b 100644
--- a/embed/mozilla/mozilla-embed.cpp
+++ b/embed/mozilla/mozilla-embed.cpp
@@ -1001,6 +1001,7 @@ mozilla_embed_new_window_cb (GtkMozEmbed *embed,
{ GTK_MOZ_EMBED_FLAG_MENUBARON, EPHY_EMBED_CHROME_MENUBAR },
{ GTK_MOZ_EMBED_FLAG_TOOLBARON, EPHY_EMBED_CHROME_TOOLBAR },
{ GTK_MOZ_EMBED_FLAG_STATUSBARON, EPHY_EMBED_CHROME_STATUSBAR },
+ { GTK_MOZ_EMBED_FLAG_PERSONALTOOLBARON, EPHY_EMBED_CHROME_BOOKMARKSBAR },
{ 0, 0 }
};
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);
}