Logo Search packages:      
Sourcecode: lfm version File versions  Download package

def lfm::lfm::Lfm::__show_bars (   self  )  [private]

show title and status bars

Definition at line 176 of file lfm.py.

00176                          :
        """show title and status bars"""
        
        self.win_title.erase()
        if self.maxw >= 60:
            title = '%s v%s   (c) %s, %s' % (LFM_NAME, VERSION, DATE, AUTHOR)
            pos = (self.maxw-len(title)) /2
            self.win_title.addstr(0, pos, title)
        self.win_title.refresh()

        self.win_status.erase()
        panel = self.panels[self.panel]
        if len(panel.selections):
            if self.maxw >= 45:
                size = 0
                for f in panel.selections:
                    size += panel.files[f][files.FT_SIZE]
                self.win_status.addstr('    %s bytes in %d files' % \
                                       (num2str(size), len(panel.selections)))
        else:
            if self.maxw >= 80:
                self.win_status.addstr('File: %4d of %-4d' % \
                                       (panel.file_i + 1, panel.nfiles))
                filename = panel.sorted[panel.file_i]
                if not panel.vfs:
                    realpath = files.get_realpath(panel.path, filename,
                                                  panel.files[filename][files.FT_TYPE])
                else:
                    realpath = os.path.join(vfs.join(app, panel), filename)
                if len(realpath) > self.maxw - 35:
                    path = '~' + realpath[-(self.maxw-37):]
                else:
                    path = realpath
                path = files.fix_chars_in_filename(path)
                self.win_status.addstr(0, 20, 'Path: ' + path)
        if self.maxw > 10:
            try:
                self.win_status.addstr(0, self.maxw-8, 'F1=Help')
            except:
                pass
        self.win_status.refresh()


    def show(self):


Generated by  Doxygen 1.6.0   Back to index