diff options
author | Monsta <[email protected]> | 2015-01-12 16:04:13 +0300 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2015-01-13 11:55:00 +0100 |
commit | 53ec021ce6e0ee923bd86e11b4f516b2a19bc2e8 (patch) | |
tree | bc422498f805a6ae0b5495157a7482616ec16259 /libcaja-private/caja-undostack-manager.c | |
parent | d327a96cfb61acd0ce606c4bf80349454b66bd44 (diff) | |
download | caja-53ec021ce6e0ee923bd86e11b4f516b2a19bc2e8.tar.bz2 caja-53ec021ce6e0ee923bd86e11b4f516b2a19bc2e8.tar.xz |
drop support for GLib < 2.36
Closes https://github.com/mate-desktop/caja/pull/372
Diffstat (limited to 'libcaja-private/caja-undostack-manager.c')
-rw-r--r-- | libcaja-private/caja-undostack-manager.c | 70 |
1 files changed, 0 insertions, 70 deletions
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); |