summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Koegel <eric.koegel@gmail.com>2013-09-05 19:24:28 +0300
committerEric Koegel <eric.koegel@gmail.com>2013-09-05 19:26:07 +0300
commit6f246d057b2a83413c9506b8256704e95a0d02ce (patch)
treef651059b45584877d167a9dcc1fa83e5711e231c
parent4d68c9816f35086a1ac41e627673a39123a3b244 (diff)
downloadxfdesktop-6f246d057b2a83413c9506b8256704e95a0d02ce.tar.gz
g_thread_try_new is too new
g_thread_try_new requires glib 2.32 so add support for the old thread_create function.
-rw-r--r--settings/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/settings/main.c b/settings/main.c
index 9731b875..7a28041a 100644
--- a/settings/main.c
+++ b/settings/main.c
@@ -258,9 +258,14 @@ xfdesktop_settings_add_file_to_queue(AppearancePanel *panel, PreviewData *pdata)
/* Create the thread if it doesn't exist */
if(panel->preview_thread == NULL) {
+#if GLIB_CHECK_VERSION(2, 32, 0)
panel->preview_thread = g_thread_try_new("xfdesktop_settings_create_previews",
xfdesktop_settings_create_previews,
panel, NULL);
+#else
+ panel->preview_thread = g_thread_create(xfdesktop_settings_create_previews,
+ panel, FALSE, NULL);
+#endif
if(panel->preview_thread == NULL)
{
g_critical("Unable to create thread for image previews.");
@@ -1566,6 +1571,9 @@ main(int argc, char **argv)
xfce_textdomain(GETTEXT_PACKAGE, LOCALEDIR, "UTF-8");
+#if !GLIB_CHECK_VERSION(2, 32, 0)
+ g_thread_init(NULL);
+#endif
gdk_threads_init();
if(!gtk_init_with_args(&argc, &argv, "", option_entries, PACKAGE, &error)) {