changeset 22651:21f1acb9090f

Patch from Maiku: "When the buddy list is set to sort contacts by status, contacts who have a tune set are scored lower than contacts who aren't, even though their status apart from that is the same." Also added more detail to the comment that was intended to prevent this ever happening. Fixes #5493 -- thanks!
author Will Thompson <will.thompson@collabora.co.uk>
date Sat, 12 Apr 2008 17:55:44 +0000
parents 0c59913dc8a0
children 37fc84e642ef
files libpurple/status.c libpurple/status.h
diffstat 2 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/status.c	Sat Apr 12 17:48:16 2008 +0000
+++ b/libpurple/status.c	Sat Apr 12 17:55:44 2008 +0000
@@ -130,14 +130,15 @@
 	-100,   /* away                     */
 	-200,   /* extended away            */
 	-400,   /* mobile                   */
+	0,      /* tune                     */
 	-10,    /* idle, special case.      */
 	-5,     /* idle time, special case. */
 	10      /* Offline messageable      */
 };
 
-#define SCORE_IDLE      8
-#define SCORE_IDLE_TIME 9
-#define SCORE_OFFLINE_MESSAGE 10
+#define SCORE_IDLE      9
+#define SCORE_IDLE_TIME 10
+#define SCORE_OFFLINE_MESSAGE 11
 
 /**************************************************************************
  * PurpleStatusPrimitive API
--- a/libpurple/status.h	Sat Apr 12 17:48:16 2008 +0000
+++ b/libpurple/status.h	Sat Apr 12 17:55:44 2008 +0000
@@ -96,7 +96,8 @@
  */
 /*
  * If you add a value to this enum, make sure you update
- * the status_primitive_map array in status.c.
+ * the status_primitive_map array in status.c and the special-cases for idle
+ * and offline-messagable just below it.
  */
 typedef enum
 {
@@ -110,7 +111,6 @@
 	PURPLE_STATUS_MOBILE,
 	PURPLE_STATUS_TUNE,
 	PURPLE_STATUS_NUM_PRIMITIVES
-
 } PurpleStatusPrimitive;
 
 #include "account.h"