diff pidgin/gtksavedstatuses.c @ 26644:18543445e929

Reduce code duplication.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Thu, 23 Apr 2009 05:30:36 +0000
parents 0011cd06990a
children 5d4400b197d5
line wrap: on
line diff
--- a/pidgin/gtksavedstatuses.c	Thu Apr 23 05:08:06 2009 +0000
+++ b/pidgin/gtksavedstatuses.c	Thu Apr 23 05:30:36 2009 +0000
@@ -398,23 +398,7 @@
 static const gchar *
 get_stock_icon_from_primitive(PurpleStatusPrimitive type)
 {
-	switch (type) {
-		case PURPLE_STATUS_AVAILABLE:
-			return PIDGIN_STOCK_STATUS_AVAILABLE;
-		case PURPLE_STATUS_AWAY:
-			return PIDGIN_STOCK_STATUS_AWAY;
-		case PURPLE_STATUS_EXTENDED_AWAY:
-			return PIDGIN_STOCK_STATUS_XA;
-		case PURPLE_STATUS_INVISIBLE:
-			return PIDGIN_STOCK_STATUS_INVISIBLE;
-		case PURPLE_STATUS_OFFLINE:
-			return PIDGIN_STOCK_STATUS_OFFLINE;
-		case PURPLE_STATUS_UNAVAILABLE:
-			return PIDGIN_STOCK_STATUS_BUSY;
-		default:
-			/* this shouldn't happen */
-			return NULL;
-	}
+	return pidgin_stock_id_from_status_primitive(type);
 }
 
 static void