예제 #1
0
파일: selection.py 프로젝트: fqxp/nete-gtk
    def do_prev_note(state):
        notes = state['cache']['notes']
        current_note_id = state['ui_state']['current_note_id']

        if current_note_id is None or not note_list.contains(notes, current_note_id):
            select_last()

        previous_note_id = note_list.previous_note_id(notes, current_note_id)
        if previous_note_id is not None:
            return load_note(previous_note_id)
예제 #2
0
파일: selection.py 프로젝트: fqxp/nete-gtk
    def do_next_note(state):
        notes = state['cache']['notes']
        current_note_id = state['ui_state']['current_note_id']

        if current_note_id is None or not note_list.contains(notes, current_note_id):
            select_first()

        next_note_id = note_list.next_note_id(notes, current_note_id)
        if next_note_id:
            return load_note(next_note_id)