Mercurial > pidgin.yaz
changeset 14468:847e846eb07e
[gaim-migrate @ 17184]
Plug a small memory-leak, and mark a string for translation.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Thu, 07 Sep 2006 22:18:54 +0000 |
parents | fd45915c6988 |
children | ddfe82afecd8 |
files | gtk/gtkdialogs.c |
diffstat | 1 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/gtk/gtkdialogs.c Thu Sep 07 17:53:25 2006 +0000 +++ b/gtk/gtkdialogs.c Thu Sep 07 22:18:54 2006 +0000 @@ -1001,10 +1001,17 @@ } } +static void free_ggmo(struct _GaimGroupMergeObject *ggp) +{ + g_free(ggp->new_name); + g_free(ggp); +} + static void gaim_gtkdialogs_merge_groups_cb(struct _GaimGroupMergeObject *GGP) { gaim_blist_rename_group(GGP->parent, GGP->new_name); + free_ggmo(GGP); } void @@ -1017,8 +1024,8 @@ g_return_if_fail(new_name != NULL); text = g_strdup_printf( - "You are about to merge the group called %s into the group " - "called %s. Do you want to continue?", source->name, new_name); + _("You are about to merge the group called %s into the group " + "called %s. Do you want to continue?"), source->name, new_name); ggp = g_new(struct _GaimGroupMergeObject, 1); ggp->parent = source; @@ -1026,7 +1033,7 @@ gaim_request_action(source, NULL, _("Merge Groups"), text, 0, ggp, 2, _("_Merge Groups"), G_CALLBACK(gaim_gtkdialogs_merge_groups_cb), - _("Cancel"), NULL); + _("Cancel"), G_CALLBACK(free_ggmo)); g_free(text); }