Mercurial > pidgin.yaz
changeset 14676:beabf64760e8
[gaim-migrate @ 17425]
Oops, I leaked.
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Wed, 04 Oct 2006 02:32:17 +0000 |
parents | 44fb5200c7bb |
children | e7aaf5b71eb7 |
files | gtk/gtkstatusbox.c |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/gtk/gtkstatusbox.c Tue Oct 03 01:59:32 2006 +0000 +++ b/gtk/gtkstatusbox.c Wed Oct 04 02:32:17 2006 +0000 @@ -712,7 +712,6 @@ GtkTreeIter iter; GtkGaimStatusBoxItemType type; gpointer data; - const char *name; /* Unset the active item */ gtk_combo_box_set_active(GTK_COMBO_BOX(status_box), -1); @@ -724,21 +723,27 @@ { gtk_tree_model_get(GTK_TREE_MODEL(status_box->dropdown_store), &iter, TYPE_COLUMN, &type, - TEXT_COLUMN, &name, DATA_COLUMN, &data, -1); if (status_box->token_status_account && gaim_savedstatus_is_transient(saved_status) && type == GTK_GAIM_STATUS_BOX_TYPE_PRIMITIVE && primitive == GPOINTER_TO_INT(data)) { + char *name; const char *acct_status_name = gaim_status_get_name( gaim_account_get_active_status(status_box->token_status_account)); + + gtk_tree_model_get(GTK_TREE_MODEL(status_box->dropdown_store), &iter, + TEXT_COLUMN, &name, -1); + if (!gaim_savedstatus_has_substatuses(saved_status) || !strcmp(name, acct_status_name)) { /* Found! */ gtk_combo_box_set_active_iter(GTK_COMBO_BOX(status_box), &iter); + g_free(name); break; } + g_free(name); } else if ((type == GTK_GAIM_STATUS_BOX_TYPE_POPULAR) && (GPOINTER_TO_INT(data) == gaim_savedstatus_get_creation_time(saved_status)))