[meld: 3/4] Address reviewer comments
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld: 3/4] Address reviewer comments
- Date: Sat, 30 Jun 2018 21:32:40 +0000 (UTC)
commit 05aa19324937b53ceb2b3bda2636c4cabb82a60c
Author: Jesus Arroyo <chuy max gmail com>
Date: Sat Jun 30 15:18:37 2018 -0400
Address reviewer comments
data/ui/dirdiff.ui | 4 ++--
meld/dirdiff.py | 12 +++++++++---
2 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/data/ui/dirdiff.ui b/data/ui/dirdiff.ui
index eb34edd9..3476023a 100644
--- a/data/ui/dirdiff.ui
+++ b/data/ui/dirdiff.ui
@@ -15,7 +15,7 @@
<child>
<object class="GtkAction" id="DirCollapseRecursively">
<property name="label" translatable="yes">Collapse Recursively</property>
- <property name="tooltip" translatable="yes">Collapse Recursively</property>
+ <property name="tooltip" translatable="yes">Collapse selected folder and all subfolders</property>
<property name="stock_id">gtk-dialog-info</property>
<property name="is_important">True</property>
<signal name="activate" handler="on_collapse_recursive_clicked" swapped="no"/>
@@ -24,7 +24,7 @@
<child>
<object class="GtkAction" id="DirExpandRecursively">
<property name="label" translatable="yes">Expand Recursively</property>
- <property name="tooltip" translatable="yes">Expand Recursively</property>
+ <property name="tooltip" translatable="yes">Expand selected folder and all subfolders</property>
<property name="stock_id">gtk-dialog-info</property>
<property name="is_important">True</property>
<signal name="activate" handler="on_expand_recursive_clicked" swapped="no"/>
diff --git a/meld/dirdiff.py b/meld/dirdiff.py
index c241d97a..7a050814 100644
--- a/meld/dirdiff.py
+++ b/meld/dirdiff.py
@@ -1030,10 +1030,10 @@ class DirDiff(MeldDoc, Component):
is_single_foldable_row = False
if (selection.count_selected_rows() == 1):
path = selection.get_selected_rows()[1][0]
- iter = self.model.get_iter(path)
- os_path = self.model.value_path(iter, pane)
+ it = self.model.get_iter(path)
+ os_path = self.model.value_path(it, pane)
is_single_foldable_row = self.model.is_folder(
- iter, pane, os_path)
+ it, pane, os_path)
get_action("DirCompare").set_sensitive(True)
get_action("DirCollapseRecursively").set_sensitive(
@@ -1198,6 +1198,9 @@ class DirDiff(MeldDoc, Component):
def on_collapse_recursive_clicked(self, action):
pane = self._get_focused_pane()
+ if pane is None:
+ return
+
root_path = self._get_selected_paths(pane)[0]
filter_model = Gtk.TreeModelFilter(
child_model=self.model, virtual_root=root_path)
@@ -1215,6 +1218,9 @@ class DirDiff(MeldDoc, Component):
def on_expand_recursive_clicked(self, action):
pane = self._get_focused_pane()
+ if pane is None:
+ return
+
paths = self._get_selected_paths(pane)
for path in paths:
self.treeview[pane].expand_row(path, True)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]