X-Git-Url: http://git.roojs.org/?p=app.Builder.js;a=blobdiff_plain;f=src%2FBuilder4%2FMainWindow.bjs;h=78d571b75d26645850f21b90929f17bb7f8c0216;hp=0aa76a742ade51308b81a4b8a8b0ebac213f1be5;hb=af330f9a259da55dddb96000ec0f0b7e01eac26e;hpb=81a2d60fa121fec5f9c4a8e50c3c60dbc0a758ae diff --git a/src/Builder4/MainWindow.bjs b/src/Builder4/MainWindow.bjs index 0aa76a742..78d571b75 100644 --- a/src/Builder4/MainWindow.bjs +++ b/src/Builder4/MainWindow.bjs @@ -32,8 +32,8 @@ "items" : [ { "id" : "headerbar", - "xtype" : "HeaderBar", "* pack" : "set_titlebar", + "xtype" : "HeaderBar", "bool show_close_button" : true, "$ xns" : "Gtk", "string title" : "Application Builder", @@ -46,8 +46,8 @@ "items" : [ { "bool use_popover" : false, - "xtype" : "MenuButton", "* pack" : "add", + "xtype" : "MenuButton", "$ xns" : "Gtk", "items" : [ { @@ -61,9 +61,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}" }, + "string label" : "Open a new Window", "* pack" : "append", "xtype" : "MenuItem", - "string label" : "Open a new Window", "$ xns" : "Gtk" }, { @@ -75,26 +75,26 @@ "listeners" : { "activate" : " ( ) => {\n Resources.singleton().fetchStart();\n}" }, + "xtype" : "MenuItem", "string label" : "Download updated Resources", "* pack" : "append", - "xtype" : "MenuItem", "$ xns" : "Gtk" }, { "listeners" : { "activate" : "() => {\n About.singleton().el.show();\n }" }, + "* pack" : "append", "xtype" : "MenuItem", "string label" : "About the Builder", - "* pack" : "append", "$ xns" : "Gtk" } ] }, { + "utf8 icon_name" : "help-about", "* pack" : "set_image", "xtype" : "Image", - "utf8 icon_name" : "help-about", "$ xns" : "Gtk" } ] @@ -105,8 +105,8 @@ }, { "id" : "vbox", - "* pack" : "add", "xtype" : "Box", + "* pack" : "add", "$ xns" : "Gtk", "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL", "$ homogeneous" : false, @@ -122,29 +122,29 @@ "items" : [ { "id" : "leftpane", - "xtype" : "Box", "* pack" : "add1", + "xtype" : "Box", "$ xns" : "Gtk", "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL", "items" : [ { "id" : "editpane", - "xtype" : "Paned", "* pack" : "pack_start,true,true,0", + "xtype" : "Paned", "$ xns" : "Gtk", "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL", "items" : [ { "id" : "tree", - "xtype" : "Box", "* pack" : "add1", + "xtype" : "Box", "$ xns" : "Gtk", "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL" }, { "id" : "props", - "xtype" : "Box", "* pack" : "add2", + "xtype" : "Box", "$ xns" : "Gtk", "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL" } @@ -225,8 +225,8 @@ "items" : [ { "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);", - "xtype" : "Actor", "* pack" : "add_child", + "xtype" : "Actor", "$ xns" : "GtkClutter", "items" : [ { @@ -234,16 +234,16 @@ "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.PREVIEW);\n \n\n}" }, "utf8 tooltip_text" : "Back", - "* pack" : false, "xtype" : "Button", + "* pack" : false, "width_request" : 50, "$ xns" : "Gtk", "height_request" : 50, "items" : [ { + "xtype" : "Image", "utf8 icon_name" : "go-previous", "* pack" : "set_image", - "xtype" : "Image", "$ xns" : "Gtk" } ] @@ -261,8 +261,8 @@ "items" : [ { "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);", - "* pack" : "add_child", "xtype" : "Actor", + "* pack" : "add_child", "$ xns" : "GtkClutter", "items" : [ { @@ -277,9 +277,9 @@ "$ tooltop_text" : "\"Open File\"", "items" : [ { + "* pack" : "set_image", "xtype" : "Image", "utf8 icon_name" : "document-open", - "* pack" : "set_image", "$ xns" : "Gtk" } ] @@ -297,8 +297,8 @@ "items" : [ { "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);", - "* pack" : "add_child", "xtype" : "Actor", + "* pack" : "add_child", "$ xns" : "GtkClutter", "items" : [ { @@ -313,9 +313,9 @@ "height_request" : 50, "items" : [ { + "utf8 icon_name" : "document-properties", "* pack" : "set_image", "xtype" : "Image", - "utf8 icon_name" : "document-properties", "$ xns" : "Gtk" } ] @@ -333,8 +333,8 @@ "items" : [ { "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);", - "* pack" : "add_child", "xtype" : "Actor", + "* pack" : "add_child", "$ xns" : "GtkClutter", "items" : [ { @@ -349,9 +349,9 @@ "height_request" : 50, "items" : [ { + "xtype" : "Image", "utf8 icon_name" : "emblem-system", "* pack" : "set_image", - "xtype" : "Image", "$ xns" : "Gtk" } ] @@ -373,8 +373,8 @@ "items" : [ { "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);", - "* pack" : "add_child", "xtype" : "Actor", + "* pack" : "add_child", "$ xns" : "GtkClutter", "items" : [ { @@ -389,9 +389,9 @@ "height_request" : 50, "items" : [ { + "* pack" : "set_image", "xtype" : "Image", "utf8 icon_name" : "list-add", - "* pack" : "set_image", "$ xns" : "Gtk" } ] @@ -409,8 +409,8 @@ "items" : [ { "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);", - "* pack" : "add_child", "xtype" : "Actor", + "* pack" : "add_child", "$ xns" : "GtkClutter", "items" : [ { @@ -425,9 +425,9 @@ "height_request" : 50, "items" : [ { + "utf8 icon_name" : "format-justify-left", "* pack" : "set_image", "xtype" : "Image", - "utf8 icon_name" : "format-justify-left", "$ xns" : "Gtk" } ] @@ -445,8 +445,8 @@ "items" : [ { "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);", - "* pack" : "add_child", "xtype" : "Actor", + "* pack" : "add_child", "$ xns" : "GtkClutter", "items" : [ { @@ -461,9 +461,9 @@ "height_request" : 50, "items" : [ { + "xtype" : "Image", "utf8 icon_name" : "appointment-new", "* pack" : "set_image", - "xtype" : "Image", "$ xns" : "Gtk" } ] @@ -481,8 +481,8 @@ "items" : [ { "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);", - "* pack" : "add_child", "xtype" : "Actor", + "* pack" : "add_child", "$ xns" : "GtkClutter", "items" : [ { @@ -497,9 +497,9 @@ "height_request" : 50, "items" : [ { + "utf8 icon_name" : "folder-new", "* pack" : "set_image", "xtype" : "Image", - "utf8 icon_name" : "folder-new", "$ xns" : "Gtk" } ] @@ -517,8 +517,8 @@ "items" : [ { "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);", - "* pack" : "add_child", "xtype" : "Actor", + "* pack" : "add_child", "$ xns" : "GtkClutter", "items" : [ { @@ -533,9 +533,9 @@ "height_request" : 50, "items" : [ { + "* pack" : "set_image", "xtype" : "Image", "utf8 icon_name" : "document-new", - "* pack" : "set_image", "$ xns" : "Gtk" } ] @@ -553,8 +553,8 @@ "items" : [ { "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);", - "* pack" : "add_child", "xtype" : "Actor", + "* pack" : "add_child", "$ xns" : "GtkClutter", "items" : [ { @@ -569,9 +569,9 @@ "height_request" : 50, "items" : [ { + "utf8 icon_name" : "user-trash", "* pack" : "set_image", "xtype" : "Image", - "utf8 icon_name" : "user-trash", "$ xns" : "Gtk" } ] @@ -590,21 +590,21 @@ }, { "bool homogeneous" : false, - "xtype" : "Box", "* pack" : "pack_end,false,true,0", + "xtype" : "Box", "$ xns" : "Gtk", "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL", "items" : [ { + "* pack" : "pack_start,true,true,0", "xtype" : "Label", "string label" : " ", - "* pack" : "pack_start,true,true,0", "$ xns" : "Gtk" }, { "bool show_text" : true, - "id" : "statusbar", "ulong handler_id" : "-1", + "id" : "statusbar", "* init" : "{\n this.handler_id = Resources.singleton().updateProgress.connect((pos,total) => {\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 this.el.show();\n this.el.set_fraction ((1.0f * pos) / (1.0f * total));\n this.el.set_text(\"Fetching Resource : %s/%s\".printf(pos.to_string(), total.to_string()));\n \n });\n}\n", "xtype" : "ProgressBar", "* pack" : "pack_start,true,true,0", @@ -618,9 +618,9 @@ "id" : "search_entry", "* init" : "var description = Pango.FontDescription.from_string(\"monospace\");\n\tdescription.set_size(8000);\n\t this.el.override_font(description);\n\n", "* pack" : "pack_start,false,true,0", - "xtype" : "Entry", + "xtype" : "SearchEntry", "$ xns" : "Gtk", - "| void forwardSearch" : "(bool change_focus) {\n\tswitch(_this.windowstate.state) {\n\t\tcase WindowState.State.CODEONLY:\n\t\tcase WindowState.State.CODE:\n\t\t\t// search the code being edited..\n\t\t\t_this.windowstate.code_editor.forwardSearch();\n\t\t\t\n\t\t\tbreak;\n\t\tcase WindowState.State.PREVIEW:\n\t\t\tif (_this.windowstate.file.xtype == \"Gtk\") {\n\t\t\t\t_this.windowstate.window_gladeview.forwardSearch(change_focus);\n\t\t\t} else { \n\t\t\t\t _this.windowstate.window_rooview.forwardSearch(change_focus);\n\t\t\t}\n\t\t\n\t\t\tbreak;\n\t}\n}\n" + "| void forwardSearch" : "(bool change_focus) {\n\tswitch(_this.windowstate.state) {\n\t\tcase WindowState.State.CODEONLY:\n\t\tcase WindowState.State.CODE:\n\t\t\t// search the code being edited..\n\t\t\t_this.windowstate.code_editor.forwardSearch(change_focus);\n\t\t\t\n\t\t\tbreak;\n\t\tcase WindowState.State.PREVIEW:\n\t\t\tif (_this.windowstate.file.xtype == \"Gtk\") {\n\t\t\t\t_this.windowstate.window_gladeview.forwardSearch(change_focus);\n\t\t\t} else { \n\t\t\t\t _this.windowstate.window_rooview.forwardSearch(change_focus);\n\t\t\t}\n\t\t\n\t\t\tbreak;\n\t}\n\t\n}\n" }, { "* pack" : "pack_end,false,true,0", @@ -640,18 +640,18 @@ "$ xns" : "Gtk", "items" : [ { + "* pack" : "set_image", "xtype" : "Image", "utf8 icon_name" : "system-search", - "* pack" : "set_image", "bool sensitive" : false, "$ xns" : "Gtk" } ] }, { + "xtype" : "MenuItem", "string label" : "Compile Status:", "* pack" : "add", - "xtype" : "MenuItem", "$ xns" : "Gtk" }, { @@ -669,9 +669,9 @@ "$ xns" : "Gtk", "items" : [ { + "xtype" : "Image", "utf8 icon_name" : "dialog-error", "* pack" : "set_image", - "xtype" : "Image", "$ xns" : "Gtk" } ] @@ -691,9 +691,9 @@ "$ xns" : "Gtk", "items" : [ { + "* pack" : "set_image", "xtype" : "Image", "utf8 icon_name" : "dialog-warning", - "* pack" : "set_image", "$ xns" : "Gtk" } ] @@ -713,9 +713,9 @@ "$ xns" : "Gtk", "items" : [ { + "utf8 icon_name" : "dialog-information", "* pack" : "set_image", "xtype" : "Image", - "utf8 icon_name" : "dialog-information", "$ xns" : "Gtk" } ] @@ -733,9 +733,9 @@ "$ xns" : "Gtk", "items" : [ { + "* pack" : "set_image", "xtype" : "Image", "utf8 icon_name" : "media-playback-start", - "* pack" : "set_image", "$ xns" : "Gtk" } ]