{
- "id": "file-gtk-18",
+ "id": "file-gtk-1",
"name": "FixBug",
"parent": "",
"title": false,
{
"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 (!this.get('bug').getValue().length) {\n print(\"ERROR\");\n return;\n }\n \n this.el.hide();\n \n var val = this.get('bug').getValue();\n Seed.print(val);\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": 150,
+ "default_height": 400,
"default_width": 600,
- "title": "Project Properties",
+ "title": "Select Active Bug",
"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.show_all();\n //this.success = c.success;\n}\n",
+ "|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": [
{
},
{
"listeners": {
- "changed": "function (self) {\n\n}"
+ "changed": "function (self) {\n var d = this.getValue();\n this.get('/view').load(d.description);\n this.get('/ok_button').el.set_sensitive(true);\n}"
},
"id": "bug",
"pack": "pack_end,true,true,3",
"id": "RightEditor",
"items": [
{
+ "editable": false,
"id": "view",
"indent_width": 4,
"pack": "add",
"xtype": "TextView",
"|auto_indent": true,
"|init": "function() {\n XObject.prototype.init.call(this);\n var description = Pango.Font.description_from_string(\"monospace\")\n description.set_size(8000);\n this.el.modify_font(description);\n\n}\n",
- "|insert_spaces_instead_of_tabs": true,
- "|load": "function(str) {\n\n// show the help page for the active node..\n this.get('/Help').show();\n\n\n this.get('/BottomPane').el.set_current_page(0);\n this.el.get_buffer().set_text(str, str.length);\n var lm = GtkSource.LanguageManager.get_default();\n \n this.el.get_buffer().set_language(lm.get_language('js'));\n var buf = this.el.get_buffer();\n var cursor = buf.get_mark(\"insert\");\n var iter= new Gtk.TextIter;\n buf.get_iter_at_mark(iter, cursor);\n iter.set_line(1);\n iter.set_line_offset(4);\n buf.move_mark(cursor, iter);\n \n \n cursor = buf.get_mark(\"selection_bound\");\n iter= new Gtk.TextIter;\n buf.get_iter_at_mark(iter, cursor);\n iter.set_line(1);\n iter.set_line_offset(4);\n buf.move_mark(cursor, iter);\n \n this.el.grab_focus();\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_line_numbers": true,
"|xns": "Gtk",
"items": [
{
"listeners": {
- "changed": "function (self) {\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}"
+ "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": "Gtk",
+ "label": "Cancel",
+ "pack": "add_action_widget,0",
"xtype": "Button",
- "pack": "add_action_widget,1",
- "label": "OK"
+ "|xns": "Gtk",
+ "listeners": {}
},
{
- "|xns": "Gtk",
+ "id": "ok_button",
+ "label": "OK",
+ "pack": "add_action_widget,1",
"xtype": "Button",
- "pack": "add_action_widget,0",
- "label": "Cancel"
+ "|xns": "Gtk"
}
]
}