start_path = '.'
count = 7
+ print ui
if ui == 'cli':
self.present = Cli_Presentation(start_path, count, self.start_search)
elif ui == 'gtk':
def run(self):
return self.present.toplevel
-
#==============================================================================
class Abstraction(object):
for fname in fnames:
flpath = abspath(join(dirpath, fname))
- #self.presentation.show_current_status(flpath)
- self.presentation.update_window(flpath)
+ self.presentation.show_current_status(flpath)
# Останавливаем цикл по нажатию кнопки стоп
stopit = get_stopit()
except OSError:
continue
-
#==============================================================================
class Cli_Presentation(object):
def show_current_status(self, current_path):
print current_path
-
#==============================================================================
class Gtk_Presentation(object):
def show_current_status(current_path):
self.statusbar.push(self.context_id, current_path)
gtk.main_iteration()
- self.update_window = show_current_status
+ self.show_current_status = show_current_status
# self.show_out_toplevel(None, 'outtable', [(11, 22, 33)])
#=== Functions ============================================================
- def start_btn_released(self, widget, start_func):
+ def start_btn_released(self, btn, start_func):
self.stopit = False
self.stop_btn.set_sensitive(True)
self.start_btn.set_sensitive(False)
def show_out_toplevel(self, btn, outtype, results):
print 'Entering <' + outtype + '> output mode...'
out_submodule = __import__('files.' + outtype, None, None, outtype)
- out_toplevel = out_submodule.Gtk_Presentation(results)
+ out_toplevel = out_submodule.Gtk_Presentation(results).toplevel
-### self.vbox.remove(self.vbox.get_children()[2])
+ try:
+ self.vbox.remove(self.vbox.get_children()[2])
+ except:
+ pass
self.vbox.add(out_toplevel)
+ out_toplevel.show_all()
# out_submodule.Gtk_Presentation().show_results(results)