[Xfce4-commits] [xfce/thunar] 01/01: Drop GLIB_CHECK_VERSION for <= 2.42.0
noreply at xfce.org
noreply at xfce.org
Wed Jan 1 23:21:53 CET 2020
This is an automated email from the git hooks/post-receive script.
a n d r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/thunar.
commit 1e076f676370050628051f27530c45878add98c3
Author: Andre Miranda <andreldm at xfce.org>
Date: Wed Jan 1 19:19:02 2020 -0300
Drop GLIB_CHECK_VERSION for <= 2.42.0
---
thunar/main.c | 7 -------
thunar/thunar-thumbnail-cache.c | 17 -----------------
thunar/thunar-thumbnailer.c | 18 ------------------
thunarx/thunarx-file-info.c | 9 ---------
4 files changed, 51 deletions(-)
diff --git a/thunar/main.c b/thunar/main.c
index 46888bc..c2bd5d4 100644
--- a/thunar/main.c
+++ b/thunar/main.c
@@ -73,13 +73,6 @@ main (int argc, char **argv)
thunar_preferences_xfconf_init_failed ();
}
-#ifdef HAVE_GIO_UNIX
-#if !GLIB_CHECK_VERSION (2, 42, 0)
- /* set desktop environment for app infos */
- g_desktop_app_info_set_desktop_env ("XFCE");
-#endif
-#endif
-
/* register additional transformation functions */
thunar_g_initialize_transformations ();
diff --git a/thunar/thunar-thumbnail-cache.c b/thunar/thunar-thumbnail-cache.c
index 2648310..b54719b 100644
--- a/thunar/thunar-thumbnail-cache.c
+++ b/thunar/thunar-thumbnail-cache.c
@@ -32,13 +32,8 @@
#include <thunar/thunar-thumbnail-cache.h>
#include <thunar/thunar-file.h>
-#if GLIB_CHECK_VERSION (2, 32, 0)
#define _thumbnail_cache_lock(cache) g_mutex_lock (&((cache)->lock))
#define _thumbnail_cache_unlock(cache) g_mutex_unlock (&((cache)->lock))
-#else
-#define _thumbnail_cache_lock(cache) g_mutex_lock ((cache)->lock)
-#define _thumbnail_cache_unlock(cache) g_mutex_unlock ((cache)->lock)
-#endif
@@ -79,11 +74,7 @@ struct _ThunarThumbnailCache
GList *cleanup_queue;
guint cleanup_queue_idle_id;
-#if GLIB_CHECK_VERSION (2, 32, 0)
GMutex lock;
-#else
- GMutex *lock;
-#endif
};
@@ -144,11 +135,7 @@ thunar_thumbnail_cache_finalize (GObject *object)
_thumbnail_cache_unlock (cache);
/* release the mutex itself */
-#if GLIB_CHECK_VERSION (2, 32, 0)
g_mutex_clear (&cache->lock);
-#else
- g_mutex_free (cache->lock);
-#endif
(*G_OBJECT_CLASS (thunar_thumbnail_cache_parent_class)->finalize) (object);
}
@@ -758,11 +745,7 @@ static void
thunar_thumbnail_cache_init (ThunarThumbnailCache *cache)
{
/* create a new mutex for accessing the cache from different threads */
-#if GLIB_CHECK_VERSION (2, 32, 0)
g_mutex_init (&cache->lock);
-#else
- cache->lock = g_mutex_new ();
-#endif
/* add an additional reference to keep us alive while tre proxy initializes */
g_object_ref (cache);
diff --git a/thunar/thunar-thumbnailer.c b/thunar/thunar-thumbnailer.c
index 0701d2c..cfaf2c3 100644
--- a/thunar/thunar-thumbnailer.c
+++ b/thunar/thunar-thumbnailer.c
@@ -141,15 +141,9 @@ static void thunar_thumbnailer_set_property (GObject
const GValue *value,
GParamSpec *pspec);
-#if GLIB_CHECK_VERSION (2, 32, 0)
#define _thumbnailer_lock(thumbnailer) g_mutex_lock (&((thumbnailer)->lock))
#define _thumbnailer_unlock(thumbnailer) g_mutex_unlock (&((thumbnailer)->lock))
#define _thumbnailer_trylock(thumbnailer) g_mutex_trylock (&((thumbnailer)->lock))
-#else
-#define _thumbnailer_lock(thumbnailer) g_mutex_lock ((thumbnailer)->lock)
-#define _thumbnailer_unlock(thumbnailer) g_mutex_unlock ((thumbnailer)->lock)
-#define _thumbnailer_trylock(thumbnailer) g_mutex_trylock ((thumbnailer)->lock)
-#endif
@@ -169,11 +163,7 @@ struct _ThunarThumbnailer
/* running jobs */
GSList *jobs;
-#if GLIB_CHECK_VERSION (2, 32, 0)
GMutex lock;
-#else
- GMutex *lock;
-#endif
/* cached MIME types -> URI schemes for which thumbs can be generated */
GHashTable *supported;
@@ -514,11 +504,7 @@ thunar_thumbnailer_begin_job (ThunarThumbnailer *thumbnailer,
static void
thunar_thumbnailer_init (ThunarThumbnailer *thumbnailer)
{
- #if GLIB_CHECK_VERSION (2, 32, 0)
g_mutex_init (&thumbnailer->lock);
-#else
- thumbnailer->lock = g_mutex_new ();
-#endif
/* initialize the proxies */
thunar_thumbnailer_init_thumbnailer_proxy (thumbnailer);
@@ -567,11 +553,7 @@ thunar_thumbnailer_finalize (GObject *object)
_thumbnailer_unlock (thumbnailer);
/* release the mutex */
-#if GLIB_CHECK_VERSION (2, 32, 0)
g_mutex_clear (&thumbnailer->lock);
-#else
- g_mutex_free (thumbnailer->lock);
-#endif
(*G_OBJECT_CLASS (thunar_thumbnailer_parent_class)->finalize) (object);
}
diff --git a/thunarx/thunarx-file-info.c b/thunarx/thunarx-file-info.c
index ad83206..0879ad3 100644
--- a/thunarx/thunarx-file-info.c
+++ b/thunarx/thunarx-file-info.c
@@ -426,16 +426,7 @@ thunarx_file_info_list_get_type (void)
GList*
thunarx_file_info_list_copy (GList *file_infos)
{
-#if GLIB_CHECK_VERSION (2, 34, 0)
return g_list_copy_deep (file_infos, (GCopyFunc) (void (*)(void)) g_object_ref, NULL);
-#else
- GList *copy;
-
- copy = g_list_copy (file_infos);
- g_list_foreach (copy, (GFunc) (void (*)(void)) g_object_ref, NULL);
-
- return copy;
-#endif
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list