]> git.0d.be Git - empathy.git/commitdiff
main-window: define an enum for pages
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 27 Aug 2010 08:05:28 +0000 (10:05 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 27 Aug 2010 08:05:28 +0000 (10:05 +0200)
src/empathy-main-window.c

index 9cbf6181128b55fceed5adaea1acd46987399189..5f9767639c47d08b75afb7ba3608001e3b31d659 100644 (file)
 /* 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));
        }
 }