[empathy: 3/4] main-window: define an enum for pages



commit 750400297f05dd45369f2bb77c7a351c4561a585
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Fri Aug 27 10:05:28 2010 +0200

    main-window: define an enum for pages

 src/empathy-main-window.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index 9cbf618..5f97676 100644
--- a/src/empathy-main-window.c
+++ b/src/empathy-main-window.c
@@ -91,6 +91,11 @@
 /* Name in the geometry file */
 #define GEOMETRY_NAME "main-window"
 
+enum {
+	PAGE_NO_MATCH = 0,
+	PAGE_CONTACT_LIST
+};
+
 G_DEFINE_TYPE (EmpathyMainWindow, empathy_main_window, GTK_TYPE_WINDOW);
 
 #define GET_PRIV(self) ((EmpathyMainWindowPriv *)((EmpathyMainWindow *) self)->priv)
@@ -381,8 +386,7 @@ main_window_row_deleted_cb (GtkTreeModel      *model,
 			g_free (tmp);
 
 			gtk_notebook_set_current_page (
-					GTK_NOTEBOOK (priv->notebook),
-					0);
+					GTK_NOTEBOOK (priv->notebook), PAGE_NO_MATCH);
 		}
 	}
 }
@@ -398,7 +402,7 @@ main_window_row_inserted_cb (GtkTreeModel      *model,
 	if (priv->empty) {
 		priv->empty = FALSE;
 		gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook),
-				1);
+				PAGE_CONTACT_LIST);
 		gtk_widget_grab_focus (GTK_WIDGET (priv->individual_view));
 	}
 }



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