From 78c9a290cc092641bdb7ef9c7968d41756a0dbca Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Mon, 23 Oct 2023 15:35:25 +0900 Subject: [PATCH] =?UTF-8?q?[Refactor]=20=E3=83=A1=E3=82=A4=E3=83=B3?= =?UTF-8?q?=E7=94=BB=E9=9D=A2=E3=81=AE=E9=96=89=E3=81=98=E3=82=8B=E3=83=9C?= =?UTF-8?q?=E3=82=BF=E3=83=B3=E3=82=92=E6=8A=BC=E3=81=97=E3=81=9F=E3=81=A8?= =?UTF-8?q?=E3=81=8D=E3=81=AE=E5=87=A6=E7=90=86=E3=82=92CALLBACK=E9=96=A2?= =?UTF-8?q?=E6=95=B0=E3=81=AB=E3=81=97=E3=81=A6view.py=E3=81=AB=E7=A7=BB?= =?UTF-8?q?=E5=8B=95=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view.py | 2 ++ vrct_gui/main_window/createMainWindowWidgets.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/view.py b/view.py index ae1948d3..40cc0cb9 100644 --- a/view.py +++ b/view.py @@ -85,6 +85,8 @@ class View(): CALLBACK_RESTART_SOFTWARE=None, CALLBACK_UPDATE_SOFTWARE=None, + CALLBACK_QUIT_VRCT=vrct_gui._quitVRCT, + CALLBACK_WHEN_DETECT_WINDOW_OVERED_SIZE=self._showDisplayOverUiSizeConfirmationModal, # Confirmation Modal diff --git a/vrct_gui/main_window/createMainWindowWidgets.py b/vrct_gui/main_window/createMainWindowWidgets.py index 2bcea306..088a3075 100644 --- a/vrct_gui/main_window/createMainWindowWidgets.py +++ b/vrct_gui/main_window/createMainWindowWidgets.py @@ -6,7 +6,7 @@ from utils import callFunctionIfCallable from ..ui_utils import createButtonWithImage, getImagePath, bindButtonFunctionAndColor def createMainWindowWidgets(vrct_gui, settings, view_variable): - vrct_gui.protocol("WM_DELETE_WINDOW", vrct_gui._quitVRCT) + vrct_gui.protocol("WM_DELETE_WINDOW", lambda: callFunctionIfCallable(view_variable.CALLBACK_QUIT_VRCT)) vrct_gui.iconbitmap(getImagePath("vrct_logo_mark_black.ico"))