[gnome-builder] editor: Add settings schema and bind for "overscroll"



commit 87644dbc3cb27f666bfb6e735a739d6f15fdcdba
Author: Joaquim Rocha <me joaquimrocha com>
Date:   Fri Nov 20 22:07:27 2015 +0100

    editor: Add settings schema and bind for "overscroll"
    
    https://bugzilla.gnome.org/show_bug.cgi?id=742933

 .../gsettings/org.gnome.builder.editor.gschema.xml |    6 ++++++
 libide/editor/ide-editor-frame.c                   |    1 +
 2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/data/gsettings/org.gnome.builder.editor.gschema.xml 
b/data/gsettings/org.gnome.builder.editor.gschema.xml
index 83e0558..62abdee 100644
--- a/data/gsettings/org.gnome.builder.editor.gschema.xml
+++ b/data/gsettings/org.gnome.builder.editor.gschema.xml
@@ -84,5 +84,11 @@
       <summary>Draw Spaces</summary>
       <description>The various types of space to draw in the editor.</description>
     </key>
+    <key name="overscroll" type="i">
+      <default>1</default>
+      <range min="-999" max="999"/>
+      <summary>Overscroll</summary>
+      <description>The number of lines to scroll beyond the end of the buffer.</description>
+    </key>
   </schema>
 </schemalist>
diff --git a/libide/editor/ide-editor-frame.c b/libide/editor/ide-editor-frame.c
index df5d4d3..c63cc96 100644
--- a/libide/editor/ide-editor-frame.c
+++ b/libide/editor/ide-editor-frame.c
@@ -852,6 +852,7 @@ ide_editor_frame_init (IdeEditorFrame *self)
   g_settings_bind (settings, "draw-spaces", self->source_view, "draw-spaces", G_SETTINGS_BIND_DEFAULT);
   g_settings_bind (settings, "font-name", self->source_view, "font-name", G_SETTINGS_BIND_GET);
   g_settings_bind (settings, "highlight-current-line", self->source_view, "highlight-current-line", 
G_SETTINGS_BIND_GET);
+  g_settings_bind (settings, "overscroll", self->source_view, "overscroll", G_SETTINGS_BIND_GET);
   g_settings_bind (settings, "scroll-offset", self->source_view, "scroll-offset", G_SETTINGS_BIND_GET);
   g_settings_bind (settings, "show-grid-lines", self->source_view, "show-grid-lines", G_SETTINGS_BIND_GET);
   g_settings_bind (settings, "show-line-changes", self->source_view, "show-line-changes", 
G_SETTINGS_BIND_GET);


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