NewBranch.bjs
authorAlan Knowles <alan@roojs.com>
Thu, 21 Mar 2019 05:09:58 +0000 (13:09 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 21 Mar 2019 05:09:58 +0000 (13:09 +0800)
NewBranch.vala

NewBranch.bjs
NewBranch.vala

index 3922133..13b83f9 100644 (file)
            "$ xns" : "Gtk"
           }
          ]
+        },
+        {
+         "int height_request" : 400,
+         "* pack" : "pack_start,true,true,0",
+         "xtype" : "ScrolledWindow",
+         "$ xns" : "Gtk",
+         "items" : [
+          {
+           "id" : "diff_view",
+           "* init" : " \n    var description =   Pango.FontDescription.from_string(\"monospace\");\n    description.set_size(9000);\n    this.el.override_font(description);\n     var lm = Gtk.SourceLanguageManager.get_default();\n                    \n    ((Gtk.SourceBuffer)(this.el.get_buffer())).set_language(\n        lm.get_language(\"diff\")\n    );",
+           "xtype" : "View",
+           "* pack" : "add",
+           "$ xns" : "GtkSource"
+          }
+         ]
         }
        ]
       }
index 4276e91..a2d2044 100644 (file)
@@ -45,6 +45,7 @@ public class NewBranch : Object
     public Xcls_devmodel devmodel;
     public Xcls_commit_message commit_message;
     public Xcls_createbtn createbtn;
+    public Xcls_diff_view diff_view;
 
         // my vars (def)
     public GitRepo? repo;
@@ -2175,6 +2176,9 @@ public class NewBranch : Object
             var child_0 = new Xcls_Table52( _this );
             child_0.ref();
             this.el.pack_start (  child_0.el , false,false,0 );
+            var child_1 = new Xcls_ScrolledWindow56( _this );
+            child_1.ref();
+            this.el.pack_start (  child_1.el , true,true,0 );
         }
 
         // user defined functions
@@ -2320,6 +2324,64 @@ public class NewBranch : Object
     }
 
 
+    public class Xcls_ScrolledWindow56 : Object
+    {
+        public Gtk.ScrolledWindow el;
+        private NewBranch  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_ScrolledWindow56(NewBranch _owner )
+        {
+            _this = _owner;
+            this.el = new Gtk.ScrolledWindow( null, null );
+
+            // my vars (dec)
+
+            // set gobject values
+            this.el.height_request = 400;
+            var child_0 = new Xcls_diff_view( _this );
+            child_0.ref();
+            this.el.add (  child_0.el  );
+        }
+
+        // user defined functions
+    }
+    public class Xcls_diff_view : Object
+    {
+        public Gtk.SourceView el;
+        private NewBranch  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_diff_view(NewBranch _owner )
+        {
+            _this = _owner;
+            _this.diff_view = this;
+            this.el = new Gtk.SourceView();
+
+            // my vars (dec)
+
+            // init method
+
+            var description =   Pango.FontDescription.from_string("monospace");
+                description.set_size(9000);
+                this.el.override_font(description);
+                 var lm = Gtk.SourceLanguageManager.get_default();
+                                
+                ((Gtk.SourceBuffer)(this.el.get_buffer())).set_language(
+                    lm.get_language("diff")
+                );
+        }
+
+        // user defined functions
+    }
+
+
 
 
 }