Status label replaced by gtk.Statusbar
authorEugene Gagarin <mosfet07@ya.ru>
Sun, 5 Apr 2009 08:34:26 +0000 (12:34 +0400)
committerEugene Gagarin <mosfet07@ya.ru>
Sun, 5 Apr 2009 08:34:26 +0000 (12:34 +0400)
src/mvc/controllers/filesearch.py
src/mvc/views/filesearch.py

index 250d532..dbb2bee 100755 (executable)
@@ -52,7 +52,7 @@ class FilesearchCtrl(Controller):
             for fname in fnames:
                 flpath = abspath(join(dirpath, fname))
                 # Выводим текущий опрашиваемый файл в строку статуса
-                self.view['currfile_lbl'].set_text(flpath)
+                self.view['statusbar'].push(self.view['context_id'], flpath)
                 # обновляем окно
                 gtk.main_iteration()
                 # Останавливаем цикл по нажатию кнопки стоп
index 0e83bcc..ea99c72 100755 (executable)
@@ -74,19 +74,14 @@ class FilesearchView(View):
         path_col.set_sort_column_id(0)
         size_col.set_sort_column_id(2)
 
-        # Current file status line
-        self['currfile_lbl'] = gtk.Label()
-        self['currfile_lbl'].set_alignment(0, 0.5)
-        self['currfile_lbl'].set_ellipsize(pango.ELLIPSIZE_MIDDLE)
-        self['currfile_lbl'].set_padding(2, 2)
-        currfile_frm = gtk.Frame()
-        currfile_frm.add(self['currfile_lbl'])
+        self['statusbar'] = gtk.Statusbar()
+        self['context_id'] = self['statusbar'].get_context_id("Current file path")
 
         self['vbox'] = gtk.VBox(False, 4)
         self['vbox'].pack_start(self['path_entry'], False, False, 0)
         self['vbox'].pack_start(hbox, False, False, 0)
         self['vbox'].pack_start(self['treeview'])
-        self['vbox'].pack_start(currfile_frm, False, False, 0)
+        self['vbox'].pack_start(self['statusbar'], False, False, 0)
         self['vbox'].show_all()
 
     def set_quantity_value(self, val):