aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavyd Madeley <davyd@madeley.id.au>2009-04-11 00:55:03 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-04-11 00:55:03 +0800
commit4233989e20be2285b6f2c04f670b0d0a3a4a901a (patch)
tree54e09531d4621feb1eea6ec85a0ee7e30827e48a
parentcfb1f3113e9c98eadaf89bcb19bf66b7f5647c62 (diff)
downloadgsoc2013-empathy-4233989e20be2285b6f2c04f670b0d0a3a4a901a.tar
gsoc2013-empathy-4233989e20be2285b6f2c04f670b0d0a3a4a901a.tar.gz
gsoc2013-empathy-4233989e20be2285b6f2c04f670b0d0a3a4a901a.tar.bz2
gsoc2013-empathy-4233989e20be2285b6f2c04f670b0d0a3a4a901a.tar.lz
gsoc2013-empathy-4233989e20be2285b6f2c04f670b0d0a3a4a901a.tar.xz
gsoc2013-empathy-4233989e20be2285b6f2c04f670b0d0a3a4a901a.tar.zst
gsoc2013-empathy-4233989e20be2285b6f2c04f670b0d0a3a4a901a.zip
make the type enum a named type
From: Davyd Madeley <davyd@madeley.id.au> svn path=/trunk/; revision=2800
-rw-r--r--libempathy-gtk/empathy-presence-chooser.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/libempathy-gtk/empathy-presence-chooser.c b/libempathy-gtk/empathy-presence-chooser.c
index 672cd981a..ba55af1b8 100644
--- a/libempathy-gtk/empathy-presence-chooser.c
+++ b/libempathy-gtk/empathy-presence-chooser.c
@@ -52,6 +52,16 @@
#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);