pidgin: bb77f57b: Patch from Maiku: "When the buddy list i...

resiak at soc.pidgin.im resiak at soc.pidgin.im
Sat Apr 12 14:20:38 EDT 2008


-----------------------------------------------------------------
Revision: bb77f57be2537f36e92cbb45e72236aa8279080e
Ancestor: f04d31e96f7a749f54961a71f7a4e0aa2fc0c7ac
Author: resiak at soc.pidgin.im
Date: 2008-04-12T17:55:44
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/bb77f57be2537f36e92cbb45e72236aa8279080e

Modified files:
        libpurple/status.c libpurple/status.h

ChangeLog: 

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!

-------------- next part --------------
============================================================
--- libpurple/status.c	1dd42f0631a73961af2cdc947176a0301a3547c2
+++ libpurple/status.c	d5fad32197a4b3d45edee4cc864f9912f43b0e1a
@@ -130,14 +130,15 @@ static int primitive_scores[] =
 	-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
============================================================
--- libpurple/status.h	5d67abca2785cbe088629307e627a2d38056c530
+++ libpurple/status.h	c58271a5bf73d2787cc7245b7884c3cf967e1e0b
@@ -96,7 +96,8 @@ typedef enum
  */
 /*
  * 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 @@ typedef enum
 	PURPLE_STATUS_MOBILE,
 	PURPLE_STATUS_TUNE,
 	PURPLE_STATUS_NUM_PRIMITIVES
-
 } PurpleStatusPrimitive;
 
 #include "account.h"


More information about the Commits mailing list