# HG changeset patch # User gqview # Date 1161993795 0 # Node ID 2099ee3f9a8d7c034a1a2fdc8d9c79ca3b2231be # Parent a2b0a7b0b490d1aa6e5b80b3c37f7595f111b753 Fri Oct 27 19:45:32 2006 John Ellis * layout.c, ui_menu.c, ui_misc.c: Use g_object_ref_sink when gtk_object_sink is not available as it is deprecated. diff -r a2b0a7b0b490 -r 2099ee3f9a8d ChangeLog --- a/ChangeLog Wed Oct 25 19:23:46 2006 +0000 +++ b/ChangeLog Sat Oct 28 00:03:15 2006 +0000 @@ -1,3 +1,8 @@ +Fri Oct 27 19:45:32 2006 John Ellis + + * layout.c, ui_menu.c, ui_misc.c: Use g_object_ref_sink when + gtk_object_sink is not available as it is deprecated. + Wed Oct 25 15:17:38 2006 John Ellis * pixbuf-renderer.c (pixbuf_renderer_scroll): Fix long standing bug diff -r a2b0a7b0b490 -r 2099ee3f9a8d TODO --- a/TODO Wed Oct 25 19:23:46 2006 +0000 +++ b/TODO Sat Oct 28 00:03:15 2006 +0000 @@ -99,6 +99,8 @@ Minor (non blockers): ---------------------------------------------- + > update icon used for window to the (not so) new icon + d> allow multiple command line dirs to work as expected (ie contents of each are treated as given on command line) diff -r a2b0a7b0b490 -r 2099ee3f9a8d src/layout.c --- a/src/layout.c Wed Oct 25 19:23:46 2006 +0000 +++ b/src/layout.c Sat Oct 28 00:03:15 2006 +0000 @@ -257,9 +257,15 @@ menu = submenu_add_sort(NULL, G_CALLBACK(layout_sort_menu_cb), lw, FALSE, FALSE, TRUE, lw->sort_method); - /* apparently the menu is never sunk, even on a popup */ + /* take ownership of menu */ +#ifdef GTK_OBJECT_FLOATING + /* GTK+ < 2.10 */ g_object_ref(G_OBJECT(menu)); gtk_object_sink(GTK_OBJECT(menu)); +#else + /* GTK+ >= 2.10 */ + g_object_ref_sink(G_OBJECT(menu)); +#endif /* ascending option */ menu_item_add_divider(menu); diff -r a2b0a7b0b490 -r 2099ee3f9a8d src/ui_menu.c --- a/src/ui_menu.c Wed Oct 25 19:23:46 2006 +0000 +++ b/src/ui_menu.c Sat Oct 28 00:03:15 2006 +0000 @@ -130,8 +130,17 @@ GtkWidget *menu; menu = gtk_menu_new(); + + /* take ownership of menu */ +#ifdef GTK_OBJECT_FLOATING + /* GTK+ < 2.10 */ g_object_ref(G_OBJECT(menu)); gtk_object_sink(GTK_OBJECT(menu)); +#else + /* GTK+ >= 2.10 */ + g_object_ref_sink(G_OBJECT(menu)); +#endif + g_signal_connect(G_OBJECT(menu), "selection_done", G_CALLBACK(popup_menu_short_lived_cb), menu); return menu; diff -r a2b0a7b0b490 -r 2099ee3f9a8d src/ui_misc.c --- a/src/ui_misc.c Wed Oct 25 19:23:46 2006 +0000 +++ b/src/ui_misc.c Sat Oct 28 00:03:15 2006 +0000 @@ -738,8 +738,17 @@ } tips = gtk_tooltips_new(); + + /* take ownership of tooltips */ +#ifdef GTK_OBJECT_FLOATING + /* GTK+ < 2.10 */ g_object_ref(G_OBJECT(tips)); - gtk_object_sink(GTK_OBJECT(tips)); + gtk_object_sink(GTK_OBJECT(tips)); +#else + /* GTK+ >= 2.10 */ + g_object_ref_sink(G_OBJECT(tips)); +#endif + g_object_set_data(G_OBJECT(tbar), "tooltips", tips); g_signal_connect(G_OBJECT(tbar), "destroy", G_CALLBACK(pref_toolbar_destroy_cb), tips);