[meld/meld-3-12] sourceview: Fix text-wrapping reset from commit dialog (bgo#741620)
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld/meld-3-12] sourceview: Fix text-wrapping reset from commit dialog (bgo#741620)
- Date: Mon, 22 Dec 2014 20:38:32 +0000 (UTC)
commit 09a3256ec3af9fbaea760f78807291945883723c
Author: Kai Willadsen <kai willadsen gmail com>
Date: Tue Dec 23 06:11:24 2014 +1000
sourceview: Fix text-wrapping reset from commit dialog (bgo#741620)
Because we set the wrap-mode forcefully in the commit dialog's
sourceview, the gsettings binding was overriding the actual set
preference.
data/ui/vcview.ui | 2 +-
meld/sourceview.py | 11 +++++++++++
2 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/data/ui/vcview.ui b/data/ui/vcview.ui
index be13b84..d63e362 100644
--- a/data/ui/vcview.ui
+++ b/data/ui/vcview.ui
@@ -277,7 +277,7 @@
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
- <object class="MeldSourceView" id="textview">
+ <object class="CommitMessageSourceView" id="textview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="wrap_mode">word</property>
diff --git a/meld/sourceview.py b/meld/sourceview.py
index 97bc65b..1e2edc6 100644
--- a/meld/sourceview.py
+++ b/meld/sourceview.py
@@ -96,3 +96,14 @@ class MeldSourceView(GtkSource.View):
def get_line_num_for_y(self, y):
return self.get_line_at_y(y)[0].get_line()
+
+
+class CommitMessageSourceView(GtkSource.View):
+
+ __gtype_name__ = "CommitMessageSourceView"
+
+ __gsettings_bindings__ = (
+ ('indent-width', 'tab-width'),
+ ('insert-spaces-instead-of-tabs', 'insert-spaces-instead-of-tabs'),
+ ('draw-spaces', 'draw-spaces'),
+ )
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]