[meld/ui-next] filediff: Base action sensitivity on the last focused pane
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld/ui-next] filediff: Base action sensitivity on the last focused pane
- Date: Sat, 23 Mar 2019 02:03:12 +0000 (UTC)
commit 6573c36e38ef54a7bb40472eb375f5d2de869951
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Mar 2 11:00:36 2019 +1000
filediff: Base action sensitivity on the last focused pane
This is required for having correct sensitivity for any situation where
the textviews lose focus while trying to interact with an action e.g.,
putting actions in a popover.
meld/filediff.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index d95b827c..cb610f0a 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -521,7 +521,11 @@ class FileDiff(Gtk.VBox, MeldDoc):
self.cursor.line, self.cursor.offset = line, offset
def on_current_diff_changed(self, *args):
- pane = self._get_focused_pane()
+ try:
+ pane = self.textview.index(self.focus_pane)
+ except ValueError:
+ pane = -1
+
if pane != -1:
# While this *should* be redundant, it's possible for focus pane
# and cursor pane to be different in several situations.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]