darktable/darktable-fix-deprecation.patch
Stephan Kulow 3b0c2dcd65 Accepting request 107400 from graphics
- Add darktable-fix-deprecation.patch to fix glib deprecation. (forwarded request 107399 from fcrozat)

OBS-URL: https://build.opensuse.org/request/show/107400
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/darktable?expand=0&rev=10
2012-02-29 13:06:13 +00:00

47 lines
1.7 KiB
Diff

From 2449428b79acb5313f316095e757a19573bf473e Mon Sep 17 00:00:00 2001
From: johannes hanika <hanatos@gmail.com>
Date: Tue, 7 Feb 2012 21:26:53 +1300
Subject: [PATCH] tried to work around g_thread_init() deprecation.
---
src/common/pwstorage/backend_kwallet.c | 4 ++++
src/gui/gtk.c | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
Index: darktable-0.9.3/src/common/pwstorage/backend_kwallet.c
===================================================================
--- darktable-0.9.3.orig/src/common/pwstorage/backend_kwallet.c
+++ darktable-0.9.3/src/common/pwstorage/backend_kwallet.c
@@ -201,10 +201,14 @@ const backend_kwallet_context_t* dt_pwst
// NULL the context
memset(_context, 0, sizeof(backend_kwallet_context_t));
+#if GLIB_MAJOR_VERSION <= 2
+#if GLIB_MINOR_VERSION < 31
// Initialize threading in dbus-glib - it should be fine for
// dbus_g_thread_init to be called multiple times.
if (!g_thread_supported())
g_thread_init(NULL);
+#endif
+#endif
dbus_g_thread_init();
GError* error = NULL;
Index: darktable-0.9.3/src/gui/gtk.c
===================================================================
--- darktable-0.9.3.orig/src/gui/gtk.c
+++ darktable-0.9.3/src/gui/gtk.c
@@ -1211,8 +1211,12 @@ dt_gui_gtk_init(dt_gui_gtk_t *gui, int a
memset(gui->snapshot, 0, sizeof(gui->snapshot));
for(int k=0; k<4; k++) snprintf(gui->snapshot[k].filename, 30, "/tmp/dt_snapshot_%d.png", k);
gui->presets_popup_menu = NULL;
+#if GLIB_MAJOR_VERSION <= 2
+#if GLIB_MINOR_VERSION < 31
if (!g_thread_supported ()) g_thread_init(NULL);
gdk_threads_init();
+#endif
+#endif
gdk_threads_enter();
gtk_init (&argc, &argv);