src/Builder4/PopoverFiles.bjs
authorAlan <alan@roojs.com>
Fri, 20 May 2022 07:30:45 +0000 (15:30 +0800)
committerAlan <alan@roojs.com>
Fri, 20 May 2022 07:30:45 +0000 (15:30 +0800)
src/Builder4/PopoverFiles.vala

src/Builder4/PopoverFiles.bjs
src/Builder4/PopoverFiles.vala

index 6d7cae3..663fd26 100644 (file)
     "    }",
     "    ",
     "    ",
-    "    /*",
+    "     ",
     "    ",
     "    // folders...",
     "    ",
-    "    if (!(pr is Project.Gtk)) {",
+    "    if (!(project is Project.Gtk)) {",
     "        print (\"not gtk... skipping files\");",
     "        return;",
     "    }",
-    "    var gpr = (Project.Gtk)pr;",
+    "    var gpr = (Project.Gtk)project;",
     "     var def = gpr.compilegroups.get(\"_default_\");",
     "     // not sure why the above is returng null!??",
     "     if (def == null) {",
     "     }",
     "\t var items  = def.sources;",
     "\t\t ",
-    "\t\t ",
+    "\t Gtk.TreeIter citer; ",
     "\t ",
     "\tfor(var i =0 ; i < items.size; i++) {",
-    "\t    print (\"cheking folder %s\\n\", items.get(i));",
+    "\t     print (\"cheking folder %s\\n\", items.get(i));",
     "\t     var files = gpr.filesForOpen(items.get(i));",
     "\t     if (files.size < 1) {",
     "\t        continue;",
     "\t     }",
-    "",
+    "\t\t this.el.append(out citer,null);",
+    "\t\t",
+    "\t\t",
     "\t    // add the directory... items.get(i);",
     "\t    var x = new Xcls_folderitem(this,items.get(i));",
     "\t    this.fileitems.add(x);",
index 5f5a166..5cdaa12 100644 (file)
@@ -203,15 +203,15 @@ public class Xcls_PopoverFiles : Object
         }
         
         
-        /*
+         
         
         // folders...
         
-        if (!(pr is Project.Gtk)) {
+        if (!(project is Project.Gtk)) {
             print ("not gtk... skipping files");
             return;
         }
-        var gpr = (Project.Gtk)pr;
+        var gpr = (Project.Gtk)project;
          var def = gpr.compilegroups.get("_default_");
          // not sure why the above is returng null!??
          if (def == null) {
@@ -220,15 +220,17 @@ public class Xcls_PopoverFiles : Object
          }
         var items  = def.sources;
                 
-                
+        Gtk.TreeIter citer; 
         
        for(var i =0 ; i < items.size; i++) {
-           print ("cheking folder %s\n", items.get(i));
+            print ("cheking folder %s\n", items.get(i));
             var files = gpr.filesForOpen(items.get(i));
             if (files.size < 1) {
                continue;
             }
-    
+                this.el.append(out citer,null);
+               
+               
            // add the directory... items.get(i);
            var x = new Xcls_folderitem(this,items.get(i));
            this.fileitems.add(x);