diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-08-27 16:05:28 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-08-27 16:05:28 +0800 |
commit | 750400297f05dd45369f2bb77c7a351c4561a585 (patch) | |
tree | e6a578fb822bed6d3dd5ce751a3f25e02dc94846 | |
parent | 7c95784276fa35bb9d0c91189ebfbb8be50f6564 (diff) | |
download | gsoc2013-empathy-750400297f05dd45369f2bb77c7a351c4561a585.tar gsoc2013-empathy-750400297f05dd45369f2bb77c7a351c4561a585.tar.gz gsoc2013-empathy-750400297f05dd45369f2bb77c7a351c4561a585.tar.bz2 gsoc2013-empathy-750400297f05dd45369f2bb77c7a351c4561a585.tar.lz gsoc2013-empathy-750400297f05dd45369f2bb77c7a351c4561a585.tar.xz gsoc2013-empathy-750400297f05dd45369f2bb77c7a351c4561a585.tar.zst gsoc2013-empathy-750400297f05dd45369f2bb77c7a351c4561a585.zip |
main-window: define an enum for pages
-rw-r--r-- | 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 9cbf61811..5f9767639 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)); } } |