+ "xtype" : "Box",
+ "| void show" : [
+ "() {",
+ "\t_this.splitview.el.show_sidebar = true;",
+ " \t ",
+ "\t_this.filesearch.el.grab_focus();",
+ "\t_this.winloading = true;",
+ "\t_this.winmodel.el.remove_all();",
+ "\t_this.filesearch.el.set_text(\"\");",
+ "\tfor(var i = 0;i < BuilderApplication.windowlist.get_n_items(); i++) {",
+ "\t\t_this.winmodel.el.append( BuilderApplication.windowlist.get_item(i));",
+ "\t}",
+ "\t_this.winsel.selectCurrent();",
+ "\t_this.winloading = false;",
+ "\t",
+ "\t _this.treeview.el.set_model(new Gtk.SingleSelection(null));",
+ "\t",
+ "\t_this.windowstate.project.loadDirsIntoStore(_this.treemodel.el);",
+ "\t",
+ "\t_this.treeview.el.set_model(_this.treeselmodel.el);",
+ "\t",
+ " \t _this.treeselmodel.el.selected = Gtk.INVALID_LIST_POSITION;",
+ "\t",
+ " ",
+ "}"
+ ]
+ },
+ {
+ "$ xns" : "Gtk",
+ "id" : "keystate",
+ "int is_shift" : 0,
+ "listeners" : {
+ "key_pressed" : [
+ "(keyval, keycode, state) => {",
+ "",
+ " \tif (keyval == Gdk.Key.Shift_L || keyval == Gdk.Key.Shift_R) {",
+ " \t\tthis.is_shift = 1;",
+ " \t\t",
+ "\t}",
+ "\t",
+ "\t",
+ "\treturn true;",
+ "\t",
+ "}",
+ ""
+ ],
+ "key_released" : [
+ "(keyval, keycode, state) => {",
+ "\tGLib.debug(",
+ "\t",
+ "\t\t\"key release %d, %d, %d ?= %d %d\" , ",
+ "\t\t\t(int) keyval, (int) keycode, state,",
+ "\t\t\t(int)Gdk.Key.O, Gdk.ModifierType.CONTROL_MASK",
+ "\t\t);",
+ " \tif (keyval == Gdk.Key.Shift_L || keyval == Gdk.Key.Shift_R) {",
+ " \t\tthis.is_shift = 0;",
+ "\t}",
+ "\t//GLib.debug(\"set state %d , shift = %d\", (int)this.el.get_current_event_state(), Gdk.ModifierType.SHIFT_MASK);",
+ "\tif (keyval == Gdk.Key.o && (state & Gdk.ModifierType.CONTROL_MASK) != 0) {",
+ "\t\t// ctrl O pressed",
+ "\t\tif (!_this.splitview.el.show_sidebar) {",
+ "\t \t\t_this.sidebar.show(); ",
+ "\t \t}",
+ "\t}",
+ "\t",
+ "",
+ " ",
+ "}"
+ ]
+ },
+ "xtype" : "EventControllerKey"