[pitivi] undo: Remove unused_stack parameter
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] undo: Remove unused_stack parameter
- Date: Sat, 16 Apr 2016 14:24:01 +0000 (UTC)
commit c352fff73260da2acbf4bfafb7006a0e0d8449ea
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Sun Apr 3 05:50:25 2016 +0200
undo: Remove unused_stack parameter
Differential Revision: https://phabricator.freedesktop.org/D858
pitivi/undo/undo.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/pitivi/undo/undo.py b/pitivi/undo/undo.py
index 5d31321..7c10b9d 100644
--- a/pitivi/undo/undo.py
+++ b/pitivi/undo/undo.py
@@ -242,7 +242,7 @@ class UndoableActionLog(GObject.Object, Loggable):
raise UndoWrongStateError()
stack = self.undo_stacks.pop(-1)
- self._runStack(stack, stack.undo)
+ self._run(stack.undo)
self.redo_stacks.append(stack)
self.emit("undo", stack)
@@ -251,7 +251,7 @@ class UndoableActionLog(GObject.Object, Loggable):
raise UndoWrongStateError()
stack = self.redo_stacks.pop(-1)
- self._runStack(stack, stack.do)
+ self._run(stack.do)
self.undo_stacks.append(stack)
self.emit("redo", stack)
@@ -261,7 +261,7 @@ class UndoableActionLog(GObject.Object, Loggable):
self.undo_stacks = []
for stack in stacks:
- self._runStack(stack, stack.clean)
+ self._run(stack.clean)
self.emit("cleaned")
def _takeSnapshot(self):
@@ -277,10 +277,10 @@ class UndoableActionLog(GObject.Object, Loggable):
current_snapshot = self._takeSnapshot()
return current_snapshot != self._checkpoint
- def _runStack(self, unused_stack, run):
+ def _run(self, operation):
self.running = True
try:
- run()
+ operation()
finally:
self.running = False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]