]> git.0d.be Git - empathy.git/commitdiff
make the type enum a named type
authorDavyd Madeley <davyd@madeley.id.au>
Fri, 10 Apr 2009 16:55:03 +0000 (16:55 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Fri, 10 Apr 2009 16:55:03 +0000 (16:55 +0000)
From: Davyd Madeley <davyd@madeley.id.au>

svn path=/trunk/; revision=2800

libempathy-gtk/empathy-presence-chooser.c

index 672cd981a5d6cb0868eb0ecff283de806f23a801..ba55af1b89f453793143dc243eb4eb46e6d5e6c7 100644 (file)
 #define FLASH_TIMEOUT 500
 
 #define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyPresenceChooser)
+typedef enum _PresenceChooserEntryType PresenceChooserEntryType;
+enum _PresenceChooserEntryType
+{
+       ENTRY_TYPE_BUILTIN,
+       ENTRY_TYPE_SAVED,
+       ENTRY_TYPE_CUSTOM,
+       ENTRY_TYPE_SEPARATOR,
+       ENTRY_TYPE_EDIT_CUSTOM,
+};
+
 typedef struct {
        EmpathyIdle *idle;
 
@@ -61,7 +71,7 @@ typedef struct {
        guint        focus_out_idle_source;
 
        McPresence   state;
-       int          previous_type;
+       PresenceChooserEntryType          previous_type;
 
        McPresence   flash_state_1;
        McPresence   flash_state_2;
@@ -135,15 +145,6 @@ enum
        N_COLUMNS
 };
 
-enum
-{
-       ENTRY_TYPE_BUILTIN,
-       ENTRY_TYPE_SAVED,
-       ENTRY_TYPE_CUSTOM,
-       ENTRY_TYPE_SEPARATOR,
-       ENTRY_TYPE_EDIT_CUSTOM,
-};
-
 static GtkTreeModel *
 presence_chooser_create_model (void)
 {
@@ -435,7 +436,7 @@ presence_chooser_changed_cb (GtkComboBox *self, gpointer user_data)
        char *icon_name;
        McPresence new_state;
        gboolean customisable = TRUE;
-       int type = -1;
+       PresenceChooserEntryType type = -1;
        GtkWidget *entry;
 
        GtkTreeModel *model = gtk_combo_box_get_model (self);
@@ -522,7 +523,7 @@ combo_row_separator_func (GtkTreeModel      *model,
                          GtkTreeIter   *iter,
                          gpointer       data)
 {
-       int type;
+       PresenceChooserEntryType type;
        gtk_tree_model_get (model, iter,
                        COL_TYPE, &type,
                        -1);