From: <dat...@us...> - 2006-10-04 02:32:32
|
Revision: 17425 http://svn.sourceforge.net/gaim/?rev=17425&view=rev Author: datallah Date: 2006-10-03 19:32:17 -0700 (Tue, 03 Oct 2006) Log Message: ----------- Oops, I leaked. Modified Paths: -------------- trunk/gtk/gtkstatusbox.c Modified: trunk/gtk/gtkstatusbox.c =================================================================== --- trunk/gtk/gtkstatusbox.c 2006-10-03 01:59:32 UTC (rev 17424) +++ trunk/gtk/gtkstatusbox.c 2006-10-04 02:32:17 UTC (rev 17425) @@ -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))) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |