if (!(_this.project is Project.Gtk)) {
return;
}
- var sd = _this.project.sourcedirs();
+ var sd = ((Project.Gtk)_this.project).sourcedirs();
Gtk.TreeIter iter;
var el = this.el;
el.set_value(iter, 0, sd[i]);
el.set_value(iter, 1, sd[i]);
- if (data.get(i) == cur) {
- _this.build_module.el.set_active_iter(iter);
- }
+ //if (data.get(i) == cur) {
+ // _this.build_module.el.set_active_iter(iter);
+ // }
}
// this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);
}
// ---------------- NEW FILES...
-
- var fn = _this.name.el.get_text();
- var dir = _this.project.firstPath(); // fixme.. should be based on a pulldown?
-
- var targetfile = dir + "/" + fn;
-
- // strip the file type off the end..
Gtk.TreeIter iter;
if (!_this.filetype.el.get_active_iter(out iter)) {
_this.mainwindow.el,
"You must select a file type. "
);
+ return;
+
}
+
+
+ var fn = _this.name.el.get_text();
+
Value ftypename;
_this.ftdbmodel.el.get_value (iter, 0, out ftypename);
var ext = ((string)ftypename);
+ var dir = _this.project.firstPath();
+ if (ext != "bjs") {
+
+ if (!_this.dir.el.get_active_iter(out iter)) {
+ // should not happen...
+ // so we are jut going to return without
+ StandardErrorDialog.show(
+ _this.mainwindow.el,
+ "You must select a directory "
+ );
+ return;
+ }
+ Value vdir;
+ _this.dirmodel.el.get_value (iter, 0, out vdir);
+ dir = (string)vdir;
+ }
+
+ var targetfile = dir + "/" + fn;
+
+ // strip the file type off the end..
+
var rx = new GLib.Regex("\\." + ext + "$",GLib.RegexCompileFlags.CASELESS);
targetfile = rx.replace(targetfile, targetfile.length, 0, "");