Mercurial > geeqie
diff src/ui_misc.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 | 04ff0df3ad2f |
children | 55166d93498d |
line wrap: on
line diff
--- 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);