[meld] Remove files argument from _diff_files and use buffer metadata
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] Remove files argument from _diff_files and use buffer metadata
- Date: Wed, 29 Dec 2010 00:55:56 +0000 (UTC)
commit 9aaac97a129e9c9a362b3545330501fcedd69ed1
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Oct 24 07:37:21 2010 +1000
Remove files argument from _diff_files and use buffer metadata
meld/filediff.py | 11 ++++++-----
meld/filemerge.py | 2 +-
2 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index 602022e..fadf3f1 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -909,7 +909,7 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
for b in self.textbuffer:
self.undosequence.checkpoint(b)
- def _diff_files(self, files):
+ def _diff_files(self):
yield _("[%s] Computing differences") % self.label_text
texts = self.buffer_filtered[:self.num_panes]
step = self.linediffer.set_sequences_iter(texts)
@@ -926,15 +926,16 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
self.scheduler.add_task(self._update_highlighting().next)
self._connect_buffer_handlers()
self._set_merge_action_sensitivity()
- for i in range(len(files)):
- if files[i]:
- srcviewer.set_highlighting_enabled_from_file(self.textbuffer[i], files[i], self.prefs.use_syntax_highlighting)
+ for i in range(self.num_panes):
+ srcviewer.set_highlighting_enabled_from_file(self.textbuffer[i],
+ self.bufferdata[i].filename,
+ self.prefs.use_syntax_highlighting)
yield 0
def _set_files_internal(self, files):
for i in self._load_files(files, self.textbuffer):
yield i
- for i in self._diff_files(files):
+ for i in self._diff_files():
yield i
def _set_merge_action_sensitivity(self):
diff --git a/meld/filemerge.py b/meld/filemerge.py
index 224903c..48f56bf 100644
--- a/meld/filemerge.py
+++ b/meld/filemerge.py
@@ -51,7 +51,7 @@ class FileMerge(filediff.FileDiff):
yield i
for i in self._merge_files():
yield i
- for i in self._diff_files(files):
+ for i in self._diff_files():
yield i
def _get_custom_status_text(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]