diff options
author | Xan Lopez <xan@igalia.com> | 2011-12-20 22:34:04 +0800 |
---|---|---|
committer | Xan Lopez <xan@igalia.com> | 2011-12-20 23:31:44 +0800 |
commit | 8b352f8b83a264c60f810a268c92dd4bf687f85e (patch) | |
tree | b1037df0b0b1cd8530ddbcdb0c73e64e3c755ea4 /src | |
parent | 7e8b3175b44e3cfd5444e9616567821d5835d909 (diff) | |
download | gsoc2013-epiphany-8b352f8b83a264c60f810a268c92dd4bf687f85e.tar gsoc2013-epiphany-8b352f8b83a264c60f810a268c92dd4bf687f85e.tar.gz gsoc2013-epiphany-8b352f8b83a264c60f810a268c92dd4bf687f85e.tar.bz2 gsoc2013-epiphany-8b352f8b83a264c60f810a268c92dd4bf687f85e.tar.lz gsoc2013-epiphany-8b352f8b83a264c60f810a268c92dd4bf687f85e.tar.xz gsoc2013-epiphany-8b352f8b83a264c60f810a268c92dd4bf687f85e.tar.zst gsoc2013-epiphany-8b352f8b83a264c60f810a268c92dd4bf687f85e.zip |
Remove option to hide toolbars
We don't want this either for 3.4, remove it.
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-lockdown.c | 5 | ||||
-rw-r--r-- | src/ephy-window.c | 72 |
2 files changed, 0 insertions, 77 deletions
diff --git a/src/ephy-lockdown.c b/src/ephy-lockdown.c index bd40f2a26..e94659872 100644 --- a/src/ephy-lockdown.c +++ b/src/ephy-lockdown.c @@ -227,11 +227,6 @@ impl_attach_window (EphyExtension *extension, action_group, window_actions, G_N_ELEMENTS (window_actions)); - action = gtk_action_group_get_action (action_group, "ViewToolbar"); - g_settings_bind_writable (EPHY_SETTINGS_UI, - EPHY_PREFS_UI_SHOW_TOOLBARS, - action, "sensitive", FALSE); - action_group = find_action_group (manager, "PopupsActions"); bind_settings_and_actions (EPHY_SETTINGS_LOCKDOWN, action_group, popup_actions, diff --git a/src/ephy-window.c b/src/ephy-window.c index a91520777..8b6b439f3 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -89,8 +89,6 @@ static void notebook_switch_page_cb (GtkNotebook *notebook, GtkWidget *page, guint page_num, EphyWindow *window); -static void ephy_window_view_toolbar_cb (GtkAction *action, - EphyWindow *window); static void ephy_window_view_popup_windows_cb (GtkAction *action, EphyWindow *window); static void sync_tab_load_status (EphyWebView *view, @@ -268,9 +266,6 @@ static const GtkToggleActionEntry ephy_menu_toggle_entries [] = /* View Menu */ - { "ViewToolbar", NULL, N_("_Hide Toolbars"), NULL, - N_("Show or hide toolbar"), - G_CALLBACK (ephy_window_view_toolbar_cb), FALSE }, { "ViewDownloadsBar", NULL, N_("_Downloads Bar"), NULL, N_("Show the active downloads for this window"), NULL, FALSE }, @@ -1521,28 +1516,6 @@ connect_proxy_cb (GtkUIManager *manager, } static void -update_chromes_actions (EphyWindow *window) -{ - GtkActionGroup *action_group = window->priv->action_group; - GtkAction *action; - gboolean show_menubar, show_toolbar, show_tabsbar; - - get_chromes_visibility (window, - &show_menubar, - &show_toolbar, - &show_tabsbar); - - action = gtk_action_group_get_action (action_group, "ViewToolbar"); - g_signal_handlers_block_by_func (G_OBJECT (action), - G_CALLBACK (ephy_window_view_toolbar_cb), - window); - gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), !show_toolbar); - g_signal_handlers_unblock_by_func (G_OBJECT (action), - G_CALLBACK (ephy_window_view_toolbar_cb), - window); -} - -static void setup_ui_manager (EphyWindow *window) { GtkActionGroup *action_group; @@ -2662,7 +2635,6 @@ web_view_ready_cb (WebKitWebView *web_view, window->priv->is_popup = TRUE; window->priv->chrome = chrome_mask; - update_chromes_actions (window); sync_chromes_visibility (window); } @@ -3972,8 +3944,6 @@ ephy_window_constructor (GType type, init_menu_updaters (window); - update_chromes_actions (window); - sync_chromes_visibility (window); ensure_location_entry (window); @@ -4379,48 +4349,6 @@ ephy_window_set_zoom (EphyWindow *window, } static void -sync_prefs_with_chrome (EphyWindow *window) -{ - EphyWebViewChrome flags = window->priv->chrome; - - if (window->priv->should_save_chrome) - { - g_settings_set_boolean (EPHY_SETTINGS_UI, - EPHY_PREFS_UI_SHOW_TOOLBARS, - flags & EPHY_WEB_VIEW_CHROME_TOOLBAR); - - g_settings_set_boolean (EPHY_SETTINGS_LOCKDOWN, - EPHY_PREFS_LOCKDOWN_MENUBAR, - !(flags & EPHY_WEB_VIEW_CHROME_MENUBAR)); - } -} - -static void -sync_chrome_with_view_toggle (GtkAction *action, - EphyWindow *window, - EphyWebViewChrome chrome_flag, - gboolean invert) -{ - gboolean active; - - active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); - window->priv->chrome = (active != invert) ? - window->priv->chrome | chrome_flag : - window->priv->chrome & (~chrome_flag); - - sync_chromes_visibility (window); - sync_prefs_with_chrome (window); -} - -static void -ephy_window_view_toolbar_cb (GtkAction *action, - EphyWindow *window) -{ - sync_chrome_with_view_toggle (action, window, - EPHY_WEB_VIEW_CHROME_TOOLBAR, TRUE); -} - -static void ephy_window_view_popup_windows_cb (GtkAction *action, EphyWindow *window) { |