From e155641d454e11c9667f0c299158e509b702f984 Mon Sep 17 00:00:00 2001 From: monsta Date: Thu, 14 Jan 2016 16:17:43 +0300 Subject: [GTK+3] appearance: fix a few deprecations --- capplets/appearance/appearance-desktop.c | 4 ++++ capplets/appearance/appearance-main.c | 6 ++++++ 2 files changed, 10 insertions(+) (limited to 'capplets') diff --git a/capplets/appearance/appearance-desktop.c b/capplets/appearance/appearance-desktop.c index 18c9e72f..385249b3 100644 --- a/capplets/appearance/appearance-desktop.c +++ b/capplets/appearance/appearance-desktop.c @@ -713,7 +713,11 @@ wp_drag_received (GtkWidget *widget, cursor = gdk_cursor_new_for_display (gdk_display_get_default (), GDK_WATCH); gdk_window_set_cursor (window, cursor); +#if GTK_CHECK_VERSION (3, 0, 0) + g_object_unref (cursor); +#else gdk_cursor_unref (cursor); +#endif for (uri = uris; *uri; ++uri) { diff --git a/capplets/appearance/appearance-main.c b/capplets/appearance/appearance-main.c index b51591e9..4b2aae4d 100644 --- a/capplets/appearance/appearance-main.c +++ b/capplets/appearance/appearance-main.c @@ -40,8 +40,11 @@ init_appearance_data (int *argc, char ***argv, GOptionContext *context) GtkBuilder *ui; GError *err = NULL; +#if !GTK_CHECK_VERSION (3, 0, 0) gdk_threads_init (); gdk_threads_enter (); +#endif + theme_thumbnail_factory_init (*argc, *argv); capplet_init (context, argc, argv); activate_settings_daemon (); @@ -236,7 +239,10 @@ main (int argc, char **argv) /* start the mainloop */ gtk_main (); + +#if !GTK_CHECK_VERSION (3, 0, 0) gdk_threads_leave (); +#endif /* free stuff */ g_free (data); -- cgit v1.2.1