[gnome-builder] minimap: use IdeSourceView



commit 82012f6055aa18641dc6cfdb66f509a8cb62d316
Author: Christian Hergert <christian hergert me>
Date:   Tue Apr 21 23:36:17 2015 -0700

    minimap: use IdeSourceView
    
    This allows us to render line changes in the gutter which can be sort
    of useful. Since most of our heavy lifting is done in the IdeBuffer, it
    shouldn't be a whole lot more heavy handed than the GtkSourceView
    approach. Although, we should keep an eye on things to make sure that
    stays the case.

 libide/ide-source-map.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/libide/ide-source-map.c b/libide/ide-source-map.c
index 325544e..120d445 100644
--- a/libide/ide-source-map.c
+++ b/libide/ide-source-map.c
@@ -23,6 +23,7 @@
 #include "ide-macros.h"
 #include "ide-pango.h"
 #include "ide-source-map.h"
+#include "ide-source-view.h"
 
 #define DEFAULT_WIDTH 100
 #define DELAYED_DRAW_TIMEOUT_MSEC 34
@@ -622,7 +623,7 @@ ide_source_map_class_init (IdeSourceMapClass *klass)
     g_param_spec_object ("view",
                          _("View"),
                          _("The view this widget is mapping."),
-                         GTK_SOURCE_TYPE_VIEW,
+                         IDE_TYPE_SOURCE_VIEW,
                          (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
   g_object_class_install_property (object_class, PROP_VIEW, gParamSpecs [PROP_VIEW]);
 
@@ -640,12 +641,14 @@ ide_source_map_init (IdeSourceMap *self)
 {
   GtkSourceCompletion *completion;
 
-  self->child_view = g_object_new (GTK_SOURCE_TYPE_VIEW,
+  self->child_view = g_object_new (IDE_TYPE_SOURCE_VIEW,
                                    "auto-indent", FALSE,
                                    "can-focus", FALSE,
                                    "editable", FALSE,
                                    "expand", FALSE,
                                    "monospace", TRUE,
+                                   "show-line-changes", TRUE,
+                                   "show-line-diagnostics", FALSE,
                                    "show-line-numbers", FALSE,
                                    "show-line-marks", FALSE,
                                    "show-right-margin", FALSE,


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