X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Clones.bjs;h=90ae67ebfbdb9532d2f0adafc1085e385c8bb636;hb=249746a4b7e2920803f5a21a068fb001d9aa7932;hp=bc9c80c39d20417e54ce661b4d2874f5e4116fd3;hpb=3625ad54f98735f45b516deff21a35a96c2920f6;p=gitlive diff --git a/Clones.bjs b/Clones.bjs index bc9c80c3..90ae67eb 100644 --- a/Clones.bjs +++ b/Clones.bjs @@ -13,8 +13,8 @@ "response" : "(self, response_id) => { \n \n this.el.hide();\n \n}" }, "default_width" : 600, - "$ deletable" : true, "| 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", "default_height" : 500, @@ -24,8 +24,8 @@ "items" : [ { "id" : "Clones", - "$ pack" : " function(p,e) {\n p.el.get_content_area().pack_start(e.el,true,true,0)\n }\n", "xtype" : "VBox", + "$ pack" : " function(p,e) {\n p.el.get_content_area().pack_start(e.el,true,true,0)\n }\n", "$ xns" : "Gtk", "items" : [ { @@ -38,8 +38,8 @@ "clicked" : "function (self) {\n\n var rv = this.get('/reposView');\n var rs = this.get('/reposStore');\n if (rv.el.get_selection().count_selected_rows() != 1) {\n //nothing?\n // error condition.\n return;\n }\n var Remotes = imports.Remotes.Remotes;\n \n \n var ret = {}; \n var s = rv.el.get_selection();\n var path = '';\n s.selected_foreach(function(model,p,iter) {\n \n path = model.get_value(iter, 6).value.get_string();\n \n }); \n\n var repo = false;\n rs.repos.forEach(function(r) {\n if (r.repopath == path) {\n repo = r;\n \n }\n \n });\n Remotes.repo = repo;\n Remotes.el.set_transient_for(Clones.el);\n Clones.el.set_title(\"Manage Clones - \" + repo.repopath);\n Remotes.show();\n Clones.el.set_title(\"Manage Clones\");\n\n \n \n \n \n\n \n \n \n}" }, "label" : "Remotes / Clones", - "xtype" : "Button", "* pack" : "add", + "xtype" : "Button", "$ xns" : "Gtk" }, { @@ -47,17 +47,17 @@ "clicked" : "function (self) {\n\n var rv = this.get('/reposView');\n var rs = this.get('/reposStore');\n if (rv.el.get_selection().count_selected_rows() != 1) {\n //nothing?\n // error condition.\n return;\n }\n var Branches = imports.Branches.Branches;\n \n \n var ret = {}; \n var s = rv.el.get_selection();\n var path = '';\n s.selected_foreach(function(model,p,iter) {\n \n path = model.get_value(iter, 6).value.get_string();\n \n }); \n\n var repo = false;\n rs.repos.forEach(function(r) {\n if (r.repopath == path) {\n repo = r;\n \n }\n \n });\n Branches.repo = repo;\n Branches.el.set_transient_for(Clones.el);\n Clones.el.set_title(\"Manage Clones - \" + repo.repopath);\n Branches.show();\n Clones.el.set_title(\"Manage Clones\");\n\n \n \n \n \n\n \n \n \n}" }, "label" : "Branches", - "xtype" : "Button", "* pack" : "add", + "xtype" : "Button", "$ xns" : "Gtk" }, { "listeners" : { "clicked" : "function (self) {\n\n var rv = this.get('/reposView');\n var rs = this.get('/reposStore');\n if (rv.el.get_selection().count_selected_rows() != 1) {\n //nothing?\n // error condition.\n return;\n }\n var Merger = imports.Merger.Merger;\n \n \n var ret = {}; \n var s = rv.el.get_selection();\n var path = '';\n s.selected_foreach(function(model,p,iter) {\n \n path = model.get_value(iter, 6).value.get_string();\n \n }); \n\n var repo = false;\n rs.repos.forEach(function(r) {\n if (r.repopath == path) {\n repo = r;\n \n }\n \n });\n Merger.repo = repo;\n Merger.el.set_transient_for(Clones.el);\n Clones.el.set_title(\"Manage Clones - \" + repo.repopath);\n Merger.show();\n Clones.el.set_title(\"Manage Clones\");\n\n \n \n\n \n\n \n \n \n \n\n \n \n \n}" }, - "label" : "Run Merger", - "xtype" : "Button", + "label" : "Merge", "* pack" : "add", + "xtype" : "Button", "$ xns" : "Gtk" }, { @@ -65,8 +65,8 @@ "clicked" : "function (self) {\n \n \n \n \n \n \n}" }, "label" : "Switch Branch", - "xtype" : "Button", "* pack" : "add", + "xtype" : "Button", "$ xns" : "Gtk" }, { @@ -74,8 +74,8 @@ "clicked" : "function (self) {\n \n \n \n \n \n \n}" }, "label" : "Pull", - "xtype" : "Button", "* pack" : "add", + "xtype" : "Button", "$ xns" : "Gtk" } ] @@ -106,8 +106,8 @@ }, { "* init" : "function() {\n XObject.prototype.init.call(this);\n this.el.add_attribute(this.items[0].el , 'active', 4 );\n this.items[0].el.set_activatable(true);\n\n}\n", - "title" : "Auto Commit", "* pack" : "append_column", + "title" : "Auto Commit", "xtype" : "TreeViewColumn", "min_width" : 50, "$ xns" : "Gtk", @@ -125,8 +125,8 @@ }, { "* init" : "function() {\n XObject.prototype.init.call(this);\n this.el.add_attribute(this.items[0].el , 'active', 5 );\n this.items[0].el.set_activatable(true);\n}\n", - "title" : "Auto Push", "* pack" : "append_column", + "title" : "Auto Push", "xtype" : "TreeViewColumn", "min_width" : 50, "$ xns" : "Gtk", @@ -144,8 +144,8 @@ }, { "* init" : "function() {\n XObject.prototype.init.call(this);\n this.el.add_attribute(this.items[0].el , 'markup', 0 );\n\n}\n", - "* pack" : "append_column", "title" : "Repo", + "* pack" : "append_column", "xtype" : "TreeViewColumn", "min_width" : 200, "$ xns" : "Gtk", @@ -160,8 +160,8 @@ }, { "* init" : "function() {\n XObject.prototype.init.call(this);\n this.el.add_attribute(this.items[0].el , 'markup', 1 );\n this.el.add_attribute(this.items[0].el , 'cell-background', 7 );\n\n}\n", - "title" : "Current Branch", "* pack" : "append_column", + "title" : "Current Branch", "xtype" : "TreeViewColumn", "min_width" : 50, "$ xns" : "Gtk", @@ -175,8 +175,8 @@ }, { "* init" : "function() {\n XObject.prototype.init.call(this);\n this.el.add_attribute(this.items[0].el , 'markup', 3 );\n\n}\n", - "title" : "Last updated", "* pack" : "append_column", + "title" : "Last updated", "xtype" : "TreeViewColumn", "min_width" : 50, "$ xns" : "Gtk", @@ -190,8 +190,8 @@ }, { "* init" : "function() {\n XObject.prototype.init.call(this);\n this.el.add_attribute(this.items[0].el , 'markup', 2 );\n\n}\n", - "* pack" : "append_column", "title" : "All Branches", + "* pack" : "append_column", "xtype" : "TreeViewColumn", "min_width" : 50, "$ xns" : "Gtk", @@ -232,4 +232,4 @@ ] } ] -} +} \ No newline at end of file