[meld] newdifftab: Fix blank-comparison regression from Gio changes
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] newdifftab: Fix blank-comparison regression from Gio changes
- Date: Sat, 7 Apr 2018 21:55:33 +0000 (UTC)
commit 35d01544cbed3c76f8700597f26630633d5f29c1
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Apr 7 08:21:51 2018 +1000
newdifftab: Fix blank-comparison regression from Gio changes
meld/newdifftab.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/meld/newdifftab.py b/meld/newdifftab.py
index 3309e6a2..f0c33b14 100644
--- a/meld/newdifftab.py
+++ b/meld/newdifftab.py
@@ -126,8 +126,14 @@ class NewDiffTab(LabeledObjectMixin, GObject.GObject, gnomeglade.Component):
# TODO: This doesn't work the way I'd like for DirDiff and VCView.
# It should do something similar to FileDiff; give a tab with empty
# file entries and no comparison done.
- compare_gfiles = [Gio.File.new_for_path("")] * self._get_num_paths()
- tab = self.diff_methods[self.diff_type](compare_gfiles)
+
+ # File comparison wants None for its paths here. Folder mode
+ # needs an actual directory.
+ if self.diff_type == 0:
+ gfiles = [None] * self._get_num_paths()
+ else:
+ gfiles = [Gio.File.new_for_path("")] * self._get_num_paths()
+ tab = self.diff_methods[self.diff_type](gfiles)
self.emit('diff-created', tab)
def on_container_switch_in_event(self, *args):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]