soc.2008.finch: f47ed9fe: Fix a leak from the context menu.
sadrul at pidgin.im
sadrul at pidgin.im
Tue Sep 9 22:40:28 EDT 2008
-----------------------------------------------------------------
Revision: f47ed9fedd433524eda0463561073e512f1c0887
Ancestor: a4f018ff0635d7135e0dc0e15af89e3bc6f17ff7
Author: sadrul at pidgin.im
Date: 2008-09-10T02:44:53
Branch: im.pidgin.soc.2008.finch
URL: http://d.pidgin.im/viewmtn/revision/info/f47ed9fedd433524eda0463561073e512f1c0887
Modified files:
finch/libgnt/gntentry.c
ChangeLog:
Fix a leak from the context menu.
-------------- next part --------------
============================================================
--- finch/libgnt/gntentry.c 99c962c789f4554e743fe41ae6c813d1050394a4
+++ finch/libgnt/gntentry.c 82834964f091db42f1cee729233d6aed5ace99b9
@@ -1504,7 +1504,6 @@ context_menu_destroyed(GntWidget *widget
static void
context_menu_destroyed(GntWidget *widget, GntEntry *entry)
{
- /* XXX: definite possible leak */
entry->spell->context = NULL;
}
@@ -1545,11 +1544,14 @@ draw_context_menu(GntEntry *entry)
return;
entry->spell->context = context = gnt_menu_new(GNT_MENU_POPUP);
- /*
+
+#if 0
+ /* XXX: definite possible leak */
+ g_signal_connect(G_OBJECT(context), "hide", G_CALLBACK(context_menu_destroyed), entry);
+#else
g_signal_connect(G_OBJECT(context), "destroy", G_CALLBACK(context_menu_destroyed), entry);
g_signal_connect(G_OBJECT(context), "hide", G_CALLBACK(gnt_widget_destroy), NULL);
- */
- g_signal_connect(G_OBJECT(context), "hide", G_CALLBACK(context_menu_destroyed), entry);
+#endif
/* add list of suggestions */
start = get_beginning_of_prev_word(entry->cursor, entry->start);
More information about the Commits
mailing list