BuilderApplication.removeWindow(this);
if (BuilderApplication.windows.size < 1) {
- this.windowstate.file.getLanguageServer().exit();
+ try {
+ this.windowstate.file.getLanguageServer().exit();
+ } catch(Error e) {}
+
BuilderApplication.singleton( null ).quit();
}
return true;
if (!_this.treescroll.el.visible || _this.treeselmodel.el.get_n_items() < 0) {
return;
}
- GLib.debug(
-
- "searcj key release %d, %d, %d ?= %d" ,
- (int) keyval, (int) keycode, state,
- (int)Gdk.Key.Return
- );
+ //GLib.debug(
+ // "searcj key release %d, %d, %d ?= %d" ,
+ // (int) keyval, (int) keycode, state,
+ // (int)Gdk.Key.Return
+ // );
if (!_this.treescroll.el.visible || _this.treeselmodel.el.get_n_items() < 0) {
return;
}
//listeners
this.el.setup.connect( (listitem) => {
+
+ var li = (listitem as Gtk.ListItem);
+ if (li == null) {
+ return;
+ }
+
var lbl = new Gtk.Label("");
- (listitem as Gtk.ListItem).set_child(lbl);
+ li.set_child(lbl);
lbl.justify = Gtk.Justification.LEFT;
lbl.xalign = 0;
lbl.use_markup = true;
lbl.ellipsize = Pango.EllipsizeMode.START;
- (listitem as Gtk.ListItem).activatable = true;
+ li.activatable = true;
});
this.el.bind.connect( (listitem) => {
- var lb = (Gtk.Label) (listitem as Gtk.ListItem).get_child();
- var item = (listitem as Gtk.ListItem).get_item() as WindowState;
-
+ var li = (listitem as Gtk.ListItem);
+ if (li == null) {
+ return;
+ }
+ var lb = (Gtk.Label) li.get_child() as Gtk.Label;
+ if (lb == null) {
+ return;
+ }
+ var item = li.get_item() as WindowState;
+ if (item == null) {
+ return;
+ }
lb.label = item.project.name;
//listeners
this.el.setup.connect( (listitem) => {
+ var li = (listitem as Gtk.ListItem);
+ if (li == null) {
+ return;
+ }
var lbl = new Gtk.Label("");
- (listitem as Gtk.ListItem).set_child(lbl);
+ li.set_child(lbl);
lbl.justify = Gtk.Justification.LEFT;
lbl.xalign = 0;
lbl.use_markup = true;
lbl.ellipsize = Pango.EllipsizeMode.START;
- (listitem as Gtk.ListItem).activatable = true;
+ li.activatable = true;
});
this.el.bind.connect( (listitem) => {
- var lb = (Gtk.Label) (listitem as Gtk.ListItem).get_child();
- var item = (listitem as Gtk.ListItem).get_item() as WindowState;
-
- lb.label = item.file.relpath;
+ var li = (listitem as Gtk.ListItem);
+ if (li == null) {
+ return;
+ }
+ var lb = (Gtk.Label) li.get_child() as Gtk.Label;
+ if (lb == null) {
+ return;
+ }
+ var item = li.get_item() as WindowState;
+ if (item == null) {
+ return;
+ }
+
+
+
+ lb.label = item.file.relpath;
//listeners
this.el.key_released.connect( (keyval, keycode, state) => {
- GLib.debug(
-
- "key release %d, %d, %d ?= %d %d" ,
- (int) keyval, (int) keycode, state,
- (int)Gdk.Key.O, Gdk.ModifierType.CONTROL_MASK
- );
+ //GLib.debug(
+ // "key release %d, %d, %d ?= %d %d" ,
+ // (int) keyval, (int) keycode, state,
+ // (int)Gdk.Key.O, Gdk.ModifierType.CONTROL_MASK
+ // );
if (keyval == Gdk.Key.Shift_L || keyval == Gdk.Key.Shift_R) {
this.is_shift = 0;
}