From bb9a88c99ccdec6f8a7192858092a8380b31b403 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 31 Dec 2018 09:29:10 +0800 Subject: [PATCH] Clones.bjs Clones.vala --- Clones.bjs | 2 +- Clones.vala | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Clones.bjs b/Clones.bjs index a2b288ef..6fd590c0 100644 --- a/Clones.bjs +++ b/Clones.bjs @@ -13,7 +13,7 @@ "response" : "(self, response_id) => { \n \n this.el.hide();\n \n}" }, "boolean deletable" : true, - "| void loadAndShow" : "() {\n\t\n\t_this.el.show_all();\n\t\n\t_this.toolbar.el.hide();\n\t_this.scrolled.el.hide();\n\t_this.spinner.el.show();\n\t_this.spinner.el.start();\t\n\t\n\tGitRepo.updateAll(\"show_clones\");\n\tthis.el.set_deletable(true);\n this.el.set_gravity(Gdk.Gravity.NORTH);\n this.el.move((Gdk.Screen.width() / 2 ) - (int.max(1280,Gdk.Screen.width() / 2) ,0);\n this.el.set_keep_above(true);\n this.el.set_default_size(\n\t\t\tint.max(1280,Gdk.Screen.width()),\n\t\t\tint.max(500,Gdk.Screen.height() - 200)\n\t);\n \n \n\t\n\t\n}\n\n", + "| void loadAndShow" : "() {\n\tthis.el.set_deletable(true);\n this.el.set_gravity(Gdk.Gravity.NORTH);\n this.el.move((Gdk.Screen.width() / 2 ) - (int.max(1280,Gdk.Screen.width() / 2) ,0);\n this.el.set_keep_above(true);\n this.el.set_default_size(\n\t\t\tint.max(1280,Gdk.Screen.width()),\n\t\t\tint.max(500,Gdk.Screen.height() - 200)\n\t);\n\tthis.el.show_all();\n\t\n\t_this.toolbar.el.hide();\n\t_this.scrolled.el.hide();\n\t_this.spinner.el.show();\n\t_this.spinner.el.start();\t\n\t\n\tGitRepo.updateAll(\"show_clones\");\n\t\n \n \n\t\n\t\n}\n\n", "default_width" : 1024, "| void show" : "() {\n\n this.el.show_all();\n\t_this.spinner.el.stop();\n\t_this.spinner.el.hide();\t\n\t_this.toolbar.el.show();\n\t_this.scrolled.el.show();\t\n \n this.el.set_deletable(true);\n this.el.set_gravity(Gdk.Gravity.NORTH);\n this.el.move((Gdk.Screen.width() / 2 ) - (int.max(1280,Gdk.Screen.width() / 2) ,0);\n this.el.set_keep_above(true);\n this.el.set_default_size(\n\t\t\tint.max(1280,Gdk.Screen.width()),\n\t\t\tint.max(500,Gdk.Screen.height() - 100)\n\t);\n \n\n _this.reposStore.load();\n \n GLib.debug(\"show clones = run?\");\n this.el.run();\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", "title" : "Manage Clones", diff --git a/Clones.vala b/Clones.vala index 26d11e14..30182803 100644 --- a/Clones.vala +++ b/Clones.vala @@ -70,15 +70,6 @@ public class Clones : Object // user defined functions public void loadAndShow () { - - _this.el.show_all(); - - _this.toolbar.el.hide(); - _this.scrolled.el.hide(); - _this.spinner.el.show(); - _this.spinner.el.start(); - - GitRepo.updateAll("show_clones"); this.el.set_deletable(true); this.el.set_gravity(Gdk.Gravity.NORTH); this.el.move((Gdk.Screen.width() / 2 ) - (int.max(1280,Gdk.Screen.width() / 2) ,0); @@ -87,6 +78,15 @@ public class Clones : Object int.max(1280,Gdk.Screen.width()), int.max(500,Gdk.Screen.height() - 200) ); + this.el.show_all(); + + _this.toolbar.el.hide(); + _this.scrolled.el.hide(); + _this.spinner.el.show(); + _this.spinner.el.start(); + + GitRepo.updateAll("show_clones"); + -- 2.39.2