[meld/ui-next: 26/35] preferences: Hook up sourcemap preference UI to new gschema fields



commit 5e39ffe12a850ebc2bb27d2397675d25e2c3968a
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Fri Feb 15 09:52:39 2019 +1000

    preferences: Hook up sourcemap preference UI to new gschema fields

 data/org.gnome.meld.gschema.xml | 12 ++++++++++++
 meld/preferences.py             |  4 ++++
 2 files changed, 16 insertions(+)
---
diff --git a/data/org.gnome.meld.gschema.xml b/data/org.gnome.meld.gschema.xml
index 932be968..48cc112b 100644
--- a/data/org.gnome.meld.gschema.xml
+++ b/data/org.gnome.meld.gschema.xml
@@ -114,6 +114,18 @@
           <description>The custom font to use, stored as a string and parsed as a Pango font 
description.</description>
       </key>
 
+      <!-- MeldSourceMap properties -->
+      <key name="show-sourcemap" type="b">
+          <default>true</default>
+          <summary>Show overview source map</summary>
+          <description>If true, file comparisons will have paired source maps for compared 
files.</description>
+      </key>
+
+      <key name="use-compact-sourcemap" type="b">
+          <default>false</default>
+          <summary>Use compact source map</summary>
+          <description>If true, file comparisons source maps will be narrower.</description>
+      </key>
 
       <!-- File comparison settings -->
       <key name="ignore-blank-lines" type="b">
diff --git a/meld/preferences.py b/meld/preferences.py
index c13345e6..9ed0a44f 100644
--- a/meld/preferences.py
+++ b/meld/preferences.py
@@ -268,8 +268,10 @@ class PreferencesDialog(Gtk.Dialog):
     checkbutton_shallow_compare = Template.Child()
     checkbutton_show_commit_margin = Template.Child()
     checkbutton_show_line_numbers = Template.Child()
+    checkbutton_show_sourcemap = Template.Child()
     checkbutton_show_whitespace = Template.Child()
     checkbutton_spaces_instead_of_tabs = Template.Child()
+    checkbutton_use_compact_sourcemap = Template.Child()
     checkbutton_use_syntax_highlighting = Template.Child()
     checkbutton_wrap_text = Template.Child()
     checkbutton_wrap_word = Template.Child()
@@ -305,6 +307,8 @@ class PreferencesDialog(Gtk.Dialog):
             ('folder-filter-text', self.checkbutton_folder_filter_text, 'active'),  # noqa: E501
             ('folder-ignore-symlinks', self.checkbutton_ignore_symlinks, 'active'),  # noqa: E501
             ('vc-show-commit-margin', self.checkbutton_show_commit_margin, 'active'),  # noqa: E501
+            ('show-sourcemap', self.checkbutton_show_sourcemap, 'active'),
+            ('use-compact-sourcemap', self.checkbutton_use_compact_sourcemap, 'active'),  # noqa: E501
             ('vc-commit-margin', self.spinbutton_commit_margin, 'value'),
             ('vc-break-commit-message', self.checkbutton_break_commit_lines, 'active'),  # noqa: E501
             ('ignore-blank-lines', self.checkbutton_ignore_blank_lines, 'active'),  # noqa: E501


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]