From f5de01b39da73485807e60be095d3a4436548351 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 30 Oct 2018 13:21:28 +0800 Subject: [PATCH] Clones.bjs Clones.vala --- Clones.bjs | 4 ++-- Clones.vala | 10 +++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Clones.bjs b/Clones.bjs index 83536cf6..f38739cd 100644 --- a/Clones.bjs +++ b/Clones.bjs @@ -16,7 +16,7 @@ "| void show" : "() {\n\n \n this.el.set_deletable(false);\n this.el.show_all();\n // load clones..\n// this.get('/reposStore').load();\n \n //this.get('/ok_button').el.set_sensitive(false);\n \n // block until we return.\n// var run_ret = this.el.run();\n// if (run_ret < 1 ) {\n// return \"DONE\";\n// }\n// print(\"RUN RETURN : \" + run_ret);\n// return \"DONE\";\n //print(JSON.stringify(this.get('bug').getValue()));\n // return this.get('bug').getValue();\n //this.success = c.success;\n}\n", "$ deletable" : true, "title" : "Manage Clones", - "xtype" : "Dialog", + "xtype" : "Popover", "default_height" : 500, "$ modal" : true, "$ xns" : "Gtk", @@ -85,7 +85,7 @@ "* init" : " {\n \n this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n}\n", "bool expand" : true, "xtype" : "ScrolledWindow", - "* pack" : "pack_end,false,false,0", + "* pack" : "add", "Gtk.ShadowType shadow_type" : "Gtk.ShadowType.IN", "$ xns" : "Gtk", "items" : [ diff --git a/Clones.vala b/Clones.vala index 8cd690b8..2c6acde0 100644 --- a/Clones.vala +++ b/Clones.vala @@ -2,7 +2,7 @@ static Clones _Clones; public class Clones : Object { - public Gtk.Dialog el; + public Gtk.Popover el; private Clones _this; public static Clones singleton() @@ -34,16 +34,12 @@ public class Clones : Object public Clones() { _this = this; - this.el = new Gtk.Dialog(); + this.el = new Gtk.Popover( null ); // my vars (dec) // set gobject values - this.el.title = "Manage Clones"; this.el.border_width = 3; - this.el.default_height = 500; - this.el.default_width = 600; - this.el.deletable = true; this.el.modal = true; var child_0 = new Xcls_Box2( _this ); child_0.ref(); @@ -109,7 +105,7 @@ public class Clones : Object this.el.pack_start ( child_0.el , false,false,0 ); var child_1 = new Xcls_ScrolledWindow9( _this ); child_1.ref(); - this.el.pack_end ( child_1.el , false,false,0 ); + this.el.add ( child_1.el ); } // user defined functions -- 2.39.2