Small files/search improvement
[findit] / src / files / search.py
index a24026e..c4c02b1 100755 (executable)
@@ -108,6 +108,7 @@ class Gtk_Presentation(object):
 
     def __init__(self, start_func, __):
         import gtk
+        global gtk  # for show_current_status()
 
         # "Start path" entry
         self.path_entry = gtk.Entry()
@@ -164,15 +165,9 @@ class Gtk_Presentation(object):
         self.vbox.pack_start(hbox, False, False, 0)
         self.vbox.pack_end(self.statusbar, False, False, 0)
 
-        self.toplevel = self.vbox
-
-        # For importing gtk only once (lambda not work)
-        def show_current_status(current_path):
-            self.statusbar.push(self.context_id, current_path)
-            gtk.main_iteration()
-        self.show_current_status = show_current_status
+#        self.show_out_toplevel(None, config['outtype'], [(1, 'path', 'bytesize')])
 
-        self.show_out_toplevel(None, config['outtype'], [(1, 'path', 'bytesize')])
+        self.toplevel = self.vbox
 
     #=== Functions ============================================================
     def start_btn_released(self, btn, start_func):
@@ -197,6 +192,10 @@ class Gtk_Presentation(object):
     def get_stopit(self):
         return self.stopit
 
+    def show_current_status(self, current_path):
+        self.statusbar.push(self.context_id, current_path)
+        gtk.main_iteration()
+
     def run(self):
         pass