From: “Alexandr <“popov2al@gmail.com”> Date: Sat, 4 Apr 2009 19:48:30 +0000 (+0400) Subject: add label with full directory size in src/outtable.py X-Git-Url: https://vcs.maemo.org/git/?a=commitdiff_plain;h=3f69c27c36e540612b1263d49046fd2177cc1e44;p=findit add label with full directory size in src/outtable.py --- diff --git a/src/outtable.py b/src/outtable.py index 416e0b5..83aec24 100644 --- a/src/outtable.py +++ b/src/outtable.py @@ -4,6 +4,7 @@ import gtk import gobject +from misc import size_hum_read class Out_Table_Control(object): def __init__(self, config): @@ -11,8 +12,8 @@ class Out_Table_Control(object): win_height = config.get('window_height') self.out_ui = Out_Table_Presentation(win_width, win_height) - def show(self, filelist): - self.out_ui.show_result(filelist) + def show(self, filelist, flsize): + self.out_ui.show_result(filelist, flsize) def run(self): self.out_ui.run() @@ -61,12 +62,19 @@ class Out_Table_Presentation(gtk.Window): size_col.set_sort_column_id(2) scrollwind.add(self.treeview) - self.add(scrollwind) + self.label = gtk.Label('full dir size = ') + + vbox = gtk.VBox(False, 5) + vbox.pack_start(scrollwind, True, True, 0) + vbox.pack_start(self.label, False, False,0) + self.add(vbox) - def show_result(self, filelist): + def show_result(self, filelist, fullsize): self.liststore.clear() for stroka in filelist: self.liststore.append(stroka) + flsizestr = 'full dir size = %s' % size_hum_read(fullsize) + self.label.set_text(flsizestr) def run(self): self.show_all()