diff --git a/porcupine/_state.py b/porcupine/_state.py index 7e6b4a1ce..54113eab9 100644 --- a/porcupine/_state.py +++ b/porcupine/_state.py @@ -42,6 +42,8 @@ class _State: # global state makes some things a lot easier (I'm sorry) _global_state: _State | None = None +Quit = object() + def _log_tkinter_error( exc: Type[BaseException], val: BaseException, tb: types.TracebackType | None @@ -65,9 +67,6 @@ def open_files(files: Iterable[str]) -> None: tabmanager.open_file(Path(path_string)) -Quit = object() - - def listen_for_files(message_queue: queue.Queue): try: message = message_queue.get_nowait() @@ -192,7 +191,6 @@ def quit() -> None: return _ipc.send([Quit]) - _get_state().ipc_session.close() for tab in get_tab_manager().tabs(): diff --git a/porcupine/tabs.py b/porcupine/tabs.py index 0ec76c3aa..8b585d807 100644 --- a/porcupine/tabs.py +++ b/porcupine/tabs.py @@ -86,7 +86,6 @@ class TabManager(ttk.Notebook): def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) - self.bind("<>", self._on_tab_selected, add=True) self.bind("<>", self._on_fs_changed, add=True) self.winfo_toplevel().bind("", self._handle_main_window_focus, add=True)