changeset 13111:328e8cf2fb02

[gaim-migrate @ 15473] Are people complaining that, when selecting a saved status out of the list of popular statuses, the status box will sometimes show "Available" or "Away" or "Invisible" or "Offline" instead of showing the title+message of the saved status? This fixes that. My bad! committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Fri, 03 Feb 2006 04:26:27 +0000
parents 0e7f19583825
children f1ed04b5aa30
files src/gtkstatusbox.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkstatusbox.c	Fri Feb 03 04:04:48 2006 +0000
+++ b/src/gtkstatusbox.c	Fri Feb 03 04:26:27 2006 +0000
@@ -432,7 +432,8 @@
 	else
 	{
 		GtkTreeIter iter;
-			gpointer data;
+		GtkGaimStatusBoxItemType type;
+		gpointer data;
 
 		/* Unset the active item */
 		gtk_combo_box_set_active(GTK_COMBO_BOX(status_box), -1);
@@ -443,9 +444,11 @@
 			do
 			{
 				gtk_tree_model_get(GTK_TREE_MODEL(status_box->dropdown_store), &iter,
+							TYPE_COLUMN, &type,
 							DATA_COLUMN, &data,
 							-1);
-				if (GPOINTER_TO_INT(data) == gaim_savedstatus_get_creation_time(saved_status))
+				if ((type == GTK_GAIM_STATUS_BOX_TYPE_POPULAR) &&
+					(GPOINTER_TO_INT(data) == gaim_savedstatus_get_creation_time(saved_status)))
 				{
 					/* Found! */
 					gtk_combo_box_set_active_iter(GTK_COMBO_BOX(status_box), &iter);
@@ -1194,7 +1197,7 @@
 		/* Global */
 		/* Save the newly selected status to prefs.xml and status.xml */
 
-		/* Has the status been really changed? */
+		/* Has the status really been changed? */
 		saved_status = gaim_savedstatus_get_current();
 		if (gaim_savedstatus_get_type(saved_status) == GPOINTER_TO_INT(data))
 		{