Builder4/ValaProjectSettings.bjs
authorAlan Knowles <alan@roojs.com>
Wed, 19 Nov 2014 08:20:56 +0000 (16:20 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 19 Nov 2014 08:20:56 +0000 (16:20 +0800)
Builder4/ValaProjectSettings.vala

Builder4/ValaProjectSettings.bjs
Builder4/ValaProjectSettings.vala

index 9c4ac73..9efc4a9 100644 (file)
                                             "items" : [
                                                 {
                                                     "listeners" : {
-                                                        "activate" : "()  => {\n    \n    var  chooser = new Gtk.FileChooserDialog (\n\t\"Add a directory\", _this.window.el, Gtk.FileChooserAction.SELECT_FOLDER ,\n\t\"_Cancel\",\n\tGtk.ResponseType.CANCEL,\n\t\"_Add\",\n\tGtk.ResponseType.ACCEPT);\n    if (chooser.run () != Gtk.ResponseType.ACCEPT) {\n        chooser.close ();\n           return;\n       }\n       chooser.close ();\n       // add the directory..\n       _this.project.addGlobalDir(chooser.get_uri ());\n       _this.default_directory_tree_store.load();\n}"
+                                                        "activate" : "()  => {\n    \n    var  chooser = new Gtk.FileChooserDialog (\n\t\"Add a directory\", _this.window.el, Gtk.FileChooserAction.SELECT_FOLDER ,\n\t\"_Cancel\",\n\tGtk.ResponseType.CANCEL,\n\t\"_Add\",\n\tGtk.ResponseType.ACCEPT);\n    if (chooser.run () != Gtk.ResponseType.ACCEPT) {\n        chooser.close ();\n           return;\n       }\n       chooser.close ();\n       // add the directory..\n       _this.project.compilegroups.get(\"_default_\").sources.add(chooser.get_uri ());\n       _this.default_directory_tree_store.load();\n}"
                                                     },
                                                     "* pack" : "add",
                                                     "xtype" : "MenuItem",
index 0374cca..8468235 100644 (file)
@@ -725,7 +725,7 @@ public class ValaProjectSettings : Object
                    }
                    chooser.close ();
                    // add the directory..
-                   _this.project.addGlobalDir(chooser.get_uri ());
+                   _this.project.compilegroups.get("_default_").sources.add(chooser.get_uri ());
                    _this.default_directory_tree_store.load();
             });
         }