From: Alan Knowles Date: Tue, 26 May 2015 05:45:01 +0000 (+0800) Subject: src/Project/Gtk.vala X-Git-Url: http://git.roojs.org/?p=app.Builder.js;a=commitdiff_plain;h=3be0863ae30e6431ba010b6686ecc6250de23c06 src/Project/Gtk.vala --- diff --git a/src/Project/Gtk.vala b/src/Project/Gtk.vala index 5f06313c7..e6c32561c 100644 --- a/src/Project/Gtk.vala +++ b/src/Project/Gtk.vala @@ -214,8 +214,8 @@ namespace Project { var ret = new Gee.ArrayList(); - for (var i = 0; i < cfiles.size; i ++) { - var fn = cfiles.get(i); + for (var i = 0; i < allfiles.size; i ++) { + var fn = allfiles.get(i); if (Regex.match_simple("\\.vala$", fn)) { ret.add( fn); continue; @@ -239,7 +239,7 @@ namespace Project { } - if (ret.index_of( vv) > -1) { + if (allfiles.index_of( vv) > -1) { continue; } // add the 'c' file.. @@ -255,20 +255,25 @@ namespace Project { public Gee.ArrayList filesForOpen(string in_path) { - var allfile = this.fileAll(); + var allfiles = this.fileAll(); var ret = new Gee.ArrayList(); - for (var i = 0; i < cfiles.size; i ++) { + for (var i = 0; i < allfiles.size; i ++) { var fn = cfiles.get(i); + if (Regex.match_simple("\\.vala\\.c$", fn)) { + continue; + } + if (Regex.match_simple("\\.bjs\\.c$", fn)) { + continue; + } + if (Regex.match_simple("\\.vala$", fn)) { ret.add( fn); continue; } // vala.c -- ignore.. - if (Regex.match_simple("\\.vala\\.c$", fn)) { - continue; - } + // not a c file... if (!Regex.match_simple("\\.c$", fn)) { continue;