From ceaff181ed23c271b5d7f00436c78c9de41edea6 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Fri, 15 May 2015 16:15:16 +0800 Subject: [PATCH] src/Builder4/MainWindow.bjs src/Builder4/MainWindow.vala --- src/Builder4/MainWindow.bjs | 66 ++++++++++++++++++------------------ src/Builder4/MainWindow.vala | 3 +- 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/src/Builder4/MainWindow.bjs b/src/Builder4/MainWindow.bjs index bfd0c51c4..70deef578 100644 --- a/src/Builder4/MainWindow.bjs +++ b/src/Builder4/MainWindow.bjs @@ -31,8 +31,8 @@ "items" : [ { "id" : "headerbar", - "* pack" : "set_titlebar", "xtype" : "HeaderBar", + "* pack" : "set_titlebar", "bool show_close_button" : true, "$ xns" : "Gtk", "string title" : "Application Builder", @@ -44,8 +44,8 @@ "items" : [ { "bool use_popover" : false, - "* pack" : "add", "xtype" : "MenuButton", + "* pack" : "add", "$ xns" : "Gtk", "items" : [ { @@ -59,9 +59,9 @@ "listeners" : { "activate" : " ( ) => {\n Xcls_MainWindow.singleton().no_windows++;\n var w = new Xcls_MainWindow();\n w.ref();\n\n w.el.show_all();\n w.initChildren();\n w.windowstate.switchState(WindowState.State.FILES);\n}" }, + "* pack" : "append", "xtype" : "MenuItem", "string label" : "Open a new Window", - "* pack" : "append", "$ xns" : "Gtk" }, { @@ -73,26 +73,26 @@ "listeners" : { "activate" : " ( ) => {\n Resources.singleton().fetchStart();\n}" }, + "string label" : "Download updated Resources", "* pack" : "append", "xtype" : "MenuItem", - "string label" : "Download updated Resources", "$ xns" : "Gtk" }, { "listeners" : { "activate" : "() => {\n About.singleton().el.show();\n }" }, + "xtype" : "MenuItem", "string label" : "About the Builder", "* pack" : "append", - "xtype" : "MenuItem", "$ xns" : "Gtk" } ] }, { + "* pack" : "set_image", "xtype" : "Image", "utf8 icon_name" : "help-about", - "* pack" : "set_image", "$ xns" : "Gtk" } ] @@ -103,8 +103,8 @@ }, { "id" : "vbox", - "xtype" : "VBox", "* pack" : "add", + "xtype" : "VBox", "$ xns" : "Gtk", "$ homogeneous" : false, "items" : [ @@ -118,26 +118,26 @@ "items" : [ { "id" : "leftpane", - "* pack" : "add1", "xtype" : "VBox", + "* pack" : "add1", "$ xns" : "Gtk", "items" : [ { "id" : "editpane", - "* pack" : "pack_start,false,true,0", "xtype" : "VPaned", + "* pack" : "pack_start,false,true,0", "$ xns" : "Gtk", "items" : [ { "id" : "tree", - "* pack" : "add1", "xtype" : "VBox", + "* pack" : "add1", "$ xns" : "Gtk" }, { "id" : "props", - "* pack" : "add2", "xtype" : "VBox", + "* pack" : "add2", "$ xns" : "Gtk" } ] @@ -216,8 +216,8 @@ "items" : [ { "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);", - "* pack" : "add_child", "xtype" : "Actor", + "* pack" : "add_child", "$ xns" : "GtkClutter", "items" : [ { @@ -225,16 +225,16 @@ "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.PREVIEW);\n \n\n}" }, "utf8 tooltip_text" : "Back", - "xtype" : "Button", "* pack" : false, + "xtype" : "Button", "width_request" : 50, "$ xns" : "Gtk", "height_request" : 50, "items" : [ { + "utf8 icon_name" : "go-previous", "* pack" : "set_image", "xtype" : "Image", - "utf8 icon_name" : "go-previous", "$ xns" : "Gtk" } ] @@ -252,8 +252,8 @@ "items" : [ { "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);", - "xtype" : "Actor", "* pack" : "add_child", + "xtype" : "Actor", "$ xns" : "GtkClutter", "items" : [ { @@ -268,9 +268,9 @@ "$ tooltop_text" : "\"Open File\"", "items" : [ { + "xtype" : "Image", "utf8 icon_name" : "document-open", "* pack" : "set_image", - "xtype" : "Image", "$ xns" : "Gtk" } ] @@ -288,8 +288,8 @@ "items" : [ { "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);", - "xtype" : "Actor", "* pack" : "add_child", + "xtype" : "Actor", "$ xns" : "GtkClutter", "items" : [ { @@ -304,9 +304,9 @@ "height_request" : 50, "items" : [ { + "* pack" : "set_image", "xtype" : "Image", "utf8 icon_name" : "document-properties", - "* pack" : "set_image", "$ xns" : "Gtk" } ] @@ -324,8 +324,8 @@ "items" : [ { "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);", - "xtype" : "Actor", "* pack" : "add_child", + "xtype" : "Actor", "$ xns" : "GtkClutter", "items" : [ { @@ -340,9 +340,9 @@ "height_request" : 50, "items" : [ { + "utf8 icon_name" : "emblem-system", "* pack" : "set_image", "xtype" : "Image", - "utf8 icon_name" : "emblem-system", "$ xns" : "Gtk" } ] @@ -364,8 +364,8 @@ "items" : [ { "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);", - "xtype" : "Actor", "* pack" : "add_child", + "xtype" : "Actor", "$ xns" : "GtkClutter", "items" : [ { @@ -380,9 +380,9 @@ "height_request" : 50, "items" : [ { + "xtype" : "Image", "utf8 icon_name" : "list-add", "* pack" : "set_image", - "xtype" : "Image", "$ xns" : "Gtk" } ] @@ -400,8 +400,8 @@ "items" : [ { "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);", - "xtype" : "Actor", "* pack" : "add_child", + "xtype" : "Actor", "$ xns" : "GtkClutter", "items" : [ { @@ -416,9 +416,9 @@ "height_request" : 50, "items" : [ { + "* pack" : "set_image", "xtype" : "Image", "utf8 icon_name" : "format-justify-left", - "* pack" : "set_image", "$ xns" : "Gtk" } ] @@ -436,8 +436,8 @@ "items" : [ { "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);", - "xtype" : "Actor", "* pack" : "add_child", + "xtype" : "Actor", "$ xns" : "GtkClutter", "items" : [ { @@ -452,9 +452,9 @@ "height_request" : 50, "items" : [ { + "utf8 icon_name" : "appointment-new", "* pack" : "set_image", "xtype" : "Image", - "utf8 icon_name" : "appointment-new", "$ xns" : "Gtk" } ] @@ -472,8 +472,8 @@ "items" : [ { "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);", - "xtype" : "Actor", "* pack" : "add_child", + "xtype" : "Actor", "$ xns" : "GtkClutter", "items" : [ { @@ -488,9 +488,9 @@ "height_request" : 50, "items" : [ { + "* pack" : "set_image", "xtype" : "Image", "utf8 icon_name" : "folder-new", - "* pack" : "set_image", "$ xns" : "Gtk" } ] @@ -508,8 +508,8 @@ "items" : [ { "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);", - "xtype" : "Actor", "* pack" : "add_child", + "xtype" : "Actor", "$ xns" : "GtkClutter", "items" : [ { @@ -524,9 +524,9 @@ "height_request" : 50, "items" : [ { + "xtype" : "Image", "utf8 icon_name" : "document-new", "* pack" : "set_image", - "xtype" : "Image", "$ xns" : "Gtk" } ] @@ -544,8 +544,8 @@ "items" : [ { "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);", - "xtype" : "Actor", "* pack" : "add_child", + "xtype" : "Actor", "$ xns" : "GtkClutter", "items" : [ { @@ -560,9 +560,9 @@ "height_request" : 50, "items" : [ { + "* pack" : "set_image", "xtype" : "Image", "utf8 icon_name" : "user-trash", - "* pack" : "set_image", "$ xns" : "Gtk" } ] @@ -587,7 +587,7 @@ { "id" : "statusbar", "ulong handler_id" : "-1", - "* init" : "{\n this.handler_id = Resources.singleton().updateProgress.connect((pos) => {\n if (pos < 1) {\n this.el.hide();\n _this.mainpane.el.set_sensitive(true);\n \n return;\n }\n _this.mainpane.el.set_sensitive(false);\n \n this.el.show();\n var cid = this.el.get_context_id(\"resources\");\n this.el.remove_all(cid);\n this.el.push(cid,\"Fetching Resource : %s/7\".printf(pos.to_string()));\n });\n}\n", + "* init" : "{\n this.handler_id = Resources.singleton().updateProgress.connect((pos) => {\n if (pos < 1) {\n this.el.hide();\n _this.mainpane.el.set_sensitive(true);\n \n return;\n }\n _this.mainpane.el.set_sensitive(false);\n /* \n this.el.show();\n var cid = this.el.get_context_id(\"resources\");\n this.el.remove_all(cid);\n this.el.push(cid,\"Fetching Resource : %s/7\".printf(pos.to_string()));\n */ \n });\n}\n", "xtype" : "ProgressBar", "* pack" : "pack_start,true,true,0", "$ xns" : "Gtk" diff --git a/src/Builder4/MainWindow.vala b/src/Builder4/MainWindow.vala index 7b1e6e323..f39653fcf 100644 --- a/src/Builder4/MainWindow.vala +++ b/src/Builder4/MainWindow.vala @@ -2180,11 +2180,12 @@ public class Xcls_MainWindow : Object return; } _this.mainpane.el.set_sensitive(false); - + /* this.el.show(); var cid = this.el.get_context_id("resources"); this.el.remove_all(cid); this.el.push(cid,"Fetching Resource : %s/7".printf(pos.to_string())); + */ }); } } -- 2.39.2