Mercurial > pidgin
comparison src/gtkstatusbox.c @ 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 | 44a4bd35cc97 |
children | e2a94ab60a7e |
comparison
equal
deleted
inserted
replaced
13110:0e7f19583825 | 13111:328e8cf2fb02 |
---|---|
430 gtk_combo_box_set_active(GTK_COMBO_BOX(status_box), index); | 430 gtk_combo_box_set_active(GTK_COMBO_BOX(status_box), index); |
431 } | 431 } |
432 else | 432 else |
433 { | 433 { |
434 GtkTreeIter iter; | 434 GtkTreeIter iter; |
435 gpointer data; | 435 GtkGaimStatusBoxItemType type; |
436 gpointer data; | |
436 | 437 |
437 /* Unset the active item */ | 438 /* Unset the active item */ |
438 gtk_combo_box_set_active(GTK_COMBO_BOX(status_box), -1); | 439 gtk_combo_box_set_active(GTK_COMBO_BOX(status_box), -1); |
439 | 440 |
440 /* If this saved status is in the list store, then set it as the active item */ | 441 /* If this saved status is in the list store, then set it as the active item */ |
441 if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(status_box->dropdown_store), &iter)) | 442 if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(status_box->dropdown_store), &iter)) |
442 { | 443 { |
443 do | 444 do |
444 { | 445 { |
445 gtk_tree_model_get(GTK_TREE_MODEL(status_box->dropdown_store), &iter, | 446 gtk_tree_model_get(GTK_TREE_MODEL(status_box->dropdown_store), &iter, |
447 TYPE_COLUMN, &type, | |
446 DATA_COLUMN, &data, | 448 DATA_COLUMN, &data, |
447 -1); | 449 -1); |
448 if (GPOINTER_TO_INT(data) == gaim_savedstatus_get_creation_time(saved_status)) | 450 if ((type == GTK_GAIM_STATUS_BOX_TYPE_POPULAR) && |
451 (GPOINTER_TO_INT(data) == gaim_savedstatus_get_creation_time(saved_status))) | |
449 { | 452 { |
450 /* Found! */ | 453 /* Found! */ |
451 gtk_combo_box_set_active_iter(GTK_COMBO_BOX(status_box), &iter); | 454 gtk_combo_box_set_active_iter(GTK_COMBO_BOX(status_box), &iter); |
452 break; | 455 break; |
453 } | 456 } |
1192 | 1195 |
1193 if (status_box->account == NULL) { | 1196 if (status_box->account == NULL) { |
1194 /* Global */ | 1197 /* Global */ |
1195 /* Save the newly selected status to prefs.xml and status.xml */ | 1198 /* Save the newly selected status to prefs.xml and status.xml */ |
1196 | 1199 |
1197 /* Has the status been really changed? */ | 1200 /* Has the status really been changed? */ |
1198 saved_status = gaim_savedstatus_get_current(); | 1201 saved_status = gaim_savedstatus_get_current(); |
1199 if (gaim_savedstatus_get_type(saved_status) == GPOINTER_TO_INT(data)) | 1202 if (gaim_savedstatus_get_type(saved_status) == GPOINTER_TO_INT(data)) |
1200 { | 1203 { |
1201 if (!message_changed(gaim_savedstatus_get_message(saved_status), message)) | 1204 if (!message_changed(gaim_savedstatus_get_message(saved_status), message)) |
1202 changed = FALSE; | 1205 changed = FALSE; |