From 6a17c554f1060363fa23b1f346b9c729141f0f94 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 4 Mar 2015 14:31:22 +0800 Subject: [PATCH] src/Builder4/ValaProjectSettings.bjs src/Builder4/ValaProjectSettings.vala --- src/Builder4/ValaProjectSettings.bjs | 2 +- src/Builder4/ValaProjectSettings.vala | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Builder4/ValaProjectSettings.bjs b/src/Builder4/ValaProjectSettings.bjs index a98f46590..5167b1600 100644 --- a/src/Builder4/ValaProjectSettings.bjs +++ b/src/Builder4/ValaProjectSettings.bjs @@ -262,7 +262,7 @@ { "listeners" : { "button_press_event" : " ( ev) => {\n //console.log(\"button press?\");\n \n \n if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {\n //print(\"click\" + ev.type);\n return false;\n }\n //Gtk.TreePath res;\n //if (!this.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {\n // return true;\n //}\n \n // this.el.get_selection().select_path(res);\n \n //if (!this.get('/LeftTreeMenu').el) { \n // this.get('/LeftTreeMenu').init(); \n // }\n \n _this.targets_tree_menu.el.set_screen(Gdk.Screen.get_default());\n _this.targets_tree_menu.el.show_all();\n _this.targets_tree_menu.el.popup(null, null, null, 3, ev.time);\n // print(\"click:\" + res.path.to_string());\n return true;\n}", - "cursor_changed" : " ( ) => {\n\n if (this.cursor != \"\") {\n // save the values..\n }\n \n // load the new values.\n \n\n Gtk.TreeModel mod;\n Gtk.TreeIter iter;\n if (!this.el.get_selection().get_selected(out mod, out iter)) {\n print(\"nothing selected\\n\");\n return;\n }\n\n \n // add the directory..\n \n \n GLib.Value val;\n mod.get_value(iter,0, out val);\n var fn = (string) val;\n \n this.cursor = fn;\n var cg = _this.project.compilegroups.get(fn);\n _this.build_pack_target.el.set_text(cg.target_bin);\n _this.build_compile_flags.el.set_text(cg.compile_flags);\n // load the srouces\n\n\n }" + "cursor_changed" : " ( ) => {\n\n if (this.cursor != \"\") {\n // save the values..\n }\n \n // load the new values.\n \n\n Gtk.TreeModel mod;\n Gtk.TreeIter iter;\n if (!this.el.get_selection().get_selected(out mod, out iter)) {\n print(\"nothing selected\\n\");\n // should disable the right hand side..\n _this.set_vbox.el.hide();\n return;\n }\n _this.set_vbox.el.show();\n \n // add the directory..\n \n \n GLib.Value val;\n mod.get_value(iter,0, out val);\n var fn = (string) val;\n \n this.cursor = fn;\n var cg = _this.project.compilegroups.get(fn);\n _this.build_pack_target.el.set_text(cg.target_bin);\n _this.build_compile_flags.el.set_text(cg.compile_flags);\n // load the srouces\n\n\n }" }, "id" : "targets_tree", "# string cursor" : "", diff --git a/src/Builder4/ValaProjectSettings.vala b/src/Builder4/ValaProjectSettings.vala index cf7ba3572..6d3bf87bd 100644 --- a/src/Builder4/ValaProjectSettings.vala +++ b/src/Builder4/ValaProjectSettings.vala @@ -1133,10 +1133,12 @@ public class ValaProjectSettings : Object Gtk.TreeModel mod; Gtk.TreeIter iter; if (!this.el.get_selection().get_selected(out mod, out iter)) { - print("nothing selected\n"); + print("nothing selected\n"); + // should disable the right hand side.. + _this.set_vbox.el.hide(); return; } - + _this.set_vbox.el.show(); // add the directory.. -- 2.39.2