Add other common file extensions to FileScreen
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>
Mon, 1 Dec 2014 18:25:57 +0000 (20:25 +0200)
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>
Fri, 19 Dec 2014 20:10:30 +0000 (22:10 +0200)
src/modules/utils/panel/screens/FileScreen.cpp

index 309850e..a73e9e0 100644 (file)
@@ -116,11 +116,13 @@ void FileScreen::clicked_line(uint16_t line)
     }
 }
 
-// only filter files that have a .g in them
+// only filter files that have a .g, .ngc or .nc in them
 bool FileScreen::filter_file(const char *f)
 {
     string fn= lc(f);
-    return (fn.find(".g") != string::npos);
+    return (fn.find(".g") != string::npos) ||
+           (fn.find(".ngc") != string::npos) ||
+           (fn.find(".nc") != string::npos);
 }
 
 // Find the "line"th file in the current folder