[meld/deprecation-cleanup: 21/48] melddoc: Move stop() logic to MeldWindow
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld/deprecation-cleanup: 21/48] melddoc: Move stop() logic to MeldWindow
- Date: Sun, 2 Dec 2018 02:43:53 +0000 (UTC)
commit aa3b472fb8e4d59e524df7690ba8af069fc1ddea
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Dec 1 07:10:37 2018 +1000
melddoc: Move stop() logic to MeldWindow
This is one small part of eventually getting rid of MeldDoc
meld/melddoc.py | 4 ----
meld/meldwindow.py | 4 +++-
2 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/meld/melddoc.py b/meld/melddoc.py
index 3ef3fc67..da00de58 100644
--- a/meld/melddoc.py
+++ b/meld/melddoc.py
@@ -118,10 +118,6 @@ class MeldDoc(LabeledObjectMixin, GObject.GObject):
def save_as(self):
pass
- def stop(self):
- if self.scheduler.tasks_pending():
- self.scheduler.remove_task(self.scheduler.get_current_task())
-
def _open_files(self, selected, line=0):
query_attrs = ",".join((Gio.FILE_ATTRIBUTE_STANDARD_TYPE,
Gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE))
diff --git a/meld/meldwindow.py b/meld/meldwindow.py
index db467f25..2f4a151d 100644
--- a/meld/meldwindow.py
+++ b/meld/meldwindow.py
@@ -478,7 +478,9 @@ class MeldWindow(Component):
self.current_doc().open_external()
def on_toolbar_stop_clicked(self, *args):
- self.current_doc().stop()
+ doc = self.current_doc()
+ if doc.scheduler.tasks_pending():
+ doc.scheduler.remove_task(doc.scheduler.get_current_task())
def page_removed(self, page, status):
if hasattr(page, 'scheduler'):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]