empathy r2800 - trunk/libempathy-gtk



Author: xclaesse
Date: Fri Apr 10 16:55:03 2009
New Revision: 2800
URL: http://svn.gnome.org/viewvc/empathy?rev=2800&view=rev

Log:
make the type enum a named type

From: Davyd Madeley <davyd madeley id au>

Modified:
   trunk/libempathy-gtk/empathy-presence-chooser.c

Modified: trunk/libempathy-gtk/empathy-presence-chooser.c
==============================================================================
--- trunk/libempathy-gtk/empathy-presence-chooser.c	(original)
+++ trunk/libempathy-gtk/empathy-presence-chooser.c	Fri Apr 10 16:55:03 2009
@@ -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 @@
 	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 @@
 	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 @@
 	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 @@
 			  GtkTreeIter	*iter,
 			  gpointer	 data)
 {
-	int type;
+	PresenceChooserEntryType type;
 	gtk_tree_model_get (model, iter,
 			COL_TYPE, &type,
 			-1);



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