Mercurial > pidgin.yaz
changeset 12237:3294e27cb54a
[gaim-migrate @ 14539]
Patch from sadrul to fix working with gtk < 2.6. Also a leak fix and a fix
for where we were double-markup-escaping things.
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sun, 27 Nov 2005 18:03:51 +0000 |
parents | 2cfd36ba0f45 |
children | 40f6334bb424 |
files | src/gtksavedstatuses.c |
diffstat | 1 files changed, 13 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtksavedstatuses.c Sun Nov 27 17:47:17 2005 +0000 +++ b/src/gtksavedstatuses.c Sun Nov 27 18:03:51 2005 +0000 @@ -287,16 +287,15 @@ GtkTreeIter *iter, gpointer user_data) { char *title; - char *title_escaped, *buf; + char *buf; gtk_tree_model_get(model, iter, STATUS_WINDOW_COLUMN_TITLE, &title, -1); - title_escaped = g_markup_escape_text(title, -1); - buf = g_strdup_printf(_("Are you sure you want to delete %s?"), title_escaped); - free(title_escaped); + buf = g_strdup_printf(_("Are you sure you want to delete %s?"), title); gaim_request_action(NULL, NULL, buf, NULL, 0, title, 2, _("Delete"), status_window_delete_confirm_cb, _("Cancel"), g_free); + g_free(title); g_free(buf); } @@ -1456,7 +1455,16 @@ void status_menu_cb(GtkComboBox *widget, void(*callback)(GaimSavedStatus*)) { - callback(gaim_savedstatus_find(gtk_combo_box_get_active_text(widget))); + GtkTreeIter iter; + gchar *title = NULL; + + if (!gtk_combo_box_get_active_iter(widget, &iter)) + return; + + gtk_tree_model_get(gtk_combo_box_get_model(widget), &iter, + STATUS_WINDOW_COLUMN_TITLE, &title, -1); + callback(gaim_savedstatus_find(title)); + g_free(title); } GtkWidget *gaim_gtk_status_menu(GaimSavedStatus *current_status, GCallback callback)