changeset 31698:54ec596b599f

*** Plucked rev cc3c0e426393176ef87b207eeed1a17efc8dec7d (darkrain42@pidgin.im): *** Plucked rev ab0701cb7b693759b1163133f4bb0681cca85436 (darkrain42@pidgin.im): Sort only by op statuses (not typing or away). Also clean up the flag usage (remove some unused variables).
author Paul Aurich <paul@darkrain42.org>
date Tue, 21 Jun 2011 04:46:11 +0000
parents b3852dbd2b0e
children 5ffd5582f5fe
files ChangeLog pidgin/gtkconv.c
diffstat 2 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Jun 20 05:52:30 2011 +0000
+++ b/ChangeLog	Tue Jun 21 04:46:11 2011 +0000
@@ -3,6 +3,8 @@
 version 2.9.0 (06/23/2011):
 	Pidgin:
 	* Fix Conversation->Add on AIM and MSN.
+	* Entries in the chat user list are sorted properly again.  This was
+	  inadvertenly broken in 2.8.0.
 
 	Finch:
 	* Fixed logging in to ICQ.
--- a/pidgin/gtkconv.c	Mon Jun 20 05:52:30 2011 +0000
+++ b/pidgin/gtkconv.c	Tue Jun 21 04:46:11 2011 +0000
@@ -3991,12 +3991,12 @@
 	gboolean is_me = FALSE;
 	gboolean is_buddy;
 	gchar *tmp, *alias_key, *name, *alias;
-	int flags;
+	PurpleConvChatBuddyFlags flags;
 	GdkColor *color = NULL;
 
 	alias = cb->alias;
 	name  = cb->name;
-	flags = GPOINTER_TO_INT(cb->flags);
+	flags = cb->flags;
 
 	chat    = PURPLE_CONV_CHAT(conv);
 	gtkconv = PIDGIN_CONVERSATION(conv);
@@ -4346,6 +4346,12 @@
 	                   CHAT_USERS_WEIGHT_COLUMN, &buddy2,
 	                   -1);
 
+	/* Only sort by membership levels */
+	f1 &= PURPLE_CBFLAGS_VOICE | PURPLE_CBFLAGS_HALFOP | PURPLE_CBFLAGS_OP |
+			PURPLE_CBFLAGS_FOUNDER;
+	f2 &= PURPLE_CBFLAGS_VOICE | PURPLE_CBFLAGS_HALFOP | PURPLE_CBFLAGS_OP |
+			PURPLE_CBFLAGS_FOUNDER;
+
 	if (user1 == NULL || user2 == NULL) {
 		if (!(user1 == NULL && user2 == NULL))
 			ret = (user1 == NULL) ? -1: 1;
@@ -6152,7 +6158,6 @@
 	PurpleConvChat *chat;
 	PidginConversation *gtkconv;
 	PidginChatPane *gtkchat;
-	PurpleConvChatBuddyFlags flags;
 	PurpleConvChatBuddy *cbuddy;
 	GtkTreeIter iter;
 	GtkTreeModel *model;
@@ -6171,7 +6176,7 @@
 	while (f != 0) {
 		char *val;
 
-		gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, CHAT_USERS_NAME_COLUMN, &val, CHAT_USERS_FLAGS_COLUMN, &flags, -1);
+		gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, CHAT_USERS_NAME_COLUMN, &val, -1);
 
 		if (!purple_utf8_strcasecmp(old_name, val)) {
 			gtk_list_store_remove(GTK_LIST_STORE(model), &iter);