# HG changeset patch # User Sadrul Habib Chowdhury # Date 1157667534 0 # Node ID 847e846eb07e8882bb02b59fa18ca3273c100f83 # Parent fd45915c6988336233d8247c341e43188825f575 [gaim-migrate @ 17184] Plug a small memory-leak, and mark a string for translation. committer: Tailor Script diff -r fd45915c6988 -r 847e846eb07e gtk/gtkdialogs.c --- 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); }