(self)
Edit comment of marked entry
Edit comment of marked entry
Edit comment of marked entry
def edit_comment(self):
        '''Edit comment of marked entry'''

        if self.entries:
            std = 'Comment: '
            edit = Editor(self.control.stdscr, title=std, win_location=(0, 1),
                          inittext=self.entries[self.e_highlight].comment,
                          quick_help="   (F2: Save, F5: Cancel)")()
            if edit == -1:
                self.close()
            elif edit is not False:
                if self.remote is True:
                    uuid = self.entries[self.e_highlight].uuid
                    last_mod = (self.entries[self.e_highlight]
                                    .last_mod.timetuple())
                    db_buf = self.client().set_e_comment(edit.encode(),
                                                         uuid, last_mod)
                    if self.check_answer(db_buf) is not False:
                        self.reload_remote_db(db_buf)
                else:
                    self.changed = True
                    self.entries[self.e_highlight].set_comment(edit)
def edit_comment ( self ) : if self . entries : std = 'Comment: ' edit = Editor ( self . control . stdscr , title = std , win_location = ( 0 , 1 ) , inittext = self . entries [ self . e_highlight ] . comment , quick_help = "   (F2: Save, F5: Cancel)" ) ( ) if edit == - 1 : self . close ( ) elif edit is not False : if self . remote is True : uuid = self . entries [ self . e_highlight ] . uuid last_mod = ( self . entries [ self . e_highlight ] . last_mod . timetuple ( ) ) db_buf = self . client ( ) . set_e_comment ( edit . encode ( ) , uuid , last_mod ) if self . check_answer ( db_buf ) is not False : self . reload_remote_db ( db_buf ) else : self . changed = True self . entries [ self . e_highlight ] . set_comment ( edit )