Sample/Editor.bjs
authorAlan Knowles <alan@akbkhome.com>
Fri, 29 Oct 2010 10:11:24 +0000 (18:11 +0800)
committerAlan Knowles <alan@akbkhome.com>
Fri, 29 Oct 2010 10:11:24 +0000 (18:11 +0800)
Sample/Editor.bjs

index 14103ca..c35f43d 100644 (file)
                                     "indent_width": 4,
                                     "pack": "add",
                                     "xtype": "View",
-                                    "|save": "function() {\n    \n}\n",
                                     "|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    _this.dirty = false;\n    this.el.grab_focus();\n}",
+                                    "|save": "function() {\nvar str = this.get\n     this.get('/LeftPanel.model').changed(  str , false);\n}\n",
                                     "|show_line_numbers": true,
                                     "|xns": "GtkSource",
                                     "items": [