[PATCH] Express Melddoc.stop() as schedulerbase calls
- From: Vincent Legoll <vincent legoll gmail com>
- To: meld-list <meld-list gnome org>
- Subject: [PATCH] Express Melddoc.stop() as schedulerbase calls
- Date: Thu, 12 Mar 2009 21:25:37 +0100
Dont use knowledge of actual scheduler's internals,
use the base class's interface to achieve the same
goal.
I think this is cleaner, any objections ?
--
Vincent Legoll
Index: melddoc.py
===================================================================
--- melddoc.py (revision 1256)
+++ melddoc.py (working copy)
@@ -52,8 +52,8 @@
pass
def stop(self):
- if len(self.scheduler.tasks):
- del self.scheduler.tasks[0]
+ if self.scheduler.tasks_pending():
+ self.scheduler.remove_task(self.scheduler.get_current_task())
def _open_files(self, selected):
files = [f for f in selected if os.path.isfile(f)]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]