comparison src/layout.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 0ef72a64930b
children d063f97503b7
comparison
equal deleted inserted replaced
87:a2b0a7b0b490 88:2099ee3f9a8d
255 GdkEvent *event; 255 GdkEvent *event;
256 guint32 etime; 256 guint32 etime;
257 257
258 menu = submenu_add_sort(NULL, G_CALLBACK(layout_sort_menu_cb), lw, FALSE, FALSE, TRUE, lw->sort_method); 258 menu = submenu_add_sort(NULL, G_CALLBACK(layout_sort_menu_cb), lw, FALSE, FALSE, TRUE, lw->sort_method);
259 259
260 /* apparently the menu is never sunk, even on a popup */ 260 /* take ownership of menu */
261 #ifdef GTK_OBJECT_FLOATING
262 /* GTK+ < 2.10 */
261 g_object_ref(G_OBJECT(menu)); 263 g_object_ref(G_OBJECT(menu));
262 gtk_object_sink(GTK_OBJECT(menu)); 264 gtk_object_sink(GTK_OBJECT(menu));
265 #else
266 /* GTK+ >= 2.10 */
267 g_object_ref_sink(G_OBJECT(menu));
268 #endif
263 269
264 /* ascending option */ 270 /* ascending option */
265 menu_item_add_divider(menu); 271 menu_item_add_divider(menu);
266 menu_item_add_check(menu, _("Ascending"), lw->sort_ascend, G_CALLBACK(layout_sort_menu_ascend_cb), lw); 272 menu_item_add_check(menu, _("Ascending"), lw->sort_ascend, G_CALLBACK(layout_sort_menu_ascend_cb), lw);
267 273