Author: rpmcruz Date: Sat Feb 20 01:13:32 2010 New Revision: 60903 URL: http://svn.opensuse.org/viewcvs/yast?rev=60903&view=rev Log: YGApplication::openContextMenu() was not free-ing itswidget. Modified: trunk/gtk/src/YGMenuButton.cc Modified: trunk/gtk/src/YGMenuButton.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGMenuButton.cc?rev=60903&r1=60902&r2=60903&view=diff ============================================================================== --- trunk/gtk/src/YGMenuButton.cc (original) +++ trunk/gtk/src/YGMenuButton.cc Sat Feb 20 01:13:32 2010 @@ -112,18 +112,20 @@ } // callbacks + static void deactivate_cb (GtkMenuShell *menu, YGContextMenu *pThis) + { // ugly: we need to make sure a selection was made before this callback called + g_idle_add_full (G_PRIORITY_LOW, cancel_cb, pThis, NULL); + } + static gboolean cancel_cb (gpointer data) { - if (!g_object_get_data (G_OBJECT (data), "active")) + YGContextMenu *pThis = (YGContextMenu *) data; + if (!g_object_get_data (G_OBJECT (pThis->getWidget()), "active")) YGUI::ui()->sendEvent (new YCancelEvent()); + delete pThis; return FALSE; } - static void deactivate_cb (GtkMenuShell *menu, YGContextMenu *pThis) - { // ugly: we need to make sure a selection was made before this callback called - g_idle_add_full (G_PRIORITY_LOW, cancel_cb, menu, NULL); - } - YGWIDGET_IMPL_COMMON (YContextMenu) }; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org