(self, changed, highlight, *misc)
Draw menu for locked database
Draw menu for locked database
Draw menu for locked database
def draw_lock_menu(self, changed, highlight, *misc):
        '''Draw menu for locked database'''

        h_color = 6
        n_color = 1
        if changed is True:
            cur_dir = self.cur_dir + '*'
        else:
            cur_dir = self.cur_dir
        try:
            self.stdscr.clear()
            self.stdscr.addstr(
                0, 0, self.loginname + '@' + self.hostname + ':',
                cur.color_pair(2))
            self.stdscr.addstr(
                0, len(self.loginname + '@' + self.hostname + ':'),
                cur_dir)
            for i, j, k in misc:
                if i == highlight:
                    self.stdscr.addstr(i, j, k, cur.color_pair(h_color))
                else:
                    self.stdscr.addstr(i, j, k, cur.color_pair(n_color))
        #except: # to prevent a crash if screen is small
        #    pass
        finally:
            self.stdscr.refresh()
def draw_lock_menu ( self , changed , highlight , * misc ) : h_color = 6 n_color = 1 if changed is True : cur_dir = self . cur_dir + '*' else : cur_dir = self . cur_dir try : self . stdscr . clear ( ) self . stdscr . addstr ( 0 , 0 , self . loginname + '@' + self . hostname + ':' , cur . color_pair ( 2 ) ) self . stdscr . addstr ( 0 , len ( self . loginname + '@' + self . hostname + ':' ) , cur_dir ) for i , j , k in misc : if i == highlight : self . stdscr . addstr ( i , j , k , cur . color_pair ( h_color ) ) else : self . stdscr . addstr ( i , j , k , cur . color_pair ( n_color ) ) #except: # to prevent a crash if screen is small #    pass finally : self . stdscr . refresh ( )