changeset 16657:ce124db89c49

merge of '1c3349794aa946963ac9bcf471c009cbe121e986' and 'f279b82f5eab776e9265471cf85d6014342d969f'
author Stu Tomlinson <stu@nosnilmot.com>
date Sun, 29 Apr 2007 18:22:07 +0000
parents 219c267639f4 (current diff) 9b41a619d2f7 (diff)
children a4a20c1fdd95 64ce75d3efd4
files
diffstat 3 files changed, 16 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/finch/gntblist.c	Sun Apr 29 18:21:20 2007 +0000
+++ b/finch/gntblist.c	Sun Apr 29 18:22:07 2007 +0000
@@ -1699,8 +1699,17 @@
 
 	newmessage = gnt_entry_get_text(GNT_ENTRY(ggblist->statustext));
 	item = gnt_combo_box_get_selected_data(GNT_COMBO_BOX(ggblist->status));
-	g_return_val_if_fail(item->type == STATUS_PRIMITIVE, FALSE);
-	newprim = item->u.prim;
+
+	switch (item->type) {
+		case STATUS_PRIMITIVE:
+			newprim = item->u.prim;
+			break;
+		case STATUS_SAVED_POPULAR:
+			newprim = purple_savedstatus_get_type(item->u.saved);
+			break;
+		default:
+			goto end;  /* 'New' or 'Saved' is selected, but this should never happen. */
+	}
 
 	if (newprim != prim || ((message && !newmessage) ||
 				(!message && newmessage) ||
@@ -1718,6 +1727,7 @@
 	}
 
 	gnt_box_give_focus_to_child(GNT_BOX(ggblist->window), ggblist->tree);
+end:
 	if (ggblist->typing)
 		g_source_remove(ggblist->typing);
 	ggblist->typing = 0;
--- a/libpurple/protocols/jabber/auth.c	Sun Apr 29 18:21:20 2007 +0000
+++ b/libpurple/protocols/jabber/auth.c	Sun Apr 29 18:22:07 2007 +0000
@@ -819,7 +819,7 @@
 		} else {
 			response = xmlnode_new("response");
 			xmlnode_set_namespace(response, "urn:ietf:params:xml:ns:xmpp-sasl");
-			if (c_out) {
+			if (clen > 0) {
 				enc_out = purple_base64_encode((unsigned char*)c_out, clen);
 				xmlnode_insert_data(response, enc_out, -1);
 				g_free(enc_out);
--- a/pidgin/gtkstatusbox.c	Sun Apr 29 18:21:20 2007 +0000
+++ b/pidgin/gtkstatusbox.c	Sun Apr 29 18:22:07 2007 +0000
@@ -1447,10 +1447,10 @@
 					size_t len = 0;
 					if (filename)
 						data = pidgin_convert_buddy_icon(plug, filename, &len);
-					img = purple_buddy_icons_set_account_icon(box->account, data, len);
-					purple_account_set_buddy_icon_path(box->account, filename);
+					img = purple_buddy_icons_set_account_icon(account, data, len);
+					purple_account_set_buddy_icon_path(account, filename);
 
-					purple_account_set_bool(box->account, "use-global-buddyicon", (filename != NULL));
+					purple_account_set_bool(account, "use-global-buddyicon", (filename != NULL));
 				}
 			}
 		}