]> git.0d.be Git - empathy.git/commit
Fix leaked GtkMenu
authorXavier Claessens <xclaesse@gmail.com>
Wed, 10 Feb 2010 17:51:53 +0000 (18:51 +0100)
committerXavier Claessens <xclaesse@gmail.com>
Wed, 10 Feb 2010 19:14:20 +0000 (20:14 +0100)
commit41f9f0a717f8519cf8c69cb043198980fe503ebc
tree3cff33d8c48cc69a2778f27f56b15372416decba
parentddbfc6ec6a3b2ffab1f83471dbf1f82630292f8a
Fix leaked GtkMenu

GtkMenu is initially unowned, which means ref_count is 1 and floating flag is set.
gtk_menu_popup temporarily adds a ref, that will be dropped when the menu is popped
down. So once the menu is popped up, we call g_object_ref_sink() to clear the floating
flag, and g_object_unref() to drop the initial ref. Only the ref from gtk_menu_popup
stay, and the menu will be finalized when it is popped down.

Fixes bug #609567
libempathy-gtk/empathy-contact-list-view.c
libempathy-gtk/empathy-contact-menu.c
libempathy-gtk/empathy-contact-widget.c
libempathy-gtk/empathy-theme-adium.c
src/empathy-debug-window.c
src/empathy-map-view.c