src/Project/Gtk.vala
authorAlan Knowles <alan@roojs.com>
Tue, 26 May 2015 05:45:01 +0000 (13:45 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 26 May 2015 05:45:01 +0000 (13:45 +0800)
src/Project/Gtk.vala

index 5f06313..e6c3256 100644 (file)
@@ -214,8 +214,8 @@ namespace Project {
                        var ret =  new Gee.ArrayList<string>();
                        
                        
-                       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<string> filesForOpen(string in_path)
                {
-                       var allfile = this.fileAll();
+                       var allfiles = this.fileAll();
                        var ret =  new Gee.ArrayList<string>();
                        
                        
-                       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;