add support for icons and desktop file - precursor to removing autotools build
[roobuilder] / src / Builder4 / DialogFiles.vala
index 34294b2..318e186 100644 (file)
@@ -177,9 +177,11 @@ public class DialogFiles : Object
        }//
        public void load () {
             // cl list...
-            
+           
+              
             _this.is_loading = true;
-                
+               
+       
             Project.Project.loadAll();
             _this.project_list.el.set_model(new Gtk.SingleSelection(null));
             Project.Project.loadIntoStore(this.projectmodel.el);
@@ -190,6 +192,8 @@ public class DialogFiles : Object
            
            _this.projectselection.el.selected = Gtk.INVALID_LIST_POSITION; 
                _this.btn_delfile.el.hide();
+        
+         
        }
        public class Xcls_Box2 : Object
        {
@@ -1529,25 +1533,34 @@ public class DialogFiles : Object
        var str = _this.searchbox.el.text.down();       
        if (j.xtype == "Dir") {
        
-               if (str.length < 1) {
-                       return true;
-               }
+               
                for (var i =0 ; i < j.childfiles.n_items; i++) {
                        var f = (JsRender.JsRender) j.childfiles.get_item(i);
                        if (f.xtype != "PlainFile") {
                                continue;
                        }
+                       if (f.content_type.contains("image")) {
+                               continue;
+                       }
+                       if (str.length < 1) {
+                               return true;
+                       }
                        if (f.name.down().contains(str)) {
                                return true;
                        }
+                       
                }
+                
                return false;
        }
        if (j.xtype != "PlainFile") {
                return false;
        }
-
-       if (str.length < 1) {
+       if (j.content_type.contains("image")) {
+               return false;
+       }
+                        
+       if (str.length < 1) { // no search.
                return true;
        }
        if (j.name.down().contains(str)) {