Mercurial > pidgin
diff src/status.c @ 10860:d01d81de94d8
[gaim-migrate @ 12543]
sf patch #1188728, from Enix
"this patch fixes the sort by status option in HEAD so
that it actually sorts by status. Also, changes the
documenation in status.h for the
gaim_presence_compare() function so that it makes sense."
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 24 Apr 2005 18:13:16 +0000 |
parents | f93ed7f6ecc7 |
children | ffb30c2e82cb |
line wrap: on
line diff
--- a/src/status.c Sun Apr 24 17:39:11 2005 +0000 +++ b/src/status.c Sun Apr 24 18:13:16 2005 +0000 @@ -130,15 +130,15 @@ -75, /* unavailable */ -50, /* hidden */ -100, /* away */ - -200 /* extended away */ + -200, /* extended away */ -10, /* idle, special case. */ -5 /* idle time, special case. */ }; static GHashTable *buddy_presences = NULL; -#define SCORE_IDLE 5 -#define SCORE_IDLE_TIME 6 +#define SCORE_IDLE 8 +#define SCORE_IDLE_TIME 9 /************************************************************************** * GaimStatusPrimitive API @@ -1565,7 +1565,7 @@ const GaimPresence *presence2) { gboolean idle1, idle2; - size_t idle_time_1, idle_time_2; + time_t idle_time_1, idle_time_2; int score1 = 0, score2 = 0; const GList *l; @@ -1605,8 +1605,8 @@ if (idle2) score2 += primitive_scores[SCORE_IDLE]; - idle_time_1 = gaim_presence_get_idle_time(presence1); - idle_time_2 = gaim_presence_get_idle_time(presence2); + idle_time_1 = time(NULL) - gaim_presence_get_idle_time(presence1); + idle_time_2 = time(NULL) - gaim_presence_get_idle_time(presence2); if (idle_time_1 > idle_time_2) score1 += primitive_scores[SCORE_IDLE_TIME];