[epiphany/overview: 15/26] ephy-window: add internal ephy_window_toggle_overview()



commit 13f7ddc1a3b30e46fdf68e564bc0d2b728ed10db
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Wed May 9 19:12:05 2012 +0300

    ephy-window: add internal ephy_window_toggle_overview()
    
    This will grow a bit, so better split it out

 src/ephy-window.c |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/src/ephy-window.c b/src/ephy-window.c
index dc4c599..9acf8e1 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -4082,6 +4082,19 @@ ephy_window_get_overview_mode (EphyWindow *window)
 	return window->priv->overview_mode;
 }
 
+static void
+ephy_window_toggle_overview (EphyWindow *window, gboolean overview_mode)
+{
+	if (overview_mode) {
+		gtk_widget_show (window->priv->overview);
+		gtk_widget_hide (GTK_WIDGET (window->priv->notebook));
+
+	} else {
+		gtk_widget_hide (window->priv->overview);
+		gtk_widget_show (GTK_WIDGET (window->priv->notebook));
+	}
+}
+
 void
 ephy_window_set_overview_mode (EphyWindow *window, gboolean overview_mode)
 {
@@ -4094,13 +4107,7 @@ ephy_window_set_overview_mode (EphyWindow *window, gboolean overview_mode)
 	if (priv->overview_mode == overview_mode)
 		return;
 
-	if (overview_mode) {
-		gtk_widget_show (priv->overview);
-		gtk_widget_hide (GTK_WIDGET (priv->notebook));
-	} else {
-		gtk_widget_hide (priv->overview);
-		gtk_widget_show (GTK_WIDGET (priv->notebook));
-	}
+	ephy_window_toggle_overview (window, overview_mode);
 
 	priv->overview_mode = overview_mode;
 



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