[epiphany/overview: 23/30] ephy-window: cleanup the ui before showing the overview



commit e420998a23050dc8be1875ce246c422683f7ae76
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Wed May 9 19:17:34 2012 +0300

    ephy-window: cleanup the ui before showing the overview
    
    A few UI items are not needed when the window is displaying the overview,
    clean them up.

 src/ephy-window.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 2584bbf..c5361bf 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -3854,10 +3854,30 @@ ephy_window_get_overview_mode (EphyWindow *window)
 }
 
 static void
+ephy_window_prepare_for_overview (EphyWindow *window)
+{
+	GtkAction *action;
+
+	gtk_window_set_title (GTK_WINDOW (window), _(("Web overview")));
+	ephy_window_set_location (window, "");
+	_ephy_window_set_security_state (window, FALSE, STOCK_LOCK_INSECURE);
+	_ephy_window_action_set_favicon (window, NULL);
+	_ephy_window_set_navigation_flags (window, 0);
+
+	/* Update sensitivity of actions */
+
+	action = gtk_action_group_get_action (window->priv->toolbar_action_group,
+					      "ViewCombinedStopReload");
+	ephy_combined_stop_reload_action_set_loading (EPHY_COMBINED_STOP_RELOAD_ACTION (action),
+						      FALSE);
+}
+
+static void
 ephy_window_toggle_overview (EphyWindow *window, gboolean overview_mode)
 {
 	if (overview_mode) {
 		ephy_window_disconnect_active_embed (window);
+		ephy_window_prepare_for_overview (window);
 		gtk_widget_show (window->priv->overview);
 		gtk_widget_hide (GTK_WIDGET (window->priv->notebook));
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]