def append_vcview(self, location, auto_compare=False): doc = VcView() self._append_page(doc, "meld-version-control") if isinstance(location, (list, tuple)): location = location[0] doc.set_location(location.get_path()) if auto_compare: doc.scheduler.add_task(doc.auto_compare) return doc
def append_vcview(self, location, auto_compare=False): doc = VcView() self._append_page(doc, "meld-version-control") if isinstance(location, (list, tuple)): location = location[0] doc.set_location(location.get_path()) if auto_compare: doc.scheduler.add_task(doc.auto_compare) return doc
def _single_file_open(self, gfile): doc = VcView() def cleanup(): self.scheduler.remove_scheduler(doc.scheduler) self.scheduler.add_task(cleanup) self.scheduler.add_scheduler(doc.scheduler) path = gfile.get_path() doc.set_location(path) doc.create_diff_signal.connect( lambda obj, arg, kwargs: self.append_diff(arg, **kwargs)) doc.run_diff(path)