()
| 44 | |
| 45 | |
| 46 | def main(): |
| 47 | |
| 48 | window = make_window() |
| 49 | while True: |
| 50 | event, values = window.read() # wake every hour |
| 51 | print(event, values) |
| 52 | if event == sg.WIN_CLOSED or event == 'Exit': |
| 53 | break |
| 54 | if event == 'Add Item': |
| 55 | window.metadata += 1 |
| 56 | window.extend_layout(window['-TRACKING SECTION-'], [item_row(window.metadata)]) |
| 57 | elif event == 'Edit Me': |
| 58 | sg.execute_editor(__file__) |
| 59 | elif event == 'Version': |
| 60 | sg.popup_scrolled(__file__, sg.get_versions(), location=window.current_location(), keep_on_top=True, non_blocking=True) |
| 61 | elif event[0] == '-DEL-': |
| 62 | window[('-ROW-', event[1])].update(visible=False) |
| 63 | window.close() |
| 64 | |
| 65 | |
| 66 | if __name__ == '__main__': |
no test coverage detected