Added file filter to files Cli_Presentation
[findit] / src / files / search.py
index 22f22e6..cafc0f3 100755 (executable)
@@ -7,7 +7,7 @@ from os.path import join, abspath, normcase, isdir, getsize
 from heapq import nlargest
 from fnmatch import fnmatch
 
-from misc import size_hum_read, _, NotebookWCloseBtns
+from misc import size_hum_read, _
 from config import config
 
 OUTTYPES = [
@@ -87,12 +87,13 @@ class Cli_Presentation(object):
         self.outtype = params['outtype']
         self.start_path = params['start_path']
         self.count = params['count']
+        self.file_filter = params['file_filter'].split(';')
         self.stopit = False
 
         self.toplevel = None
 
     def get_data(self):
-        return self.outtype, self.start_path, int(self.count)
+        return self.outtype, self.start_path, int(self.count), self.file_filter
 
     def get_stopit(self):
         return False
@@ -119,6 +120,7 @@ class Gtk_Presentation(object):
     def __init__(self, start_func, __):
         import gtk
         global gtk  # for show_current_status()
+        from misc import NotebookWCloseBtns
 
         self.nb = NotebookWCloseBtns()
         self.nb.notebook.set_scrollable(True)
@@ -281,7 +283,6 @@ class Gtk_Presentation(object):
 
     #=== Output type selecting ================================================
     def show_out_toplevel(self, outtype, results):
-        print 'Entering <' + outtype['name'] + '> output mode...'
         out_submodule = __import__('files.' + outtype['name'], None, None, outtype)
         self.out_toplevel = out_submodule.Gtk_Presentation(results).toplevel
         self.nb.new_tab(self.out_toplevel, outtype['label'])