diff options
Diffstat (limited to 'libcaja-private')
25 files changed, 26 insertions, 204 deletions
diff --git a/libcaja-private/caja-autorun.c b/libcaja-private/caja-autorun.c index 5c7bfec8..eaaea4c6 100644 --- a/libcaja-private/caja-autorun.c +++ b/libcaja-private/caja-autorun.c @@ -43,8 +43,6 @@ #include "caja-desktop-icon-file.h" #include "caja-file-utilities.h" -#include <src/glibcompat.h> /* for g_list_free_full */ - enum { AUTORUN_ASK, diff --git a/libcaja-private/caja-clipboard.c b/libcaja-private/caja-clipboard.c index ab0b7987..87d390be 100644 --- a/libcaja-private/caja-clipboard.c +++ b/libcaja-private/caja-clipboard.c @@ -35,8 +35,6 @@ #include <gtk/gtk.h> #include <string.h> -#include <src/glibcompat.h> /* for g_list_free_full */ - typedef struct _TargetCallbackData TargetCallbackData; typedef void (* SelectAllCallback) (gpointer target); diff --git a/libcaja-private/caja-customization-data.c b/libcaja-private/caja-customization-data.c index a1019301..c88871a9 100644 --- a/libcaja-private/caja-customization-data.c +++ b/libcaja-private/caja-customization-data.c @@ -23,7 +23,7 @@ */ /* caja-customization-data.c - functions to collect and load customization - names and imges */ + names and images */ #include <config.h> #include "caja-customization-data.h" @@ -43,8 +43,6 @@ #include <stdlib.h> #include <string.h> -#include <src/glibcompat.h> /* for g_list_free_full */ - typedef enum { READ_PUBLIC_CUSTOMIZATIONS, diff --git a/libcaja-private/caja-debug-log.c b/libcaja-private/caja-debug-log.c index 446df48e..19462d34 100644 --- a/libcaja-private/caja-debug-log.c +++ b/libcaja-private/caja-debug-log.c @@ -30,8 +30,6 @@ #include "caja-debug-log.h" #include "caja-file.h" -#include <src/glibcompat.h> /* for g_list_free_full */ - #define DEFAULT_RING_BUFFER_NUM_LINES 1000 #define KEY_FILE_GROUP "debug log" @@ -40,11 +38,7 @@ #define MAX_URI_COUNT 20 -#if GLIB_CHECK_VERSION(2, 31, 0) static GMutex log_mutex; -#else -static GStaticMutex log_mutex = G_STATIC_MUTEX_INIT; -#endif static GHashTable *domains_hash; static char **ring_buffer; @@ -58,21 +52,13 @@ static GSList *milestones_tail; static void lock (void) { - #if GLIB_CHECK_VERSION(2, 31, 0) g_mutex_lock (&log_mutex); - #else - g_static_mutex_lock (&log_mutex); - #endif } static void unlock (void) { - #if GLIB_CHECK_VERSION(2, 31, 0) g_mutex_unlock (&log_mutex); - #else - g_static_mutex_unlock (&log_mutex); - #endif } void diff --git a/libcaja-private/caja-directory-async.c b/libcaja-private/caja-directory-async.c index d5d97cf0..a795c161 100644 --- a/libcaja-private/caja-directory-async.c +++ b/libcaja-private/caja-directory-async.c @@ -39,8 +39,6 @@ #include <stdio.h> #include <stdlib.h> -#include <src/glibcompat.h> /* for g_list_free_full */ - /* turn this on to see messages about each load_directory call: */ #if 0 #define DEBUG_LOAD_DIRECTORY diff --git a/libcaja-private/caja-directory.c b/libcaja-private/caja-directory.c index a7c5d5a5..ba8d7d97 100644 --- a/libcaja-private/caja-directory.c +++ b/libcaja-private/caja-directory.c @@ -40,8 +40,6 @@ #include <gtk/gtk.h> #include <string.h> -#include <src/glibcompat.h> /* for g_list_free_full */ - enum { FILES_ADDED, diff --git a/libcaja-private/caja-dnd.c b/libcaja-private/caja-dnd.c index 792b3e79..9cfbcbc5 100644 --- a/libcaja-private/caja-dnd.c +++ b/libcaja-private/caja-dnd.c @@ -44,8 +44,6 @@ #include <stdio.h> #include <string.h> -#include <src/glibcompat.h> /* for g_list_free_full */ - /* a set of defines stolen from the eel-icon-dnd.c file. * These are in microseconds. */ diff --git a/libcaja-private/caja-emblem-utils.c b/libcaja-private/caja-emblem-utils.c index 951887aa..2f4aa054 100644 --- a/libcaja-private/caja-emblem-utils.c +++ b/libcaja-private/caja-emblem-utils.c @@ -43,8 +43,6 @@ #include "caja-file.h" #include "caja-emblem-utils.h" -#include <src/glibcompat.h> /* for g_list_free_full */ - #define EMBLEM_NAME_TRASH "emblem-trash" #define EMBLEM_NAME_SYMLINK "emblem-symbolic-link" #define EMBLEM_NAME_NOREAD "emblem-noread" diff --git a/libcaja-private/caja-file-changes-queue.c b/libcaja-private/caja-file-changes-queue.c index 127de7ed..8b60d63a 100644 --- a/libcaja-private/caja-file-changes-queue.c +++ b/libcaja-private/caja-file-changes-queue.c @@ -25,8 +25,6 @@ #include "caja-directory-notify.h" -#include <src/glibcompat.h> /* for g_list_free_full */ - #ifdef G_THREADS_ENABLED #define MUTEX_LOCK(a) if ((a) != NULL) g_mutex_lock (a) #define MUTEX_UNLOCK(a) if ((a) != NULL) g_mutex_unlock (a) @@ -60,11 +58,7 @@ typedef struct GList *head; GList *tail; #ifdef G_THREADS_ENABLED -# if GLIB_CHECK_VERSION(2, 32, 0) GMutex mutex; -# else - GMutex *mutex; -# endif #endif } CajaFileChangesQueue; @@ -76,11 +70,7 @@ caja_file_changes_queue_new (void) result = g_new0 (CajaFileChangesQueue, 1); #ifdef G_THREADS_ENABLED -# if GLIB_CHECK_VERSION(2, 32, 0) g_mutex_init (&result->mutex); -# else - result->mutex = g_mutex_new (); -# endif #endif return result; } @@ -135,11 +125,7 @@ caja_file_changes_queue_free (CajaFileChangesQueue *queue) g_list_free (queue->head); #ifdef G_THREADS_ENABLED -# if GLIB_CHECK_VERSION(2, 32, 0) g_mutex_clear (&queue->mutex); -# else - g_mutex_free (queue->mutex); -# endif #endif g_free (queue); } @@ -151,21 +137,13 @@ caja_file_changes_queue_add_common (CajaFileChangesQueue *queue, CajaFileChange *new_item) { /* enqueue the new queue item while locking down the list */ -#if GLIB_CHECK_VERSION(2, 32, 0) MUTEX_LOCK (&queue->mutex); -#else - MUTEX_LOCK (queue->mutex); -#endif queue->head = g_list_prepend (queue->head, new_item); if (queue->tail == NULL) queue->tail = queue->head; -#if GLIB_CHECK_VERSION(2, 32, 0) MUTEX_UNLOCK (&queue->mutex); -#else - MUTEX_UNLOCK (queue->mutex); -#endif } void @@ -267,11 +245,7 @@ caja_file_changes_queue_get_change (CajaFileChangesQueue *queue) g_assert (queue != NULL); /* dequeue the tail item while locking down the list */ -#if GLIB_CHECK_VERSION (2, 32, 0) MUTEX_LOCK (&queue->mutex); -#else - MUTEX_LOCK (queue->mutex); -#endif if (queue->tail == NULL) { @@ -287,11 +261,7 @@ caja_file_changes_queue_get_change (CajaFileChangesQueue *queue) queue->tail = new_tail; } -#if GLIB_CHECK_VERSION (2, 32, 0) MUTEX_UNLOCK (&queue->mutex); -#else - MUTEX_UNLOCK (queue->mutex); -#endif return result; } diff --git a/libcaja-private/caja-file-dnd.c b/libcaja-private/caja-file-dnd.c index 5e1beec5..061019e9 100644 --- a/libcaja-private/caja-file-dnd.c +++ b/libcaja-private/caja-file-dnd.c @@ -32,8 +32,6 @@ #include "caja-file-utilities.h" #include <string.h> -#include <src/glibcompat.h> /* for g_list_free_full */ - static gboolean caja_drag_can_accept_files (CajaFile *drop_target_item) { diff --git a/libcaja-private/caja-file-operations.c b/libcaja-private/caja-file-operations.c index e410e41f..e310de1f 100644 --- a/libcaja-private/caja-file-operations.c +++ b/libcaja-private/caja-file-operations.c @@ -68,8 +68,6 @@ #include "caja-file-conflict-dialog.h" #include "caja-undostack-manager.h" -#include <src/glibcompat.h> /* for g_list_free_full */ - /* TODO: TESTING!!! */ typedef struct { @@ -851,14 +849,10 @@ custom_size_to_string (char *format, va_list va) size = va_arg (va, goffset); - #if GLIB_CHECK_VERSION(2, 30, 0) - if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_USE_IEC_UNITS)) - return g_format_size_full (size, G_FORMAT_SIZE_IEC_UNITS); - else - return g_format_size(size); - #else - return g_format_size_for_display(size); - #endif + if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_USE_IEC_UNITS)) + return g_format_size_full (size, G_FORMAT_SIZE_IEC_UNITS); + else + return g_format_size(size); } static void diff --git a/libcaja-private/caja-file-utilities.c b/libcaja-private/caja-file-utilities.c index dd8b449c..51083122 100644 --- a/libcaja-private/caja-file-utilities.c +++ b/libcaja-private/caja-file-utilities.c @@ -43,8 +43,6 @@ #include <unistd.h> #include <stdlib.h> -#include <src/glibcompat.h> /* for g_list_free_full */ - #define CAJA_USER_DIRECTORY_NAME ".config/caja" #define DEFAULT_CAJA_DIRECTORY_MODE (0755) diff --git a/libcaja-private/caja-file.c b/libcaja-private/caja-file.c index d41c2b45..2e3ad466 100644 --- a/libcaja-private/caja-file.c +++ b/libcaja-private/caja-file.c @@ -72,8 +72,6 @@ #include <unistd.h> #include <sys/stat.h> -#include <src/glibcompat.h> /* for g_list_free_full */ - #ifdef HAVE_SELINUX #include <selinux/selinux.h> #endif @@ -5958,14 +5956,10 @@ caja_file_get_size_as_string (CajaFile *file) return NULL; } - #if GLIB_CHECK_VERSION(2, 30, 0) - if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_USE_IEC_UNITS)) - return g_format_size_full (file->details->size, G_FORMAT_SIZE_IEC_UNITS); - else - return g_format_size (file->details->size); - #else // Since 2.16 - return g_format_size_for_display(file->details->size); - #endif + if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_USE_IEC_UNITS)) + return g_format_size_full (file->details->size, G_FORMAT_SIZE_IEC_UNITS); + else + return g_format_size (file->details->size); } /** @@ -5985,8 +5979,8 @@ caja_file_get_size_as_string_with_real_size (CajaFile *file) { guint item_count; gboolean count_unreadable; - char * formated; - char * formated_plus_real; + char * formatted; + char * formatted_plus_real; char * real_size; if (file == NULL) { @@ -6006,21 +6000,17 @@ caja_file_get_size_as_string_with_real_size (CajaFile *file) return NULL; } - #if GLIB_CHECK_VERSION(2, 30, 0) - if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_USE_IEC_UNITS)) - formated = g_format_size_full (file->details->size, G_FORMAT_SIZE_IEC_UNITS); - else - formated = g_format_size(file->details->size); - #else - formated = g_format_size_for_display(file->details->size); - #endif + if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_USE_IEC_UNITS)) + formatted = g_format_size_full (file->details->size, G_FORMAT_SIZE_IEC_UNITS); + else + formatted = g_format_size(file->details->size); /* Do this in a separate stage so that we don't have to put G_GUINT64_FORMAT in the translated string */ real_size = g_strdup_printf (_("%"G_GUINT64_FORMAT), (guint64) file->details->size); - formated_plus_real = g_strdup_printf (_("%s (%s bytes)"), formated, real_size); + formatted_plus_real = g_strdup_printf (_("%s (%s bytes)"), formatted, real_size); g_free (real_size); - g_free (formated); - return formated_plus_real; + g_free (formatted); + return formatted_plus_real; } @@ -6081,14 +6071,10 @@ caja_file_get_deep_count_as_string_internal (CajaFile *file, */ if (report_size) { - #if GLIB_CHECK_VERSION(2, 30, 0) - if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_USE_IEC_UNITS)) - return g_format_size_full (total_size, G_FORMAT_SIZE_IEC_UNITS); - else - return g_format_size(total_size); - #else - return g_format_size_for_display(total_size); - #endif + if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_USE_IEC_UNITS)) + return g_format_size_full (total_size, G_FORMAT_SIZE_IEC_UNITS); + else + return g_format_size(total_size); } return format_item_count_for_display (report_directory_count @@ -6899,14 +6885,10 @@ caja_file_get_volume_free_space (CajaFile *file) if (directory->details->free_space != (guint64) -1) { - #if GLIB_CHECK_VERSION(2, 30, 0) - if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_USE_IEC_UNITS)) - res = g_format_size_full (directory->details->free_space, G_FORMAT_SIZE_IEC_UNITS); - else - res = g_format_size(directory->details->free_space); - #else - res = g_format_size_for_display(directory->details->free_space); - #endif + if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_USE_IEC_UNITS)) + res = g_format_size_full (directory->details->free_space, G_FORMAT_SIZE_IEC_UNITS); + else + res = g_format_size(directory->details->free_space); } return res; diff --git a/libcaja-private/caja-icon-canvas-item.c b/libcaja-private/caja-icon-canvas-item.c index 58ff44fa..fe44b9b2 100644 --- a/libcaja-private/caja-icon-canvas-item.c +++ b/libcaja-private/caja-icon-canvas-item.c @@ -50,8 +50,6 @@ #include <stdio.h> #include <string.h> -#include <src/glibcompat.h> /* for g_list_free_full */ - #define EMBLEM_SPACING 2 /* gap between bottom of icon and start of text box */ diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c index 50cc76f2..5db10601 100644 --- a/libcaja-private/caja-icon-container.c +++ b/libcaja-private/caja-icon-container.c @@ -52,8 +52,6 @@ #include <stdio.h> #include <string.h> -#include <src/glibcompat.h> /* for g_list_free_full */ - #if !GTK_CHECK_VERSION(3, 0, 0) #define gtk_scrollable_get_hadjustment gtk_layout_get_hadjustment #define gtk_scrollable_get_vadjustment gtk_layout_get_vadjustment diff --git a/libcaja-private/caja-merged-directory.c b/libcaja-private/caja-merged-directory.c index 7c0aaa73..2c8d825d 100644 --- a/libcaja-private/caja-merged-directory.c +++ b/libcaja-private/caja-merged-directory.c @@ -33,8 +33,6 @@ #include <eel/eel-gtk-macros.h> #include <gtk/gtk.h> -#include <src/glibcompat.h> /* for g_list_free_full */ - struct CajaMergedDirectoryDetails { GList *directories; diff --git a/libcaja-private/caja-mime-actions.c b/libcaja-private/caja-mime-actions.c index bbcc6f4d..2a303f72 100644 --- a/libcaja-private/caja-mime-actions.c +++ b/libcaja-private/caja-mime-actions.c @@ -44,8 +44,6 @@ #include "caja-debug-log.h" #include "caja-open-with-dialog.h" -#include <src/glibcompat.h> /* for g_list_free_full */ - typedef enum { ACTIVATION_ACTION_LAUNCH_DESKTOP_FILE, diff --git a/libcaja-private/caja-mime-application-chooser.c b/libcaja-private/caja-mime-application-chooser.c index 21c56c1a..c989bad1 100644 --- a/libcaja-private/caja-mime-application-chooser.c +++ b/libcaja-private/caja-mime-application-chooser.c @@ -39,8 +39,6 @@ #include <gtk/gtk.h> #include <gio/gio.h> -#include <src/glibcompat.h> /* for g_list_free_full */ - struct _CajaMimeApplicationChooserDetails { char *uri; diff --git a/libcaja-private/caja-open-with-dialog.c b/libcaja-private/caja-open-with-dialog.c index 0d7a4537..0d0e6e28 100644 --- a/libcaja-private/caja-open-with-dialog.c +++ b/libcaja-private/caja-open-with-dialog.c @@ -36,8 +36,6 @@ #include <gtk/gtk.h> #include <gio/gio.h> -#include <src/glibcompat.h> /* for g_list_free_full */ - #define sure_string(s) ((const char *)((s)!=NULL?(s):"")) #define DESKTOP_ENTRY_GROUP "Desktop Entry" diff --git a/libcaja-private/caja-program-choosing.c b/libcaja-private/caja-program-choosing.c index 8958119a..8ac87f0b 100644 --- a/libcaja-private/caja-program-choosing.c +++ b/libcaja-private/caja-program-choosing.c @@ -42,8 +42,6 @@ #include <gdk/gdk.h> #include <gdk/gdkx.h> -#include <src/glibcompat.h> /* for g_list_free_full */ - /** * application_cannot_open_location * diff --git a/libcaja-private/caja-query.c b/libcaja-private/caja-query.c index 4b38d830..e0359a04 100644 --- a/libcaja-private/caja-query.c +++ b/libcaja-private/caja-query.c @@ -30,8 +30,6 @@ #include <glib/gi18n.h> #include <libcaja-private/caja-file-utilities.h> -#include <src/glibcompat.h> /* for g_list_free_full */ - struct CajaQueryDetails { char *text; diff --git a/libcaja-private/caja-search-engine-beagle.c b/libcaja-private/caja-search-engine-beagle.c index 1b63bb28..14bbb605 100644 --- a/libcaja-private/caja-search-engine-beagle.c +++ b/libcaja-private/caja-search-engine-beagle.c @@ -27,8 +27,6 @@ #include <eel/eel-gtk-macros.h> #include <gmodule.h> -#include <src/glibcompat.h> /* for g_list_free_full */ - typedef struct _BeagleHit BeagleHit; typedef struct _BeagleQuery BeagleQuery; typedef struct _BeagleClient BeagleClient; diff --git a/libcaja-private/caja-search-engine-simple.c b/libcaja-private/caja-search-engine-simple.c index dc30dbe8..8a768e50 100644 --- a/libcaja-private/caja-search-engine-simple.c +++ b/libcaja-private/caja-search-engine-simple.c @@ -30,8 +30,6 @@ #include <eel/eel-gtk-macros.h> #include <gio/gio.h> -#include <src/glibcompat.h> /* for g_list_free_full */ - #define BATCH_SIZE 500 typedef struct diff --git a/libcaja-private/caja-search-engine-tracker.c b/libcaja-private/caja-search-engine-tracker.c index edf725c8..5f97a70e 100644 --- a/libcaja-private/caja-search-engine-tracker.c +++ b/libcaja-private/caja-search-engine-tracker.c @@ -27,8 +27,6 @@ #include <gmodule.h> #include <string.h> -#include <src/glibcompat.h> /* for g_list_free_full */ - typedef struct _TrackerClient TrackerClient; typedef enum diff --git a/libcaja-private/caja-undostack-manager.c b/libcaja-private/caja-undostack-manager.c index 16f977f3..1d988cda 100644 --- a/libcaja-private/caja-undostack-manager.c +++ b/libcaja-private/caja-undostack-manager.c @@ -34,8 +34,6 @@ #include <locale.h> #include <gdk/gdk.h> -#include <src/glibcompat.h> /* for g_list_free_full */ - /* ***************************************************************** Private fields ***************************************************************** */ @@ -100,11 +98,7 @@ struct _CajaUndoStackManagerPrivate GQueue *stack; guint undo_levels; guint index; -#if GLIB_CHECK_VERSION(2, 32, 0) GMutex mutex; /* Used to protect access to stack (because of async file ops) */ -#else - GMutex *mutex; /* Used to protect access to stack (because of async file ops) */ -#endif gboolean dispose_has_run; gboolean undo_redo_flag; gboolean confirm_delete; @@ -273,11 +267,7 @@ caja_undostack_manager_init (CajaUndoStackManager * self) /* Initialize private fields */ priv->stack = g_queue_new (); -#if GLIB_CHECK_VERSION(2, 32, 0) g_mutex_init (&priv->mutex); -#else - priv->mutex = g_mutex_new (); -#endif priv->index = 0; priv->dispose_has_run = FALSE; priv->undo_redo_flag = FALSE; @@ -293,22 +283,13 @@ caja_undostack_manager_dispose (GObject * object) if (priv->dispose_has_run) return; -#if GLIB_CHECK_VERSION(2, 32, 0) g_mutex_lock (&priv->mutex); -#else - g_mutex_lock (priv->mutex); -#endif /* Free each undoable action in the stack and the stack itself */ undostack_dispose_all (priv->stack); g_queue_free (priv->stack); -#if GLIB_CHECK_VERSION(2, 32, 0) g_mutex_unlock (&priv->mutex); g_mutex_clear (&priv->mutex); -#else - g_mutex_unlock (priv->mutex); - g_mutex_free (priv->mutex); -#endif priv->dispose_has_run = TRUE; @@ -339,17 +320,9 @@ caja_undostack_manager_set_property (GObject * object, guint prop_id, new_undo_levels = g_value_get_uint (value); if (new_undo_levels > 0 && (priv->undo_levels != new_undo_levels)) { priv->undo_levels = new_undo_levels; -#if GLIB_CHECK_VERSION(2, 32, 0) g_mutex_lock (&priv->mutex); -#else - g_mutex_lock (priv->mutex); -#endif stack_fix_size (priv); -#if GLIB_CHECK_VERSION(2, 32, 0) g_mutex_unlock (&priv->mutex); -#else - g_mutex_unlock (priv->mutex); -#endif do_menu_update (manager); } break; @@ -436,12 +409,7 @@ caja_undostack_manager_redo (CajaUndoStackManager * manager, char *puri; CajaUndoStackManagerPrivate *priv = manager->priv; -#if GLIB_CHECK_VERSION(2, 32, 0) g_mutex_lock (&priv->mutex); -#else - g_mutex_lock (priv->mutex); -#endif - CajaUndoStackActionData *action = stack_scroll_left (priv); @@ -450,12 +418,7 @@ caja_undostack_manager_redo (CajaUndoStackManager * manager, action->locked = TRUE; } -#if GLIB_CHECK_VERSION(2, 32, 0) g_mutex_unlock (&priv->mutex); -#else - g_mutex_unlock (priv->mutex); -#endif - do_menu_update (manager); @@ -585,11 +548,7 @@ caja_undostack_manager_undo (CajaUndoStackManager * manager, char *new_name; CajaUndoStackManagerPrivate *priv = manager->priv; -#if GLIB_CHECK_VERSION(2, 32, 0) g_mutex_lock (&priv->mutex); -#else - g_mutex_lock (priv->mutex); -#endif CajaUndoStackActionData *action = stack_scroll_right (priv); @@ -597,11 +556,7 @@ caja_undostack_manager_undo (CajaUndoStackManager * manager, action->locked = TRUE; } -#if GLIB_CHECK_VERSION(2, 32, 0) g_mutex_unlock (&priv->mutex); -#else - g_mutex_unlock (priv->mutex); -#endif do_menu_update (manager); @@ -757,22 +712,13 @@ caja_undostack_manager_add_action (CajaUndoStackManager * manager, action->manager = manager; -#if GLIB_CHECK_VERSION(2, 32, 0) g_mutex_lock (&priv->mutex); -#else - g_mutex_lock (priv->mutex); -#endif stack_push_action (priv, action); -#if GLIB_CHECK_VERSION(2, 32, 0) g_mutex_unlock (&priv->mutex); -#else - g_mutex_unlock (priv->mutex); -#endif do_menu_update (manager); - } static GList * @@ -825,11 +771,7 @@ caja_undostack_manager_trash_has_emptied (CajaUndoStackManager * /* Clear actions from the oldest to the newest move to trash */ -#if GLIB_CHECK_VERSION(2, 32, 0) g_mutex_lock (&priv->mutex); -#else - g_mutex_lock (priv->mutex); -#endif clear_redo_actions (priv); CajaUndoStackActionData *action = NULL; @@ -855,11 +797,7 @@ caja_undostack_manager_trash_has_emptied (CajaUndoStackManager * } g_queue_free (tmp_stack); -#if GLIB_CHECK_VERSION(2, 32, 0) g_mutex_unlock (&priv->mutex); -#else - g_mutex_unlock (priv->mutex); -#endif do_menu_update (manager); } @@ -1922,11 +1860,7 @@ do_menu_update (CajaUndoStackManager * manager) CajaUndoStackManagerPrivate *priv = manager->priv; CajaUndoStackMenuData *data = g_slice_new0 (CajaUndoStackMenuData); -#if GLIB_CHECK_VERSION(2, 32, 0) g_mutex_lock (&priv->mutex); -#else - g_mutex_lock (priv->mutex); -#endif action = get_next_undo_action (priv); data->undo_label = get_undo_label (action); @@ -1937,11 +1871,7 @@ do_menu_update (CajaUndoStackManager * manager) data->redo_label = get_redo_label (action); data->redo_description = get_redo_description (action); -#if GLIB_CHECK_VERSION(2, 32, 0) g_mutex_unlock (&priv->mutex); -#else - g_mutex_unlock (priv->mutex); -#endif /* Update menus */ g_signal_emit_by_name (manager, "request-menu-update", data); |