MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / confirm_dialog

Function confirm_dialog

Scripts/Developer Base/Smart Notes.py:389–400  ·  view source on GitHub ↗
(stdscr, text)

Source from the content-addressed store, hash-verified

387
388# Confirm dialog
389def confirm_dialog(stdscr, text):
390 h,w = stdscr.getmaxyx()
391 while True:
392 stdscr.erase()
393 centered_addstr(stdscr, h//2 - 1, text + ' (Y/N)')
394 centered_addstr(stdscr, h//2 + 1, 'Y: Yes N: No')
395 stdscr.refresh()
396 ch = stdscr.getch()
397 if ch in (ord('y'), ord('Y')):
398 return True
399 elif ch in (ord('n'), ord('N'), 27):
400 return False
401
402# View note
403def view_note_curses(stdscr, title, content):

Callers 2

action_for_noteFunction · 0.70
curses_reminders_menuFunction · 0.70

Calls 1

centered_addstrFunction · 0.70

Tested by

no test coverage detected