From 3be0863ae30e6431ba010b6686ecc6250de23c06 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 26 May 2015 13:45:01 +0800 Subject: [PATCH] src/Project/Gtk.vala --- src/Project/Gtk.vala | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) 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; -- 2.39.2