src/Builder4/Editor.bjs
[app.Builder.js] / src / Builder4 / Editor.vala
index 30b0036..269fc65 100644 (file)
@@ -49,6 +49,7 @@ public class Editor : Object
 
         // set gobject values
         this.el.homogeneous = false;
+        this.el.hexpand = true;
         var child_0 = new Xcls_Box2( _this );
         child_0.ref();
         this.el.pack_start (  child_0.el , false,true );
@@ -128,7 +129,7 @@ public class Editor : Object
             this.key_edit.el.hide();
         }
     
-           
+            
     }
     public class Xcls_Box2 : Object
     {
@@ -263,6 +264,8 @@ public class Editor : Object
             this.el.show_line_marks = true;
             this.el.insert_spaces_instead_of_tabs = true;
             this.el.show_line_numbers = true;
+            this.el.draw_spaces = Gtk.SourceDrawSpacesFlags.LEADING + Gtk.SourceDrawSpacesFlags.TRAILING + Gtk.SourceDrawSpacesFlags.TAB + Gtk.SourceDrawSpacesFlags.SPACE;
+            this.el.tab_width = 4;
             this.el.highlight_current_line = true;
             var child_0 = new Xcls_buffer( _this );
             child_0.ref();
@@ -273,7 +276,13 @@ public class Editor : Object
             var description =   Pango.FontDescription.from_string("monospace");
                 description.set_size(8000);
                 this.el.override_font(description);
+                var p = new Palete.CompletionProvider(_this);
             
+               this.el.completion.add_provider(p);
+               this.el.completion.unblock_interactive();
+               this.el.completion.select_on_show                       = true;
+               this.el.completion.show_headers                 = true;
+               this.el.completion.remember_info_visibility             = true;
             
               
                 var attrs = new Gtk.SourceMarkAttributes();
@@ -354,8 +363,11 @@ public class Editor : Object
            
            
             ((Gtk.SourceBuffer)(this.el.get_buffer())) .set_language(lg); 
+        
+            this.el.insert_spaces_instead_of_tabs = true;
             
-            if (lg.name == "vala") {
+            print("sourcelanguage  = %s\n", lg.name);
+            if (lg.name == "Vala") {
                 this.el.insert_spaces_instead_of_tabs = false;
             }