changeset 16656:9b41a619d2f7

merge of '18c3386b9cf3eedcd0c991b730da936b7c6446a8' and 'f54fc4b885f42db3416534314f5a305ac7a07b8e'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 29 Apr 2007 18:04:58 +0000
parents a0a359d20d09 (current diff) 1c9835f8b29c (diff)
children ce124db89c49 df5fb079b1ad
files
diffstat 1 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/finch/gntblist.c	Sun Apr 29 17:15:45 2007 +0000
+++ b/finch/gntblist.c	Sun Apr 29 18:04:58 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;