From 0a90763726595798a6ee225d3b0f1b1512f4c60c Mon Sep 17 00:00:00 2001 From: Razvan Chitu Date: Sat, 9 Jan 2016 00:10:27 +0200 Subject: file-undo-manager: rename undo_redo_flag Nautilus undo manager previously relied on a stack-like implementation of its operating state. The stack operations (pushing and popping) were removed in a previous commit due to possible unexpected behavior and errors. The flag alone now has an inadequate name for what it represents. Rename the flag to "is_operating", since it is set when the manager is performing an undo / redo operation and unset otherwise. Rename the associated getter function accordingly. https://bugzilla.gnome.org/show_bug.cgi?id=759850 --- libnautilus-private/nautilus-file-undo-manager.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libnautilus-private/nautilus-file-undo-manager.c') diff --git a/libnautilus-private/nautilus-file-undo-manager.c b/libnautilus-private/nautilus-file-undo-manager.c index 7de970148..862060f03 100644 --- a/libnautilus-private/nautilus-file-undo-manager.c +++ b/libnautilus-private/nautilus-file-undo-manager.c @@ -51,7 +51,7 @@ struct _NautilusFileUndoManagerPrivate NautilusFileUndoManagerState state; NautilusFileUndoManagerState last_state; - guint undo_redo_flag : 1; + guint is_operating : 1; gulong trash_signal_id; }; @@ -158,7 +158,7 @@ undo_info_apply_ready (GObject *source, success = nautilus_file_undo_info_apply_finish (info, res, &user_cancel, NULL); - self->priv->undo_redo_flag = FALSE; + self->priv->is_operating = FALSE; /* just return in case we got another another operation set */ if ((self->priv->info != NULL) && @@ -192,7 +192,7 @@ do_undo_redo (NautilusFileUndoManager *self, self->priv->last_state = self->priv->state; - self->priv->undo_redo_flag = TRUE; + self->priv->is_operating = TRUE; nautilus_file_undo_info_apply_async (self->priv->info, undo, parent_window, undo_info_apply_ready, self); @@ -265,10 +265,10 @@ nautilus_file_undo_manager_get_state (void) gboolean -nautilus_file_undo_manager_get_flag () +nautilus_file_undo_manager_is_operating () { NautilusFileUndoManager *self = get_singleton (); - return self->priv->undo_redo_flag; + return self->priv->is_operating; } NautilusFileUndoManager * -- cgit v1.2.1