Builder4/Editor.bjs.RVKDMX
authorAlan Knowles <alan@roojs.com>
Fri, 19 Sep 2014 08:20:00 +0000 (16:20 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 19 Sep 2014 08:20:00 +0000 (16:20 +0800)
Builder4/Editor.bjs
Builder4/Editor.vala

Builder4/Editor.bjs
Builder4/Editor.vala

index 96163f1..f213cea 100644 (file)
@@ -62,7 +62,7 @@
                             },
                             "gboolean show_line_marks" : true,
                             "id" : "view",
-                            "* init" : " \n    var description =   Pango.FontDescription.from_string(\"monospace\");\n    description.set_size(8000);\n    this.el.override_font(description);\n\n ",
+                            "* init" : " \n    var description =   Pango.FontDescription.from_string(\"monospace\");\n    description.set_size(8000);\n    this.el.override_font(description);\n\n    var attrs = new Gtk.SourceMarkAttributes();\n    Gtk.Color pink;\n    Gtk.Color.parse ( out pink, \"pink\");\n    attrs.set_background (attrs, pink);\n    this.el.set_mark_attributes (\"error\", attrs, 1);",
                             "$ insert_spaces_instead_of_tabs" : true,
                             "* pack" : "add",
                             "xtype" : "View",
index 40c8ff4..3070665 100644 (file)
@@ -253,6 +253,12 @@ public class Editor : Object
             var description =   Pango.FontDescription.from_string("monospace");
                 description.set_size(8000);
                 this.el.override_font(description);
+            
+                var attrs = new Gtk.SourceMarkAttributes();
+                Gtk.Color pink;
+                Gtk.Color.parse ( out pink, "pink");
+                attrs.set_background (attrs, pink);
+                this.el.set_mark_attributes ("error", attrs, 1);
             // listeners 
             this.el.key_release_event.connect( (event) => {