From e87c3e14d442c4a31fe57fd5b25432af411714a7 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Fri, 11 Aug 2017 13:01:14 +0800 Subject: [PATCH] Branches.bjs Clones.bjs Commit.bjs FixBug.bjs Merger.bjs RemoteEdit.bjs Remotes.bjs --- Branches.bjs | 152 ---------------------- Clones.bjs | 235 ---------------------------------- Commit.bjs | 161 ------------------------ FixBug.bjs | 335 ------------------------------------------------- Merger.bjs | 276 ---------------------------------------- RemoteEdit.bjs | 102 --------------- Remotes.bjs | 152 ---------------------- 7 files changed, 1413 deletions(-) delete mode 100644 Branches.bjs delete mode 100644 Clones.bjs delete mode 100644 Commit.bjs delete mode 100644 FixBug.bjs delete mode 100644 Merger.bjs delete mode 100644 RemoteEdit.bjs delete mode 100644 Remotes.bjs diff --git a/Branches.bjs b/Branches.bjs deleted file mode 100644 index 74bf62f3..00000000 --- a/Branches.bjs +++ /dev/null @@ -1,152 +0,0 @@ -{ - "id": "file-gtk-1", - "name": "Branches", - "parent": "", - "title": false, - "path": "/home/alan/gitlive/gitlive/Branches.bjs", - "items": [ - { - "listeners": { - "destroy_event": "function (self, event) {\n this.el.hide();\n return false;\n}", - "response": "function (self, id) {\n // hide\n //if (id < 1) {\n this.el.hide();\n return;\n //}\n if (typeof(this.get('bug').getValue()) != 'object') {\n print(\"ERROR\");\n return;\n }\n \n this.el.hide();\n \n //var val = this.get('bug').getValue();\n // Seed.print(val);\n}" - }, - " modal": true, - "border_width": 3, - "default_height": 300, - "default_width": 500, - "title": "Branches", - "xtype": "Dialog", - "|deletable": "true", - "|modal": "true", - "|show": "function(c) {\n \n if (!this.el) {\n this.init();\n }\n var _this = this;\n this.get('/branchStore').load();\n this.el.show_all();\n \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 \n}\n", - "|xns": "Gtk", - "items": [ - { - "xtype": "VBox", - "|pack": " function(p,e) {\n p.el.get_content_area().pack_start(e.el,true,true,0)\n }\n", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start,false,true", - "xtype": "HBox", - "|xns": "Gtk", - "items": [ - { - "listeners": { - "clicked": "function (self) {\n\n return;\n var RemoteEdit= imports.RemoteEdit.RemoteEdit\n RemoteEdit.repo = Remotes.repo;\n RemoteEdit.el.set_transient_for(Remotes.el);\n\n var res = RemoteEdit.show();\n \n if (res != false) {\n Remotes.repo.remotes(res);\n }\n \n this.get('/remotesStore').load();\n\n \n}" - }, - "label": "Pull", - "pack": "add", - "xtype": "Button", - "|xns": "Gtk" - } - ] - }, - { - "xtype": "ScrolledWindow", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)\n}\n", - "|xns": "Gtk", - "items": [ - { - "listeners": { - "cursor_changed": "function (self)\n{\n\n return;\n // SEE SELECTION.CHANGED\n if (this.el.get_selection().count_selected_rows() < 1) {\n //nothing? - clea it?\n return;\n }\n var ret = {}; \n var model = this.get('/changedFilesStore');\n\n var s = this.el.get_selection();\n var files = [];\n s.selected_foreach(function(model,p,iter) {\n \n files.push( model.get_value(iter, 0).value.get_string());\n \n });\n this.get('/patchview').showDiff(files); \n //var value = ''+ ret.model.get_value(ret.iter, 1).value.get_string();\n //print(\"OUT?\" + value);// id..\n // load the list in the right grid..\n \n return true;\n\n}" - }, - "id": "branchView", - "pack": "add", - "xtype": "TreeView", - "|init": "function() {\n XObject.prototype.init.call(this);\n var description = new Pango.FontDescription.c_new();\n description.set_size(8000);\n this.el.modify_font(description);\n\n this.selection = this.el.get_selection();\n this.selection.set_mode( Gtk.SelectionMode.MULTIPLE);\n var _this = this;\n this.selection.signal['changed'].connect(function() {\n _this.listeners.cursor_changed.apply(\n _this, [ _this, '']\n );\n });\n }\n", - "|xns": "Gtk", - "items": [ - { - "id": "branchStore", - "pack": "set_model", - "xtype": "ListStore", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.set_column_types ( 3, [\n GObject.TYPE_STRING, // file \n GObject.TYPE_STRING, // added\n GObject.TYPE_STRING, // removed\n ] );\n}\n", - "|load": "function(tr)\n{\n //this.insert(citer,iter,0);\n this.el.clear();\n \n var tr = Branches.repo.getBranches();\n \n \n for(var i =0 ; i < tr.length; i++) {\n var ret = { };\n \n this.el.append(ret);\n \n //print(JSON.stringify(ret,null,4));\n var lastrev = tr[i].lastrev;\n var remoterev = tr[i].remoterev;\n \n var lastrev = lastrev.length ? lastrev : remoterev;\n \n if (lastrev != remoterev) {\n lastrev = \"Out of sync: remote=\" + remoterev + \", local=\" + lastrev;\n }\n \n \n \n this.el.set_value(ret.iter, 0, '' + tr[i].name );\n this.el.set_value(ret.iter, 1, '' + tr[i].remote );\n this.el.set_value(ret.iter, 2, '' + lastrev );\n \n \n } \n}", - "|xns": "Gtk" - }, - { - "min_width": 70, - "pack": "append_column", - "resizable": true, - "title": "Local", - "xtype": "TreeViewColumn", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.add_attribute(this.items[0].el , 'markup', 0 );\n\n}\n", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start", - "xtype": "CellRendererText", - "|xns": "Gtk" - } - ] - }, - { - "min_width": 70, - "pack": "append_column", - "resizable": true, - "title": "Remote", - "xtype": "TreeViewColumn", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.add_attribute(this.items[0].el , 'markup', 1 );\n\n}\n", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start", - "xtype": "CellRendererText", - "|xns": "Gtk" - } - ] - }, - { - "min_width": 200, - "pack": "append_column", - "title": "Status", - "xtype": "TreeViewColumn", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.add_attribute(this.items[0].el , 'markup', 2 );\n\n}\n", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start", - "xtype": "CellRendererText", - "|xns": "Gtk" - } - ] - } - ] - }, - { - "|xns": "Gtk", - "xtype": "TreeView", - "pack": false, - "items": [ - { - "|xns": "Gtk", - "xtype": "ListStore", - "pack": false - } - ] - } - ] - } - ] - }, - { - "label": "Cancel", - "pack": "add_action_widget,0", - "xtype": "Button", - "|xns": "Gtk", - "listeners": {} - }, - { - "id": "ok_button", - "label": "OK", - "pack": "add_action_widget,1", - "xtype": "Button", - "|xns": "Gtk" - } - ] - } - ], - "permname": "", - "modOrder": "" -} \ No newline at end of file diff --git a/Clones.bjs b/Clones.bjs deleted file mode 100644 index a51abb81..00000000 --- a/Clones.bjs +++ /dev/null @@ -1,235 +0,0 @@ -{ - "id": "file-gtk-2", - "name": "Clones", - "parent": "", - "title": false, - "path": "/home/alan/gitlive/gitlive/Clones.bjs", - "items": [ - { - "listeners": { - "destroy_event": "function (self, event) {\n print(\"DESTROY?!\");\n return true;\n}", - "response": "function (self, id) {\n // hide\n //if (id < 1) {\n this.el.hide();\n return;\n //}\n if (typeof(this.get('bug').getValue()) != 'object') {\n print(\"ERROR\");\n return;\n }\n \n this.el.hide();\n \n //var val = this.get('bug').getValue();\n // Seed.print(val);\n}" - }, - "border_width": 3, - "default_height": 500, - "default_width": 600, - "title": "Manage Clones", - "xtype": "Dialog", - "|deletable": "true", - "|modal": "true", - "|show": "function(c) {\n \n if (!this.el) {\n this.init();\n }\n var _this = this;\n /*[ 'xtype' ].forEach(function(k) {\n _this.get(k).setValue(typeof(c[k]) == 'undefined' ? '' : c[k]);\n });\n\t// shouild set path..\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", - "|xns": "Gtk", - "items": [ - { - "id": "Clones", - "xtype": "VBox", - "|pack": " function(p,e) {\n p.el.get_content_area().pack_start(e.el,true,true,0)\n }\n", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start,false,true", - "xtype": "HBox", - "|xns": "Gtk", - "items": [ - { - "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 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", - "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 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", - "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", - "pack": "add", - "xtype": "Button", - "|xns": "Gtk" - }, - { - "listeners": { - "clicked": "function (self) {\n \n \n \n \n \n \n}" - }, - "label": "Switch Branch", - "pack": "add", - "xtype": "Button", - "|xns": "Gtk" - }, - { - "listeners": { - "clicked": "function (self) {\n \n \n \n \n \n \n}" - }, - "label": "Pull", - "pack": "add", - "xtype": "Button", - "|xns": "Gtk" - } - ] - }, - { - "xtype": "ScrolledWindow", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)\n}\n", - "|xns": "Gtk", - "items": [ - { - "listeners": { - "cursor_changed": "function (self) {\n // SEE SELECTION.CHANGED\n \n \n return;\n \n if (this.el.get_selection().count_selected_rows() < 1) {\n //nothing? - clea it?\n return;\n }\n var ret = {}; \n var model = this.get('/changedFilesStore');\n\n var s = this.el.get_selection();\n var files = [];\n s.selected_foreach(function(model,p,iter) {\n \n files.push( model.get_value(iter, 0).value.get_string());\n \n });\n this.get('/patchview').showDiff(files); \n //var value = ''+ ret.model.get_value(ret.iter, 1).value.get_string();\n //print(\"OUT?\" + value);// id..\n // load the list in the right grid..\n \n return true;\n\n}" - }, - "id": "reposView", - "pack": "add", - "xtype": "TreeView", - "|init": "function() {\n XObject.prototype.init.call(this);\n var description = new Pango.FontDescription.c_new();\n description.set_size(10000);\n this.el.modify_font(description);\n\n this.selection = this.el.get_selection();\n this.selection.set_mode( Gtk.SelectionMode.MULTIPLE);\n var _this = this;\n \n \n this.selection.signal['changed'].connect(function() {\n _this.listeners.cursor_changed.apply(\n _this, [ _this, '']\n );\n });\n }\n", - "|xns": "Gtk", - "items": [ - { - "id": "reposStore", - "pack": "set_model", - "xtype": "ListStore", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.set_column_types ( 8, [\n GObject.TYPE_STRING, // repo \n GObject.TYPE_STRING, // current branch\n GObject.TYPE_STRING, // all branch \n GObject.TYPE_STRING, // updated\n GObject.TYPE_BOOLEAN, // auto-commit\n GObject.TYPE_BOOLEAN, // auto-push\n GObject.TYPE_STRING, // repopath\n GObject.TYPE_STRING // color highighling \n ] );\n}\n", - "|load": "function()\n{\n //this.insert(citer,iter,0);\n print(\"getting list\");\n this.repos = imports.Scm.Repo.Repo.list();\n var tr= this.repos;\n this.el.clear();\n \n for(var i =0 ; i < tr.length; i++) {\n var ret = { };\n \n this.el.append(ret);\n \n //print(JSON.stringify(ret,null,4));\n tr[i].getBranches();\n tr[i].getStatus();\n var hi;\n try {\n //tr[i].debug=1;\n hi = tr[i].history('/', 1, 'branch', tr[i].currentBranch.name );\n// print(JSON.stringify(hi,null,4));\n } catch(e) { print(e);}\n \n this.el.set_value(ret.iter, 0, '' + tr[i].repopath.split('/').pop() );\n this.el.set_value(ret.iter, 1, '' + tr[i].currentBranch.name );\n this.el.set_value(ret.iter, 2, '' + tr[i].branches.map(\n function(e) { return e.name; \n }).join(', ') \n );\n this.el.set_value(ret.iter, 3, '' + (!hi ? '??' : hi[0].changed_raw)); \n this.el.set_value(ret.iter, 4, tr[i].autocommit() ); \n this.el.set_value(ret.iter, 5, tr[i].autopush() ); \n this.el.set_value(ret.iter, 6, tr[i].repopath ); \n // highlight color.\n var cb = tr[i].currentBranch;\n //print(JSON.stringify(cb,null,4));\n var col = '#ffffff';\n if (cb.lastrev != cb.remoterev) {\n col = '#ff0000';\n }\n if (tr[i].hasLocalChanges) {\n col = '#0000ff';\n }\n if ((cb.lastrev != cb.remoterev) && (tr[i].hasLocalChanges)) {\n col = '#ff00ff';\n }\n \n this.el.set_value(ret.iter, 7, col ); \n \n } \n}", - "|pathToRepo": "function(path) {\n\n var tr= this.repos;\n\n \n for(var i =0 ; i < tr.length; i++) {\n if (tr[i].repopath == path) {\n return tr[i];\n }\n } \n return false; \n}\n", - "|xns": "Gtk" - }, - { - "min_width": 50, - "pack": "append_column", - "title": "Auto Commit", - "xtype": "TreeViewColumn", - "|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", - "|xns": "Gtk", - "items": [ - { - "listeners": { - "toggled": "function (self, path) {\n var ret ={} ;\n var store = this.get('/reposStore');\n store.el.get_iter_from_string(ret, path);\n \n var value = store.el.get_value(ret.iter,4).value.get_boolean();\n \n //print(JSON.stringify(value));\n store.el.set_value(ret.iter,4, !value);\n \n var path = store.el.get_value(ret.iter, 6).value.get_string();\n var repo = imports.Scm.Repo.Repo.get(path);\n repo.autocommit(!value);\n \n \n \n}" - }, - "pack": "pack_start", - "xtype": "CellRendererToggle", - "|mode": "Gtk.CellRendererMode.ACTIVATABLE", - "|xns": "Gtk" - } - ] - }, - { - "min_width": 50, - "pack": "append_column", - "title": "Auto Push", - "xtype": "TreeViewColumn", - "|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", - "|xns": "Gtk", - "items": [ - { - "listeners": { - "toggled": "function (self, path) {\n var ret ={} ;\n var store = this.get('/reposStore');\n store.el.get_iter_from_string(ret, path);\n \n var value = store.el.get_value(ret.iter,5).value.get_boolean();\n \n //print(JSON.stringify(value));\n store.el.set_value(ret.iter,5, !value);\n var path = store.el.get_value(ret.iter, 6).value.get_string();\n var repo = imports.Scm.Repo.Repo.get(path);\n repo.autopush(!value);\n \n}" - }, - "pack": "pack_start", - "xtype": "CellRendererToggle", - "|mode": "Gtk.CellRendererMode.ACTIVATABLE", - "|xns": "Gtk" - } - ] - }, - { - "min_width": 200, - "pack": "append_column", - "resizable": true, - "title": "Repo", - "xtype": "TreeViewColumn", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.add_attribute(this.items[0].el , 'markup', 0 );\n\n}\n", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start", - "xtype": "CellRendererText", - "|xns": "Gtk" - } - ] - }, - { - "min_width": 50, - "pack": "append_column", - "title": "Current Branch", - "xtype": "TreeViewColumn", - "|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", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start", - "xtype": "CellRendererText", - "|xns": "Gtk" - } - ] - }, - { - "min_width": 50, - "pack": "append_column", - "title": "Last updated", - "xtype": "TreeViewColumn", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.add_attribute(this.items[0].el , 'markup', 3 );\n\n}\n", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start", - "xtype": "CellRendererText", - "|xns": "Gtk" - } - ] - }, - { - "min_width": 50, - "pack": "append_column", - "resizable": false, - "title": "All Branches", - "xtype": "TreeViewColumn", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.add_attribute(this.items[0].el , 'markup', 2 );\n\n}\n", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start", - "xtype": "CellRendererText", - "|xns": "Gtk" - } - ] - } - ] - }, - { - "|xns": "Gtk", - "xtype": "TreeView", - "pack": false, - "items": [ - { - "|xns": "Gtk", - "xtype": "ListStore", - "pack": false - } - ] - } - ] - } - ] - }, - { - "id": "ok_button", - "label": "Close", - "pack": "add_action_widget,1", - "xtype": "Button", - "|xns": "Gtk" - } - ] - } - ], - "permname": "", - "modOrder": "" -} \ No newline at end of file diff --git a/Commit.bjs b/Commit.bjs deleted file mode 100644 index b24740e6..00000000 --- a/Commit.bjs +++ /dev/null @@ -1,161 +0,0 @@ -{ - "id": "file-gtk-3", - "name": "Commit", - "parent": "", - "title": false, - "path": "/home/alan/gitlive/gitlive/Commit.bjs", - "items": [ - { - "listeners": { - "destroy_event": "function (self, event) {\n this.el.hide();\n return false;\n}", - "response": "function (self, id) {\n // hide\n //if (id < 1) {\n this.el.hide();\n return;\n //}\n if (typeof(this.get('bug').getValue()) != 'object') {\n print(\"ERROR\");\n return;\n }\n \n this.el.hide();\n \n //var val = this.get('bug').getValue();\n // Seed.print(val);\n}" - }, - " modal": true, - "border_width": 3, - "default_height": 500, - "default_width": 800, - "title": "Commit", - "xtype": "Dialog", - "|deletable": "true", - "|modal": "true", - "|show": "function(c) {\n \n if (!this.el) {\n this.init();\n }\n var _this = this;\n \n \n this.files = c.files;\n this.release = c.release;\n this.rev = c.rev;\n \n this.repo = c.repo;\n\n this.get('/commitDate').el.set_text(c.changed);\n this.get('/commitAuthor').el.set_text(c.author);\n this.get('/commitMsg').el.get_buffer().set_text('');\n this.get('/commitPatch').showDiff(c.files);\n \n this.el.show_all();\n \n var run_ret = this.el.run();\n if (run_ret < 1 ) {\n return false;\n }\n var buf = this.get('/commitMsg').el.get_buffer();\n var e = {};\n var s = {};\n buf.get_start_iter(s);\n buf.get_end_iter(e);\n \n var ret= {\n date : this.get('/commitDate').el.get_text(),\n author : this.get('/commitAuthor').el.get_text(),\n message : buf.get_text(s.value, e.value, false)\n };\n \n return ret;\n \n \n \n}\n", - "|xns": "Gtk", - "items": [ - { - "xtype": "VBox", - "|pack": " function(p,e) {\n p.el.get_content_area().pack_start(e.el,true,true,10);\n }\n", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start,false,true,2", - "xtype": "HBox", - "|xns": "Gtk", - "items": [ - { - "label": "Fixes", - "pack": "pack_start,false,false,10", - "width_request": 50, - "xtype": "Label", - "|xns": "Gtk" - }, - { - "listeners": { - "changed": "function (self) {\n var val = this.el.get_child().get_text();\n print(JSON.stringify(val));\n if (!val.length) {\n return;\n }\n \n var name = this.get('/remoteName').el.get_text();\n if (name.length) {\n return;\n }\n // fill in name\n var val = imports.Scm.Git.Repo.Repo.parseURL(val);\n if ((typeof(val.host) != 'undefined') && val.host.length) {\n var host = val.host;\n // need to add github owner...\n if (host.match(/github.com$/)) {\n host += '.' + val.path.split('/').shift();\n }\n \n \n this.get('/remoteName').el.set_text(host);\n }\n \n \n}" - }, - "id": "commitFixes", - "xtype": "ComboBox", - "|init": "function() {\n this.el = new Gtk.ComboBox.with_entry();\n \n \n this.model = new XObject(this.model);\n this.model.init();\n this.el.set_model(this.model.el);\n this.el.set_entry_text_column (0);\n XObject.prototype.init.call(this);\n \n}\n", - "|load": "function(tr)\n{\n //this.insert(citer,iter,0);\n this.model.el.clear();\n \n var master = false;\n var working = false;\n \n for(var i =0 ; i < tr.length; i++) {\n var ret = { };\n this.model.el.append(ret);\n //print(JSON.stringify(ret,null,4));\n if (tr[i].name == 'master') {\n master = i;\n }\n if (tr[i].name == 'working') {\n working = i;\n } \n this.model.el.set_value(ret.iter, 0, '' + tr[i].name );\n this.model.el.set_value(ret.iter, 1, '' + tr[i].rev );\n \n \n } \n if (master !== false) {\n this.el.set_active(master);\n }\n if (working !== false) {\n this.el.set_active(working);\n }\n \n}", - "|xns": "Gtk", - "items": [ - { - "*prop": "model", - "xtype": "ListStore", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.set_column_types ( 3, [\n GObject.TYPE_STRING, // file \n GObject.TYPE_STRING, // added\n GObject.TYPE_STRING, // removed\n ] );\n}\n", - "|xns": "Gtk" - } - ] - } - ] - }, - { - "pack": "pack_start,false,true,2", - "xtype": "HBox", - "|xns": "Gtk", - "items": [ - { - "label": "Date", - "pack": "pack_start,false,false,10", - "width_request": 50, - "xalign": 1, - "xtype": "Label", - "|xns": "Gtk" - }, - { - "id": "commitDate", - "xtype": "Entry", - "|xns": "Gtk" - } - ] - }, - { - "pack": "pack_start,false,true,2", - "xtype": "HBox", - "|xns": "Gtk", - "items": [ - { - "label": "Author", - "pack": "pack_start,false,false,10", - "width_request": 50, - "xalign": 1, - "xtype": "Label", - "|xns": "Gtk" - }, - { - "id": "commitAuthor", - "xtype": "Entry", - "|xns": "Gtk" - } - ] - }, - { - "pack": "pack_start,false,false,2", - "xtype": "HBox", - "|xns": "Gtk", - "items": [ - { - "label": "Message", - "pack": "pack_start,false,false,10", - "width_request": 50, - "xalign": 1, - "xtype": "Label", - "|xns": "Gtk" - }, - { - "height_request": 100, - "id": "commitMsg", - "pack": "add", - "xtype": "TextView", - "|xns": "Gtk" - } - ] - }, - { - "height_request": 200, - "pack": "pack_end,true,true,0", - "xtype": "ScrolledWindow", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)\n}\n", - "|xns": "Gtk", - "items": [ - { - "id": "commitPatch", - "pack": "add", - "xtype": "WebView", - "|clear": "function() {\n \n \n \n \n // remove..\n var s = \"document.body.textContent='';\"\n \n this.el.execute_script(s);\n \n \n \n \n \n}\n", - "|showDiff": "function(files) {\n this.clear();\n \n \n \n if (Commit.release === false) {\n return;\n }\n \n var diff = Commit.repo.diff(files, Commit.release, Commit.rev);\n \n // remove..\n var s = \"var pre = document.createElement('pre'); document.body.appendChild(pre);\";\n s += \"pre.textContent = \" +\n JSON.stringify(Commit.repo.lastCmd + \"\\n\") + '+ ' + \n JSON.stringify(diff) + \";\";\n \n this.el.execute_script(s);\n \n \n \n \n \n}\n", - "|xns": "WebKit" - } - ] - } - ] - }, - { - "label": "Cancel", - "pack": "add_action_widget,0", - "xtype": "Button", - "|xns": "Gtk", - "listeners": {} - }, - { - "id": "ok_button", - "label": "Add", - "pack": "add_action_widget,1", - "xtype": "Button", - "|xns": "Gtk" - } - ] - } - ], - "permname": "", - "modOrder": "" -} \ No newline at end of file diff --git a/FixBug.bjs b/FixBug.bjs deleted file mode 100644 index f9c4e3be..00000000 --- a/FixBug.bjs +++ /dev/null @@ -1,335 +0,0 @@ -{ - "id": "file-gtk-4", - "name": "FixBug", - "parent": "", - "title": false, - "path": "/home/alan/gitlive/gitlive/FixBug.bjs", - "items": [ - { - "listeners": { - "destroy_event": "function (self, event) {\n this.el.hide();\n return false;\n}", - "show": "function (self) {\nprint(\"ON SHOW!\");\n\n this.el.fullscreen();\n this.el.grab_focus();\n this.el.set_keep_above(true);\n \n this.get('/today-vew').load();\n \n}" - }, - "border_width": 3, - "default_height": 400, - "default_width": 1200, - "title": "Select Active Bug", - "xtype": "Window", - "|deletable": "true", - "|modal": "true", - "|show": "function(c) {\n \n if (!this.el) {\n this.init();\n }\n var _this = this;\n /*[ 'xtype' ].forEach(function(k) {\n _this.get(k).setValue(typeof(c[k]) == 'undefined' ? '' : c[k]);\n });\n\t// shouild set path..\n */\n\n \n this.el.show_all();\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 false;\n // }\n // print(\"RUN RETURN : \" + run_ret);\n \n //print(JSON.stringify(this.get('bug').getValue()));\n //return this.get('bug').getValue();\n //this.success = c.success;\n}\n", - "|xns": "Gtk", - "items": [ - { - "pack": "add", - "xtype": "VBox", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start,false,true,3", - "xtype": "HBox", - "|xns": "Gtk", - "items": [ - { - "label": "On this project:", - "xtype": "Label", - "|xns": "Gtk" - }, - { - "listeners": { - "changed": "function (self) {\n print(\"store: active id = \" + this.el.get_active_id());\n this.get('/ticket-store').reload();\n \n \n}" - }, - "id": "project-select", - "xtype": "ComboBox", - "|init": "function() {\n this.el = new Gtk.ComboBox.with_entry();\n \n \n this.model = new XObject(this.model);\n this.model.init();\n this.el.set_model(this.model.el);\n this.el.set_entry_text_column (0);\n XObject.prototype.init.call(this);\n \n var t = this;\n imports.Projects.Projects.fetch( function(res) { \n t.load(res);\n });\n}\n", - "|load": "function(tr) {\n this.model.el.clear();\n this.raw_data = tr; \n for(var i =0 ; i < tr.length; i++) {\n var ret = { };\n this.model.el.append(ret);\n //print(JSON.stringify(ret,null,4));\n \n this.model.el.set_value(ret.iter, 0, '' + tr[i].code + \" - \" + tr[i].name );\n this.model.el.set_value(ret.iter, 1, '' + tr[i].id );\n \n \n } \n \n}\n", - "|xns": "Gtk", - "items": [ - { - "*prop": "model", - "id": "project-store", - "xtype": "ListStore", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.set_column_types ( 3, [\n GObject.TYPE_STRING, // file \n GObject.TYPE_STRING, // added\n GObject.TYPE_STRING, // removed\n ] );\n}\n", - "|xns": "Gtk" - } - ] - }, - { - "listeners": { - "button_press_event": "function (self, event) {\n \n FixBug.el.hide();\n}" - }, - "height_request": 90, - "label": "Not working on Project", - "pack": "add", - "xtype": "Button", - "|xns": "Gtk" - }, - { - "listeners": { - "button_press_event": "function (self, event) {\n\n FixBug.el.hide();\n}" - }, - "id": "ok_button", - "label": "Working on Selected Ticket", - "pack": "add", - "xtype": "Button", - "|xns": "Gtk" - } - ] - }, - { - "pack": "pack_end,true,true,3", - "xtype": "HPaned", - "|xns": "Gtk", - "items": [ - { - "pack": "add", - "width_request": 400, - "xtype": "VBox", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start,false,true,3", - "xtype": "HBox", - "|xns": "Gtk", - "items": [ - { - "listeners": { - "key_release_event": "function (self, event) {\n if (event.key.keyval == Gdk.KEY_Return) {;\n // same code as button press..\n var active_id = this.get('/project-select').el.get_active();\n \n var project_id = this.get('/project-select').raw_data[active_id].id;\n \n var str = this.get('/search-entry').el.get_text();\n \n print(str);\n \n var _t = this;\n \n imports.Tasks.Tasks.query({\n project_id : project_id,\n 'query[filter]' : 'me',\n 'query[search]' : str\n }, function(res) { \n // print(JSON.stringify(res,null,4));\n _t.get('/ticket-store').loadData(res);\n });\n }\n return true;\n}" - }, - "id": "search-entry", - "pack": "pack_start,true,true,3", - "xtype": "Entry", - "|xns": "Gtk" - }, - { - "listeners": { - "clicked": "function (self) {\n var active_id = this.get('/project-select').el.get_active();\n \n var project_id = this.get('/project-select').raw_data[active_id].id;\n \n var str = this.get('/search-entry').el.get_text();\n \n print(str);\n \n var _t = this;\n \n imports.Tasks.Tasks.query({\n project_id : project_id,\n 'query[filter]' : 'me',\n 'query[search]' : str\n }, function(res) { \n // print(JSON.stringify(res,null,4));\n _t.get('/ticket-store').loadData(res);\n });\n}" - }, - "label": "Search", - "pack": "pack_end,false,true,3", - "xtype": "Button", - "|use_stock": "true", - "|xns": "Gtk" - } - ] - }, - { - "pack": "pack_end,true,true,3", - "xtype": "ScrolledWindow", - "|shadow_type": "Gtk.ShadowType.IN", - "|xns": "Gtk", - "items": [ - { - "listeners": { - "cursor_changed": "function (self) {\n \n var ret = {};\n this.selection.get_selected(ret);\n\n // var val = \"\";\n var value = ''+ret.model.get_value(ret.iter, 0).value.get_string();\n \n print(value);\n var rec = false;\n this.get('/ticket-store').data.forEach( function(e) {\n if (e.id == value) {\n rec = e;\n return false;\n }\n });\n // update the text box with the ticket data..\n this.get('/view').show(rec);\n //print(rec);\n\n}" - }, - "id": "ticket-view", - "pack": "add", - "xtype": "TreeView", - "|can_focus": "true", - "|fixed_height_mode": "false", - "|headers_visible": "false", - "|init": "function() {\n XObject.prototype.init.call(this);\n var description = new Pango.FontDescription.c_new();\n description.set_size(10000);\n this.el.modify_font(description);\n\n this.selection = this.el.get_selection();\n this.selection.set_mode( Gtk.SelectionMode.SINGLE);\n var _t = this;\n\n // is this really needed??\n this.selection.signal['changed'].connect(function() {\n print('selection changed');\n \n\n });\n\n}\n", - "|xns": "Gtk", - "items": [ - { - "id": "ticket-store", - "pack": "set_model", - "xtype": "ListStore", - "|columns": " [\n GObject.TYPE_STRING, // title \n GObject.TYPE_STRING, // tip\n GObject.TYPE_STRING // source..\n] ", - "|init": "function() {\n XObject.prototype.init.call(this);\n\n this.el.set_column_types ( 2, [\n GObject.TYPE_STRING, // real key\n GObject.TYPE_STRING // real type\n \n \n ] );\n\n\n \n // var t = this;\n //imports.Projects.Projects.fetch( function(res) { \n // t.loadData(res);\n // });\n \n \n}\n", - "|loadData": "function (data) {\n print(\"loading data\");\n \n \n this.data = data;\n \n var el = this.el;\n this.el.clear();\n data.forEach(function(p) {\n var ret = {};\n el.append(ret);\n //print(\"ADD \" + p.name);\n \n var line = '[' + p.status_name + '] ' + \n GLib.markup_escape_text(p.summary, p.summary.length) + \"\\n\" +\n '' + \n GLib.markup_escape_text(p.description,p.description.length).split(\"\\n\").slice(0,3).join(\"\\n\") +\n '';\n print(line);\n \n el.set_value(ret.iter, 0, p.id);\n el.set_value(ret.iter, 1, '#' + p.id + '' + line );\n \n });\n \n \n}\n", - "|reload": "function() {\n \n var active_id = this.get('/project-select').el.get_active();\n \n var project_id = this.get('/project-select').raw_data[active_id].id;\n \n var _t = this;\n \n imports.Tasks.Tasks.query({\n project_id : project_id,\n 'query[filter]' : 'me'\n }, function(res) { \n print(JSON.stringify(res,null,4));\n _t.loadData(res);\n });\n \n \n}\n", - "|xns": "Gtk" - }, - { - "pack": "append_column", - "xtype": "TreeViewColumn", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.add_attribute(this.items[0].el , 'markup', 1 );\n}\n", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start", - "xtype": "CellRendererText", - "|xns": "Gtk" - } - ] - } - ] - } - ] - } - ] - }, - { - "pack": "add", - "xtype": "HPaned", - "|xns": "Gtk", - "items": [ - { - "pack": "pack1,true,true", - "xtype": "VBox", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start,false,true,3", - "xtype": "HBox", - "|xns": "Gtk", - "items": [ - { - "label": "I am doing this:", - "pack": "pack_start,false,true,3", - "xtype": "Label", - "|xns": "Gtk" - }, - { - "pack": "pack_start,true,true,3", - "xtype": "Entry", - "|xns": "Gtk" - } - ] - }, - { - "pack": "pack_start,false,true,3", - "xtype": "HBox", - "|xns": "Gtk", - "items": [ - { - "label": "Since:", - "pack": "pack_start,false,true,3", - "xtype": "Label", - "|xns": "Gtk" - }, - { - "pack": "pack_start,false,false,3", - "xtype": "Entry", - "|width_request": 80, - "|xns": "Gtk" - }, - { - "label": "Until", - "pack": "pack_start,false,true,3", - "xtype": "Label", - "|xns": "Gtk" - }, - { - "pack": "pack_start,true,true,3", - "xtype": "Entry", - "|xns": "Gtk" - } - ] - }, - { - "|xns": "Gtk", - "xtype": "ScrolledWindow", - "pack": "add", - "id": "RightEditor", - "items": [ - { - "id": "view", - "indent_width": 4, - "pack": "add", - "xtype": "TextView", - "|auto_indent": true, - "|editable": "false", - "|init": "function() {\n XObject.prototype.init.call(this);\n var description = Pango.font_description_from_string(\"monospace\");\n\n description.set_size(8000);\n this.el.modify_font(description);\n\n}\n", - "|load": "function(str) {\n\n// show the help page for the active node..\n \n\n\n \n this.el.get_buffer().set_text(str, str.length);\n \n \n var buf = this.el.get_buffer();\n \n \n \n}", - "|show": "function(p) {\n var line = [\n 'Status : ' + p.status_name,\n 'ID : ' + p.id,\n '',\n 'Summary : ' + p.summary,\n '' + \n p.description,\n ].join(\"\\n\") ;\n print(line);\n \n \n // can not do rich text due to so many missing features..\n this.el.get_buffer().set_text(line, line.length);\n \n}\n", - "|show_line_numbers": true, - "|xns": "Gtk", - "items": [ - { - "listeners": { - "changed": "function (self) {\n /*\n var s = new Gtk.TextIter();\n var e = new Gtk.TextIter();\n this.el.get_start_iter(s);\n this.el.get_end_iter(e);\n var str = this.el.get_text(s,e,true);\n try {\n Seed.check_syntax('var e = ' + str);\n } catch (e) {\n this.get('/RightEditor.view').el.modify_base(Gtk.StateType.NORMAL, new Gdk.Color({\n red: 0xFFFF, green: 0xCCCC , blue : 0xCCCC\n }));\n //print(\"SYNTAX ERROR IN EDITOR\"); \n //print(e);\n //console.dump(e);\n return;\n }\n this.get('/RightEditor.view').el.modify_base(Gtk.StateType.NORMAL, new Gdk.Color({\n red: 0xFFFF, green: 0xFFFF , blue : 0xFFFF\n }));\n \n this.get('/LeftPanel.model').changed( str , false);\n */\n}" - }, - "pack": "set_buffer", - "xtype": "Buffer", - "|xns": "GtkSource" - } - ] - } - ] - } - ] - }, - { - "pack": "pack2,false,false", - "width_request": 200, - "xtype": "VBox", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start,false,true,3", - "xtype": "HBox", - "|xns": "Gtk", - "items": [ - { - "listeners": { - "clicked": "function (self) {\n \n}" - }, - "label": "Next/Back", - "pack": "pack_end,false,true,3", - "xtype": "Button", - "|use_stock": "true", - "|xns": "Gtk" - } - ] - }, - { - "pack": "pack_end,true,true,3", - "xtype": "ScrolledWindow", - "|shadow_type": "Gtk.ShadowType.IN", - "|xns": "Gtk", - "items": [ - { - "id": "today-view", - "pack": "add", - "xtype": "TreeView", - "|can_focus": "true", - "|fixed_height_mode": "true", - "|headers_visible": "false", - "|init": "function() {\n XObject.prototype.init.call(this);\n var description = new Pango.FontDescription.c_new();\n description.set_size(10000);\n this.el.modify_font(description);\n\n this.selection = this.el.get_selection();\n this.selection.set_mode( Gtk.SelectionMode.SINGLE);\n var _t = this;\n\n // is this really needed??\n this.selection.signal['changed'].connect(function() {\n print('selection changed');\n \n\n });\n\n}\n", - "|xns": "Gtk", - "items": [ - { - "id": "today-store", - "pack": "set_model", - "xtype": "ListStore", - "|columns": " [\n GObject.TYPE_STRING, // title \n GObject.TYPE_STRING, // tip\n GObject.TYPE_STRING // source..\n] ", - "|init": "function() {\n XObject.prototype.init.call(this);\n\n this.el.set_column_types ( 2, [\n GObject.TYPE_STRING, // real key\n GObject.TYPE_STRING // real type\n \n \n ] );\n\n\n \n // var t = this;\n //imports.Projects.Projects.fetch( function(res) { \n // t.loadData(res);\n // });\n \n \n}\n", - "|loadData": "function (data) {\n print(\"loading data\");\n \n var el = this.el;\n this.el.clear();\n data.forEach(function(p) {\n var ret = {};\n el.append(ret);\n //print(\"ADD \" + p.name);\n \n el.set_value(ret.iter, 0, p.id);\n el.set_value(ret.iter, 1, '#' + p.id + '' + \n '[' + p.status_name + '] ' + p.summary + \"\\n\" +\n '' + p.description.split(\"\\n\").slice(0,3).join(\"\\n\") +\n ''\n \n );\n \n });\n \n \n}\n", - "|reload": "function() {\n \n var active_id = this.get('/project-select').el.get_active();\n \n var project_id = this.get('/project-select').raw_data[active_id].id;\n \n var _t = this;\n \n var DT = imports.Date.Date;\n \n new imports.Request.Request( {\n url : '/cash_invoice_entry',\n params : {\n 'query[action_dt_from]' : (new DT()).format('Y-m-d'),\n 'query[action_dt_to]' : (new DT()).add(DT.DAY,1).format('Y-m-d'),\n limit: 999,\n 'sort' : 'action_dt',\n dir : 'ASC',\n action : 'Hours'\n },\n \n success : function(res) {\n this.loadData();\n },\n scope : this\n \n \n });\n \n \n \n}\n", - "|xns": "Gtk" - }, - { - "pack": "append_column", - "xtype": "TreeViewColumn", - "|sizing": "Gtk.TreeViewColumnSizing.FIXED", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.add_attribute(this.items[0].el , 'markup', 1 );\n}\n", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start", - "xtype": "CellRendererText", - "|xns": "Gtk" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - } - ], - "permname": "", - "modOrder": "" -} \ No newline at end of file diff --git a/Merger.bjs b/Merger.bjs deleted file mode 100644 index fa7ebd0a..00000000 --- a/Merger.bjs +++ /dev/null @@ -1,276 +0,0 @@ -{ - "id": "file-gtk-5", - "name": "Merger", - "parent": "", - "title": false, - "path": "/home/alan/gitlive/gitlive/Merger.bjs", - "items": [ - { - "listeners": { - "destroy_event": "function (self, event) {\n this.el.hide();\n return false;\n}", - "response": "function (self, id) {\n // hide\n //if (id < 1) {\n this.el.hide();\n return;\n //}\n if (typeof(this.get('bug').getValue()) != 'object') {\n print(\"ERROR\");\n return;\n }\n \n this.el.hide();\n \n //var val = this.get('bug').getValue();\n // Seed.print(val);\n}" - }, - "border_width": 3, - "default_height": 700, - "default_width": 800, - "id": "Merger", - "title": "Merger", - "xtype": "Dialog", - "|deletable": "true", - "|show": "function(c) {\n \n if (!this.el) {\n this.init();\n }\n var _this = this;\n \n //this.el.set_title(\"Merger - ??? \");\n// this.el.set_title(\"Merger - \" + this.repo.repopath);\n\n\n Merger.loading = true; // stop change firing on combos.\n /// load up branches\n \n this.get('/historyTreeStore').el.clear();\n this.get('/changedFilesStore').el.clear();\n this.get('/patchview').clear();\n \n \n \n this.get('/workingCombo').load(Merger.repo.branches);\n \n this.get('/releaseCombo').load(Merger.repo.branches);\n\n\n\n\n Merger.loading = false;\n\n this.el.show_all();\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", - "|xns": "Gtk", - "items": [ - { - "xtype": "VBox", - "|pack": " function(p,e) {\n p.el.get_content_area().pack_start(e.el,true,true,0)\n }\n", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start,false,true", - "xtype": "HBox", - "|xns": "Gtk", - "items": [ - { - "label": "Working Branch", - "xtype": "Label", - "|xns": "Gtk" - }, - { - "listeners": { - "changed": "function (self) {\n this.get('/historyTreeStore').loadTree();\n}" - }, - "id": "workingCombo", - "xtype": "ComboBox", - "|init": "function() {\n this.el = new Gtk.ComboBox.with_entry();\n \n \n this.model = new XObject(this.model);\n this.model.init();\n this.el.set_model(this.model.el);\n this.el.set_entry_text_column (0);\n XObject.prototype.init.call(this);\n \n}\n", - "|load": "function(tr)\n{\n //this.insert(citer,iter,0);\n this.model.el.clear();\n \n var master = false;\n var working = false;\n \n for(var i =0 ; i < tr.length; i++) {\n if (!tr[i].name.length) {\n continue;\n }\n var ret = { };\n this.model.el.append(ret);\n //print(JSON.stringify(ret,null,4));\n if (tr[i].name == 'master') {\n master = i;\n }\n if (tr[i].name == 'working') {\n working = i;\n } \n this.model.el.set_value(ret.iter, 0, '' + tr[i].name );\n this.model.el.set_value(ret.iter, 1, '' + tr[i].rev );\n \n \n } \n if (master !== false) {\n this.el.set_active(master);\n }\n if (working !== false) {\n this.el.set_active(working);\n }\n \n}", - "|xns": "Gtk", - "items": [ - { - "*prop": "model", - "xtype": "ListStore", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.set_column_types ( 3, [\n GObject.TYPE_STRING, // file \n GObject.TYPE_STRING, // added\n GObject.TYPE_STRING, // removed\n ] );\n}\n", - "|xns": "Gtk" - } - ] - }, - { - "label": "Release Branch", - "xtype": "Label", - "|xns": "Gtk" - }, - { - "listeners": { - "changed": "function (self) {\n this.get('/historyTreeStore').loadTree();\n}" - }, - "id": "releaseCombo", - "xtype": "ComboBox", - "|init": "function() {\n this.el = new Gtk.ComboBox.with_entry();\n \n \n this.model = new XObject(this.model);\n this.model.init();\n this.el.set_model(this.model.el);\n this.el.set_entry_text_column (0);\n XObject.prototype.init.call(this);\n \n}\n", - "|load": "function(tr)\n{\n //this.insert(citer,iter,0);\n this.model.el.clear();\n \n var master = false;\n var release = false;\n \n for(var i =0 ; i < tr.length; i++) {\n var ret = { };\n if (!tr[i].name.length) {\n continue;\n }\n \n this.model.el.append(ret);\n //print(JSON.stringify(ret,null,4));\n if (tr[i].name == 'master') {\n master = i;\n }\n if (tr[i].name == 'release') {\n release = i;\n }\n \n this.model.el.set_value(ret.iter, 0, '' + tr[i].name );\n this.model.el.set_value(ret.iter, 1, '' + tr[i].rev );\n \n \n } \n if (master !== false) {\n this.el.set_active(master);\n }\n if (release !== false) {\n this.el.set_active(release);\n }\n \n}", - "|xns": "Gtk", - "items": [ - { - "*prop": "model", - "xtype": "ListStore", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.set_column_types ( 3, [\n GObject.TYPE_STRING, // file \n GObject.TYPE_STRING, // added\n GObject.TYPE_STRING, // removed\n ] );\n}\n", - "|xns": "Gtk" - } - ] - } - ] - }, - { - "pack": "pack_end,true,true,0", - "position": 400, - "xtype": "VPaned", - "|xns": "Gtk", - "items": [ - { - "pack": "add", - "position": 200, - "xtype": "HPaned", - "|xns": "Gtk", - "items": [ - { - "xtype": "ScrolledWindow", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)\n}\n", - "|xns": "Gtk", - "items": [ - { - "listeners": { - "cursor_changed": "function (self) {\n\n if (this.el.get_selection().count_selected_rows() < 1) {\n //nothing?\n return;\n }\n var model = this.get('/historyTreeStore');\n var ret = {}; \n var s = this.el.get_selection();\n s.get_selected(ret);\n \n var value = ''+ ret.model.get_value(ret.iter, 1).value.get_string();\n print(\"OUT?\" + value);// id..\n // load the list in the right grid..\n var Repo = imports.Scm.Git.Repo.Repo;\n \n \n \n if (model.release === false) {\n return;\n }\n model.rev = value;\n \n var files = Merger.repo.changedFiles('/', 'rev', model.release + '..' + value);\n this.get('/changedFilesStore').load(files);\n return true;\n\n}" - }, - "pack": "add", - "xtype": "TreeView", - "|init": "function() {\n XObject.prototype.init.call(this);\n var description = new Pango.FontDescription.c_new();\n description.set_size(8000);\n this.el.modify_font(description);\n\n this.selection = this.el.get_selection();\n this.selection.set_mode( Gtk.SelectionMode.SINGLE);\n var _this = this;\n /*\n 780 \n 781 // is this really needed??\n 782 this.selection.signal['changed'].connect(function() {\n 783 _this.get('/LeftTree.view').listeners.cursor_changed.apply(\n 784 _this.get('/LeftTree.view'), [ _this.get('/LeftTree.view'), '']\n 785 );\n 786 });\n 787 \n */\n }\n", - "|xns": "Gtk", - "items": [ - { - "id": "historyTreeStore", - "pack": "set_model", - "release": false, - "xtype": "TreeStore", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.set_column_types ( 3, [\n GObject.TYPE_STRING, // title \n GObject.TYPE_STRING, // rev \n ] );\n}\n", - "|load": "function(tr,iter)\n{\n //this.insert(citer,iter,0);\n if (!iter) {\n this.el.clear();\n }\n \n for(var i =0 ; i < tr.length; i++) {\n var ret = { };\n if (iter) {\n this.el.insert(ret ,iter,-1);\n } else {\n this.el.append(ret);\n }\n //print(JSON.stringify(ret,null,4));\n \n \n this.el.set_value(ret.iter, 0, '' + tr[i].text );\n this.el.set_value(ret.iter, 1, '' + tr[i].rev );\n \n if (tr[i].children && tr[i].children.length) {\n this.load(tr[i].children, ret.iter);\n }\n } \n}", - "|loadTree": "function() {\n\n this.working = false;\n if (Merger.loading) {\n return;\n }\n \n \n var wid = this.get('/workingCombo').el.get_active();\n var rid = this.get('/releaseCombo').el.get_active();\n if (wid < 0 || rid < 0 || rid == wid) {\n return;\n }\n \n var w = Merger.repo.branches[wid];\n var r = Merger.repo.branches[rid];\n \n\n\n var rev = r.name + '..' + w.name;\n this.release = r.name;\n this.working = w.name;\n \n // this takes some time, lets. try and dialog it..\n\n \n \n \n var msg = new Gtk.MessageDialog( {\n buttons : Gtk.ButtonsType.NONE,\n text: \"Loading History\"\n \n });\n \n msg.set_transient_for(Merger.el);\n msg.set_modal(true);\n msg.show_all();\n\n var hist = Merger.repo.dayTree('/', false, 'rev', rev);\n msg.hide();\n \n this.load(hist);\n \n \n}\n", - "|xns": "Gtk" - }, - { - "pack": "append_column", - "title": "Changes", - "xtype": "TreeViewColumn", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.add_attribute(this.items[0].el , 'markup', 0 );\n\n}\n", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start", - "xtype": "CellRendererText", - "|xns": "Gtk" - } - ] - } - ] - } - ] - }, - { - "xtype": "ScrolledWindow", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)\n}\n", - "|xns": "Gtk", - "items": [ - { - "listeners": { - "cursor_changed": "function (self) {\n // SEE SELECTION.CHANGED\n var files = this.files();\n this.get('/patchview').showDiff(files); \n //var value = ''+ ret.model.get_value(ret.iter, 1).value.get_string();\n //print(\"OUT?\" + value);// id..\n // load the list in the right grid..\n \n return true;\n\n}" - }, - "id": "changedFilesView", - "pack": "add", - "xtype": "TreeView", - "|files": "function() {\n if (this.el.get_selection().count_selected_rows() < 1) {\n //nothing? - clea it?\n return [];\n }\n\n var ret = {}; \n \n\n var s = this.el.get_selection();\n var files = [];\n s.selected_foreach(function(model,p,iter) {\n \n files.push( model.get_value(iter, 0).value.get_string());\n \n });\n return files;\n}\n", - "|init": "function() {\n XObject.prototype.init.call(this);\n var description = new Pango.FontDescription.c_new();\n description.set_size(8000);\n this.el.modify_font(description);\n\n this.selection = this.el.get_selection();\n this.selection.set_mode( Gtk.SelectionMode.MULTIPLE);\n var _this = this;\n this.selection.signal['changed'].connect(function() {\n _this.listeners.cursor_changed.apply(\n _this, [ _this, '']\n );\n });\n }\n", - "|xns": "Gtk", - "items": [ - { - "id": "changedFilesStore", - "pack": "set_model", - "xtype": "ListStore", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.set_column_types ( 3, [\n GObject.TYPE_STRING, // file \n GObject.TYPE_STRING, // added\n GObject.TYPE_STRING, // removed\n ] );\n}\n", - "|load": "function(tr)\n{\n //this.insert(citer,iter,0);\n this.el.clear();\n for(var i =0 ; i < tr.length; i++) {\n var ret = { };\n \n this.el.append(ret);\n \n //print(JSON.stringify(ret,null,4));\n \n \n this.el.set_value(ret.iter, 0, '' + tr[i].filename );\n this.el.set_value(ret.iter, 1, '' + tr[i].added );\n this.el.set_value(ret.iter, 2, '' + tr[i].removed );\n \n \n } \n}", - "|xns": "Gtk" - }, - { - "resizable": true, - "min_width": 200, - "pack": "append_column", - "title": "Filename", - "xtype": "TreeViewColumn", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.add_attribute(this.items[0].el , 'markup', 0 );\n\n}\n", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start", - "xtype": "CellRendererText", - "|xns": "Gtk" - } - ] - }, - { - "min_width": 50, - "pack": "append_column", - "title": "Added", - "xtype": "TreeViewColumn", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.add_attribute(this.items[0].el , 'markup', 1 );\n\n}\n", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start", - "xtype": "CellRendererText", - "|xns": "Gtk" - } - ] - }, - { - "min_width": 50, - "pack": "append_column", - "title": "Removed", - "xtype": "TreeViewColumn", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.add_attribute(this.items[0].el , 'markup', 2 );\n\n}\n", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start", - "xtype": "CellRendererText", - "|xns": "Gtk" - } - ] - } - ] - }, - { - "|xns": "Gtk", - "xtype": "TreeView", - "pack": false, - "items": [ - { - "|xns": "Gtk", - "xtype": "ListStore", - "pack": false - } - ] - } - ] - } - ] - }, - { - "xtype": "VBox", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start,false,false,0", - "xtype": "HBox", - "|xns": "Gtk", - "items": [ - { - "listeners": { - "clicked": "function (self) {\n \n \n var model = this.get('/historyTreeStore');\n \n if (model.release === false) {\n return;\n }\n \n \n var files = this.get('/changedFilesView').files();\n \n if (!files.length) {\n return; // error.!\n }\n var diff = Merger.repo.diff(files, model.release, model.rev);\n \n \n print(\"history?\");\n \n \n var history = Merger.repo.history(files, 1, 'rev', model.rev);\n \n print(\"History\" + JSON.stringify(history, null,4));\n \n Commit = imports.Commit.Commit;\n\n Commit.el.set_modal(true);\n Commit.el.set_transient_for(Merger.el);\n\n var ce = Commit.show({\n repo : Merger.repo,\n files : files,\n release : model.release,\n rev : model.rev,\n author : history[0].changeby,\n changed : history[0].changed_raw\n \n \n });\n if (ce === false ) {\n return;\n }\n \n \n var diff = Merger.repo.diff(files, model.release, model.rev);\n \n \n print(JSON.stringify(ce,null,4));\n //.... commit!!!\n \n imports.GitMonitor.GitMonitor.pause();\n \n \n \n var msg = new Gtk.MessageDialog( {\n buttons : Gtk.ButtonsType.NONE,\n text: \"Committing Changes\"\n });\n \n msg.set_transient_for(Merger.el);\n msg.set_modal(true);\n msg.show_all();\n\n \n \n try { \n \n Merger.repo.checkout(model.release);\n \n print(\"Call apply patch\");\n \n Merger.repo.applyPatch(diff);\n \n var author = Merger.repo.parseAuthor(ce.author);\n \n print(\"Add new files.\");\n // add all the files..\n Merger.repo.add(files);\n \n print(\"Commit changes.\");\n Merger.repo.commit({\n name : author.name,\n email : author.email,\n author : ce.author,\n changed : ce.changed,\n reason : ce.message,\n files : files\n \n });\n \n \n } catch (e) {\n //message..\n msg.hide();\n \n var emsg = new Gtk.MessageDialog({\n message_type: Gtk.MessageType.ERROR, \n buttons : Gtk.ButtonsType.OK, \n text: e.message\n });\n emsg.set_transient_for(Merger.el);\n emsg.set_modal(true);\n emsg.run();\n emsg.destroy();\n Merger.repo.stash(); // revert change.. - so we can go back...\n }\n msg.show_all();\n msg.set_markup(\"Changing to previous branch\");\n Merger.repo.checkout(model.working);\n \n \n // if gitlive was previously running warn the user that it is now paused..\n /*\n var cmsg = new Gtk.MessageDialog({\n message_type: Gtk.MessageType.ERROR, \n buttons : Gtk.ButtonsType.OK, \n text: \"Git Live is now paused \"\n });\n cmsg.run();\n cmsg.destroy();\n */\n var _t = this;\n GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, 5, function() {\n imports.GitMonitor.GitMonitor.resume();\n msg.hide();\n msg.destroy();\n _t.get('/historyTreeStore').loadTree();\n _t.get('/changedFilesStore').el.clear();\n _t.get('/patchview').showDiff(files); \n return false; //only once.\n });\n \n \n\n\n} " - }, - "label": "Commit diff (no merge)", - "xtype": "Button", - "|xns": "Gtk" - } - ] - }, - { - "pack": "pack_end,true,true,0", - "xtype": "ScrolledWindow", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)\n}\n", - "|xns": "Gtk", - "items": [ - { - "id": "patchview", - "pack": "add", - "xtype": "WebView", - "|clear": "function() {\n \n \n \n \n // remove..\n var s = \"document.body.textContent='';\"\n \n this.el.execute_script(s);\n \n \n \n \n \n}\n", - "|showDiff": "function(files) {\n this.clear();\n \n \n var model = this.get('/historyTreeStore');\n \n if (model.release === false) {\n return;\n }\n \n var diff = Merger.repo.diff(files, model.release, model.rev);\n \n // remove..\n var s = \"var pre = document.createElement('pre'); document.body.appendChild(pre);\";\n s += \"pre.textContent = \" +\n JSON.stringify(Merger.repo.lastCmd + \"\\n\") + '+ ' + \n JSON.stringify(diff) + \";\";\n print(s);\n \n this.el.execute_script(s);\n \n \n \n \n \n}\n", - "|xns": "WebKit" - } - ] - } - ] - } - ] - } - ] - }, - { - "id": "ok_button", - "label": "Close", - "pack": "add_action_widget,1", - "xtype": "Button", - "|xns": "Gtk" - } - ] - } - ], - "permname": "", - "modOrder": "" -} \ No newline at end of file diff --git a/RemoteEdit.bjs b/RemoteEdit.bjs deleted file mode 100644 index 2759ce9a..00000000 --- a/RemoteEdit.bjs +++ /dev/null @@ -1,102 +0,0 @@ -{ - "id": "file-gtk-5", - "name": "RemoteEdit", - "parent": "", - "title": false, - "path": "/home/alan/gitlive/gitlive/RemoteEdit.bjs", - "items": [ - { - "listeners": { - "destroy_event": "function (self, event) {\n this.el.hide();\n return false;\n}", - "response": "function (self, id) {\n // hide\n //if (id < 1) {\n this.el.hide();\n return;\n //}\n if (typeof(this.get('bug').getValue()) != 'object') {\n print(\"ERROR\");\n return;\n }\n \n this.el.hide();\n \n //var val = this.get('bug').getValue();\n // Seed.print(val);\n}" - }, - " modal": true, - "border_width": 3, - "default_height": 150, - "default_width": 500, - "title": "Remotes", - "xtype": "Dialog", - "|deletable": true, - "|modal": true, - "|show": "function(c) {\n \n if (!this.el) {\n this.init();\n }\n var _this = this;\n //this.get('/remotesStore').load();\n this.get('/remoteURL').el.get_child().set_text('');\n this.get('/remoteName').el.set_text('');\n \n \n this.el.show_all();\n \n var run_ret = this.el.run();\n if (run_ret < 1 ) {\n return false;\n }\n var ret= {\n url : this.get('/remoteURL').el.get_child().get_text(),\n name : this.get('/remoteName').el.get_text()\n };\n \n return ret;\n \n \n \n}\n", - "|xns": "Gtk", - "items": [ - { - "xtype": "VBox", - "|pack": " function(p,e) {\n p.el.get_content_area().pack_start(e.el,true,true,10);\n }\n", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start,false,true,10", - "xtype": "HBox", - "|xns": "Gtk", - "items": [ - { - "label": "URL :", - "pack": "pack_start,false,false,10", - "width_request": 50, - "xtype": "Label", - "|xns": "Gtk" - }, - { - "listeners": { - "changed": "function (self) {\n var val = this.el.get_child().get_text();\n print(JSON.stringify(val));\n if (!val.length) {\n return;\n }\n \n var name = this.get('/remoteName').el.get_text();\n if (name.length) {\n return;\n }\n // fill in name\n var val = imports.Scm.Git.Repo.Repo.parseURL(val);\n if ((typeof(val.host) != 'undefined') && val.host.length) {\n var host = val.host;\n // need to add github owner...\n if (host.match(/github.com$/)) {\n host += '.' + val.path.split('/').shift();\n }\n \n \n this.get('/remoteName').el.set_text(host);\n }\n \n \n}" - }, - "id": "remoteURL", - "xtype": "ComboBox", - "|init": "function() {\n this.el = new Gtk.ComboBox.with_entry();\n \n \n this.model = new XObject(this.model);\n this.model.init();\n this.el.set_model(this.model.el);\n this.el.set_entry_text_column (0);\n XObject.prototype.init.call(this);\n \n}\n", - "|load": "function(tr)\n{\n //this.insert(citer,iter,0);\n this.model.el.clear();\n \n var master = false;\n var working = false;\n \n for(var i =0 ; i < tr.length; i++) {\n var ret = { };\n this.model.el.append(ret);\n //print(JSON.stringify(ret,null,4));\n if (tr[i].name == 'master') {\n master = i;\n }\n if (tr[i].name == 'working') {\n working = i;\n } \n this.model.el.set_value(ret.iter, 0, '' + tr[i].name );\n this.model.el.set_value(ret.iter, 1, '' + tr[i].rev );\n \n \n } \n if (master !== false) {\n this.el.set_active(master);\n }\n if (working !== false) {\n this.el.set_active(working);\n }\n \n}", - "|xns": "Gtk", - "items": [ - { - "*prop": "model", - "xtype": "ListStore", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.set_column_types ( 3, [\n GObject.TYPE_STRING, // file \n GObject.TYPE_STRING, // added\n GObject.TYPE_STRING, // removed\n ] );\n}\n", - "|xns": "Gtk" - } - ] - } - ] - }, - { - "pack": "pack_start,false,true,10", - "xtype": "HBox", - "|xns": "Gtk", - "items": [ - { - "label": "Name : ", - "pack": "pack_start,false,false,10", - "width_request": 50, - "xalign": 1, - "xtype": "Label", - "|xns": "Gtk" - }, - { - "id": "remoteName", - "xtype": "Entry", - "|xns": "Gtk" - } - ] - } - ] - }, - { - "label": "Cancel", - "pack": "add_action_widget,0", - "xtype": "Button", - "|xns": "Gtk", - "listeners": {} - }, - { - "id": "ok_button", - "label": "Add", - "pack": "add_action_widget,1", - "xtype": "Button", - "|xns": "Gtk" - } - ] - } - ], - "permname": "", - "modOrder": "0" -} \ No newline at end of file diff --git a/Remotes.bjs b/Remotes.bjs deleted file mode 100644 index 0d195f4e..00000000 --- a/Remotes.bjs +++ /dev/null @@ -1,152 +0,0 @@ -{ - "id": "file-gtk-4", - "name": "Remotes", - "parent": "", - "title": false, - "path": "/home/alan/gitlive/gitlive/Remotes.bjs", - "items": [ - { - "listeners": { - "destroy_event": "function (self, event) {\n this.el.hide();\n return false;\n}", - "response": "function (self, id) {\n // hide\n //if (id < 1) {\n this.el.hide();\n return;\n //}\n if (typeof(this.get('bug').getValue()) != 'object') {\n print(\"ERROR\");\n return;\n }\n \n this.el.hide();\n \n //var val = this.get('bug').getValue();\n // Seed.print(val);\n}" - }, - " modal": true, - "border_width": 3, - "default_height": 300, - "default_width": 500, - "title": "Remotes", - "xtype": "Dialog", - "|deletable": true, - "|modal": true, - "|show": "function(c) {\n \n if (!this.el) {\n this.init();\n }\n var _this = this;\n this.get('/remotesStore').load();\n this.el.show_all();\n \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 \n}\n", - "|xns": "Gtk", - "items": [ - { - "xtype": "VBox", - "|pack": " function(p,e) {\n p.el.get_content_area().pack_start(e.el,true,true,0)\n }\n", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start,false,true", - "xtype": "HBox", - "|xns": "Gtk", - "items": [ - { - "listeners": { - "clicked": "function (self) {\n\n \n var RemoteEdit= imports.RemoteEdit.RemoteEdit\n RemoteEdit.repo = Remotes.repo;\n RemoteEdit.el.set_transient_for(Remotes.el);\n\n var res = RemoteEdit.show();\n \n if (res != false) {\n Remotes.repo.remotes(res);\n }\n \n this.get('/remotesStore').load();\n\n \n}" - }, - "label": "Add", - "pack": "add", - "xtype": "Button", - "|xns": "Gtk" - } - ] - }, - { - "xtype": "ScrolledWindow", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)\n}\n", - "|xns": "Gtk", - "items": [ - { - "listeners": { - "cursor_changed": "function (self)\n{\n\n return;\n // SEE SELECTION.CHANGED\n if (this.el.get_selection().count_selected_rows() < 1) {\n //nothing? - clea it?\n return;\n }\n var ret = {}; \n var model = this.get('/changedFilesStore');\n\n var s = this.el.get_selection();\n var files = [];\n s.selected_foreach(function(model,p,iter) {\n \n files.push( model.get_value(iter, 0).value.get_string());\n \n });\n this.get('/patchview').showDiff(files); \n //var value = ''+ ret.model.get_value(ret.iter, 1).value.get_string();\n //print(\"OUT?\" + value);// id..\n // load the list in the right grid..\n \n return true;\n\n}" - }, - "id": "remotesView", - "pack": "add", - "xtype": "TreeView", - "|init": "function() {\n XObject.prototype.init.call(this);\n var description = new Pango.FontDescription.c_new();\n description.set_size(8000);\n this.el.modify_font(description);\n\n this.selection = this.el.get_selection();\n this.selection.set_mode( Gtk.SelectionMode.MULTIPLE);\n var _this = this;\n this.selection.signal['changed'].connect(function() {\n _this.listeners.cursor_changed.apply(\n _this, [ _this, '']\n );\n });\n }\n", - "|xns": "Gtk", - "items": [ - { - "id": "remotesStore", - "pack": "set_model", - "xtype": "ListStore", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.set_column_types ( 3, [\n GObject.TYPE_STRING, // file \n GObject.TYPE_STRING, // added\n GObject.TYPE_STRING, // removed\n ] );\n}\n", - "|load": "function(tr)\n{\n //this.insert(citer,iter,0);\n this.el.clear();\n \n var tr = Remotes.repo.remotes();\n \n \n for(var i =0 ; i < tr.length; i++) {\n var ret = { };\n \n this.el.append(ret);\n \n //print(JSON.stringify(ret,null,4));\n \n \n this.el.set_value(ret.iter, 0, '' + tr[i].name );\n this.el.set_value(ret.iter, 1, '' + tr[i].url );\n this.el.set_value(ret.iter, 2, '' + tr[i].type );\n \n \n } \n}", - "|xns": "Gtk" - }, - { - "min_width": 70, - "pack": "append_column", - "resizable": true, - "title": "Name", - "xtype": "TreeViewColumn", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.add_attribute(this.items[0].el , 'markup', 0 );\n\n}\n", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start", - "xtype": "CellRendererText", - "|xns": "Gtk" - } - ] - }, - { - "min_width": 70, - "pack": "append_column", - "resizable": true, - "title": "Type", - "xtype": "TreeViewColumn", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.add_attribute(this.items[0].el , 'markup', 2 );\n\n}\n", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start", - "xtype": "CellRendererText", - "|xns": "Gtk" - } - ] - }, - { - "min_width": 200, - "pack": "append_column", - "title": "URL", - "xtype": "TreeViewColumn", - "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.add_attribute(this.items[0].el , 'markup', 1 );\n\n}\n", - "|xns": "Gtk", - "items": [ - { - "pack": "pack_start", - "xtype": "CellRendererText", - "|xns": "Gtk" - } - ] - } - ] - }, - { - "|xns": "Gtk", - "xtype": "TreeView", - "pack": false, - "items": [ - { - "|xns": "Gtk", - "xtype": "ListStore", - "pack": false - } - ] - } - ] - } - ] - }, - { - "label": "Cancel", - "pack": "add_action_widget,0", - "xtype": "Button", - "|xns": "Gtk", - "listeners": {} - }, - { - "id": "ok_button", - "label": "OK", - "pack": "add_action_widget,1", - "xtype": "Button", - "|xns": "Gtk" - } - ] - } - ], - "permname": "", - "modOrder": "0" -} \ No newline at end of file -- 2.39.2