Mercurial > pidgin
comparison src/gtkstatusbox.c @ 12659:4c50dd655c30
[gaim-migrate @ 15002]
basically the same thing as sf patch #1390269, from Kris Marsh
"There's a leak when selecting custom saved messages in
the status box. Variables title, message do not get
cleared up."
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 26 Dec 2005 05:59:24 +0000 |
parents | a74cb5952db4 |
children | f74a878b3c9d |
comparison
equal
deleted
inserted
replaced
12658:a0fd3ebcd6fa | 12659:4c50dd655c30 |
---|---|
970 GaimSavedStatus *saved_status; | 970 GaimSavedStatus *saved_status; |
971 gboolean changed = TRUE; | 971 gboolean changed = TRUE; |
972 | 972 |
973 if (!gtk_combo_box_get_active_iter(GTK_COMBO_BOX(status_box), &iter)) | 973 if (!gtk_combo_box_get_active_iter(GTK_COMBO_BOX(status_box), &iter)) |
974 return; | 974 return; |
975 | |
975 gtk_tree_model_get(GTK_TREE_MODEL(status_box->dropdown_store), &iter, | 976 gtk_tree_model_get(GTK_TREE_MODEL(status_box->dropdown_store), &iter, |
976 TYPE_COLUMN, &type, | 977 TYPE_COLUMN, &type, -1); |
977 TITLE_COLUMN, &title, -1); | |
978 message = gtk_gaim_status_box_get_message(status_box); | |
979 | |
980 if (!message || !*message) | |
981 { | |
982 gtk_widget_hide_all(status_box->vbox); | |
983 status_box->imhtml_visible = FALSE; | |
984 } | |
985 | 978 |
986 /* | 979 /* |
987 * If the currently selected status is "Custom..." or | 980 * If the currently selected status is "Custom..." or |
988 * "Saved..." then do nothing. Custom statuses are | 981 * "Saved..." then do nothing. Custom statuses are |
989 * activated elsewhere, and we update the status_box | 982 * activated elsewhere, and we update the status_box |
991 * "/core/savedstatus/current" and then calling | 984 * "/core/savedstatus/current" and then calling |
992 * update_to_reflect_current_status() | 985 * update_to_reflect_current_status() |
993 */ | 986 */ |
994 if (type >= GAIM_STATUS_NUM_PRIMITIVES) | 987 if (type >= GAIM_STATUS_NUM_PRIMITIVES) |
995 return; | 988 return; |
989 | |
990 gtk_tree_model_get(GTK_TREE_MODEL(status_box->dropdown_store), &iter, | |
991 TITLE_COLUMN, &title, -1); | |
992 | |
993 message = gtk_gaim_status_box_get_message(status_box); | |
994 if (!message || !*message) | |
995 { | |
996 gtk_widget_hide_all(status_box->vbox); | |
997 status_box->imhtml_visible = FALSE; | |
998 } | |
996 | 999 |
997 if (status_box->account) { | 1000 if (status_box->account) { |
998 gint active; | 1001 gint active; |
999 GaimStatusType *status_type; | 1002 GaimStatusType *status_type; |
1000 GaimStatus *status; | 1003 GaimStatus *status; |