Mercurial > geeqie.yaz
comparison src/ui_menu.c @ 88:2099ee3f9a8d
Fri Oct 27 19:45:32 2006 John Ellis <johne@verizon.net>
* layout.c, ui_menu.c, ui_misc.c: Use g_object_ref_sink when
gtk_object_sink is not available as it is deprecated.
author | gqview |
---|---|
date | Sat, 28 Oct 2006 00:03:15 +0000 |
parents | d907d608745f |
children | 55166d93498d |
comparison
equal
deleted
inserted
replaced
87:a2b0a7b0b490 | 88:2099ee3f9a8d |
---|---|
128 GtkWidget *popup_menu_short_lived(void) | 128 GtkWidget *popup_menu_short_lived(void) |
129 { | 129 { |
130 GtkWidget *menu; | 130 GtkWidget *menu; |
131 | 131 |
132 menu = gtk_menu_new(); | 132 menu = gtk_menu_new(); |
133 | |
134 /* take ownership of menu */ | |
135 #ifdef GTK_OBJECT_FLOATING | |
136 /* GTK+ < 2.10 */ | |
133 g_object_ref(G_OBJECT(menu)); | 137 g_object_ref(G_OBJECT(menu)); |
134 gtk_object_sink(GTK_OBJECT(menu)); | 138 gtk_object_sink(GTK_OBJECT(menu)); |
139 #else | |
140 /* GTK+ >= 2.10 */ | |
141 g_object_ref_sink(G_OBJECT(menu)); | |
142 #endif | |
143 | |
135 g_signal_connect(G_OBJECT(menu), "selection_done", | 144 g_signal_connect(G_OBJECT(menu), "selection_done", |
136 G_CALLBACK(popup_menu_short_lived_cb), menu); | 145 G_CALLBACK(popup_menu_short_lived_cb), menu); |
137 return menu; | 146 return menu; |
138 } | 147 } |
139 | 148 |