[empathy] theme-adium: use empathy_context_menu_new() and remove our hack



commit b93ebf9d9f42e4de478b63b9219efcdf516e630e
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Wed Feb 16 15:10:24 2011 +0100

    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 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c
index bdc5ea5..6844f9a 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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]