From b93ebf9d9f42e4de478b63b9219efcdf516e630e Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 16 Feb 2011 15:10:24 +0100 Subject: theme-adium: use empathy_context_menu_new() and remove our hack It ensures that the popup is destroyed as soon as we're done with it. (#642461) --- libempathy-gtk/empathy-theme-adium.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'libempathy-gtk/empathy-theme-adium.c') diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c index bdc5ea556..6844f9ac2 100644 --- a/libempathy-gtk/empathy-theme-adium.c +++ b/libempathy-gtk/empathy-theme-adium.c @@ -752,7 +752,7 @@ theme_adium_context_menu_for_event (EmpathyThemeAdium *theme, GdkEventButton *ev g_object_get (G_OBJECT (hit_test_result), "context", &context, NULL); /* The menu */ - menu = gtk_menu_new (); + menu = empathy_context_menu_new (GTK_WIDGET (view)); /* Select all item */ item = gtk_image_menu_item_new_from_stock (GTK_STOCK_SELECT_ALL, NULL); @@ -813,8 +813,6 @@ theme_adium_context_menu_for_event (EmpathyThemeAdium *theme, GdkEventButton *ev gtk_widget_show_all (menu); gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, event->button, event->time); - g_object_ref_sink (menu); - g_object_unref (menu); } static gboolean -- cgit v1.2.3