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

def lfm::actions::Tree::__init_curses (   self,
  pos 
) [private]

initialize curses stuff

Definition at line 1743 of file actions.py.

01743                                 :
        """initialize curses stuff"""
        
        if pos == 0:      # not visible panel
            self.dims = (curses.LINES-2, 0, 0, 0)     # h, w, y, x
            return
        elif pos == 1:    # left panel -> right
            self.dims = (curses.LINES-2, int(curses.COLS/2), 1, int(curses.COLS/2))
        elif pos == 2:    # right panel -> left
            self.dims = (curses.LINES-2, int(curses.COLS/2), 1, 0)
        else:             # full panel -> right
            self.dims = (curses.LINES-2, int(curses.COLS/2), 1, int(curses.COLS/2))
        try:
            self.win_tree = curses.newwin(self.dims[0], self.dims[1], self.dims[2], self.dims[3])
        except curses.error:
            print 'Can\'t create tree window'
            sys.exit(-1)
        self.win_tree.keypad(1)
        if curses.has_colors():
            self.win_tree.attrset(curses.color_pair(2))
            self.win_tree.bkgdset(curses.color_pair(2))

        
    def show(self):


Generated by  Doxygen 1.6.0   Back to index