From: Alan Knowles Date: Fri, 28 Dec 2018 06:55:47 +0000 (+0800) Subject: MergeBranch.bjs X-Git-Url: http://git.roojs.org/?p=gitlive;a=commitdiff_plain;h=93a57df7ad5ac5a4dcdc614b9e765186e8f98669 MergeBranch.bjs MergeBranch.vala --- diff --git a/MergeBranch.bjs b/MergeBranch.bjs index 7575206e..0f1c7a17 100644 --- a/MergeBranch.bjs +++ b/MergeBranch.bjs @@ -163,7 +163,24 @@ "xtype" : "Box", "gboolean homogeneous" : false, "$ xns" : "Gtk", - "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL" + "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL", + "items" : [ + { + "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);", + "xtype" : "View", + "* pack" : "add", + "$ xns" : "GtkSource" + } + ] + } + ] }, { "* pack" : "append_page,_this.label_ticket.el", diff --git a/MergeBranch.vala b/MergeBranch.vala index a85153c1..25873629 100644 --- a/MergeBranch.vala +++ b/MergeBranch.vala @@ -22,6 +22,7 @@ public class MergeBranch : Object public Xcls_name name; public Xcls_label_diff label_diff; public Xcls_label_ticket label_ticket; + public Xcls_diff_view diff_view; public Xcls_scrolled_window scrolled_window; public Xcls_view view; public Xcls_spinner spinner; @@ -50,10 +51,10 @@ public class MergeBranch : Object var child_0 = new Xcls_Box2( _this ); child_0.ref(); this.el.get_content_area().add ( child_0.el ); - var child_1 = new Xcls_Button22( _this ); + var child_1 = new Xcls_Button24( _this ); child_1.ref(); this.el.add_action_widget ( child_1.el , 0 ); - var child_2 = new Xcls_Button23( _this ); + var child_2 = new Xcls_Button25( _this ); child_2.ref(); this.el.add_action_widget ( child_2.el , 1 ); @@ -674,7 +675,7 @@ public class MergeBranch : Object var child_2 = new Xcls_Box17( _this ); child_2.ref(); this.el.append_page ( child_2.el , _this.label_diff.el ); - var child_3 = new Xcls_Box18( _this ); + var child_3 = new Xcls_Box20( _this ); child_3.ref(); this.el.append_page ( child_3.el , _this.label_ticket.el ); } @@ -745,12 +746,68 @@ public class MergeBranch : Object // set gobject values this.el.homogeneous = false; + var child_0 = new Xcls_ScrolledWindow18( _this ); + child_0.ref(); + this.el.pack_start ( child_0.el , true,true,0 ); + } + + // user defined functions + } + public class Xcls_ScrolledWindow18 : Object + { + public Gtk.ScrolledWindow el; + private MergeBranch _this; + + + // my vars (def) + + // ctor + public Xcls_ScrolledWindow18(MergeBranch _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 MergeBranch _this; + + + // my vars (def) + + // ctor + public Xcls_diff_view(MergeBranch _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); + } + + // user defined functions + } + + - public class Xcls_Box18 : Object + public class Xcls_Box20 : Object { public Gtk.Box el; private MergeBranch _this; @@ -759,7 +816,7 @@ public class MergeBranch : Object // my vars (def) // ctor - public Xcls_Box18(MergeBranch _owner ) + public Xcls_Box20(MergeBranch _owner ) { _this = _owner; this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 ); @@ -880,7 +937,7 @@ public class MergeBranch : Object } - public class Xcls_Button22 : Object + public class Xcls_Button24 : Object { public Gtk.Button el; private MergeBranch _this; @@ -889,7 +946,7 @@ public class MergeBranch : Object // my vars (def) // ctor - public Xcls_Button22(MergeBranch _owner ) + public Xcls_Button24(MergeBranch _owner ) { _this = _owner; this.el = new Gtk.Button(); @@ -904,7 +961,7 @@ public class MergeBranch : Object // user defined functions } - public class Xcls_Button23 : Object + public class Xcls_Button25 : Object { public Gtk.Button el; private MergeBranch _this; @@ -913,7 +970,7 @@ public class MergeBranch : Object // my vars (def) // ctor - public Xcls_Button23(MergeBranch _owner ) + public Xcls_Button25(MergeBranch _owner ) { _this = _owner; this.el = new Gtk.Button();