From da718c684d7e59274633ad6c73b5240935f26401 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 19 Nov 2026 08:51:30 +0900 Subject: [PATCH] change: block shortcut creation on snap client --- dzgui/strings/wizard.py | 6 ++---- dzgui/views/dialogs/wizard.py | 5 +++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dzgui/strings/wizard.py b/dzgui/strings/wizard.py index 7537d654..613b1d2a 100644 --- a/dzgui/strings/wizard.py +++ b/dzgui/strings/wizard.py @@ -20,9 +20,7 @@ desc_flatpak_path = ( desc_ubuntu_path = "This is the default Steam path on Ubuntu-based systems." desc_snap_path = "This is the default Steam path on systems using Snap packages." desc_debian_path = "This is the default Steam path on Debian-based systems." -no_valid_paths = ( - "No valid Steam path or Steam command found on system. Please install Steam to continue." -) +no_valid_paths = "No valid Steam path or Steam command found on system. Please install Steam to continue." button_scan = "Scan for Steam" ### ConfigMigrationPage @@ -75,7 +73,7 @@ checkbox_steam_shortcut = ( "This creates a standalone copy of DZGUI and adds it to Steam. " "You must restart Steam for the shortcut to appear. This will not replace or update existing shortcuts. " "If you update DZGUI when it is launched via Steam, updates will be applied to the Steam version. " - "Not available if you selected the Flatpak client as your Steam default." + "Not available if you selected the Snap client as your Steam default." ), ) checkbox_start_menu = ( diff --git a/dzgui/views/dialogs/wizard.py b/dzgui/views/dialogs/wizard.py index 768ea147..fab56121 100644 --- a/dzgui/views/dialogs/wizard.py +++ b/dzgui/views/dialogs/wizard.py @@ -14,6 +14,7 @@ from dzgui.const.constants import ( HERO_PATH, FLATPAK_ROOT_PATH, LEGACY_CONFIG_PATH, + SNAP_STEAM_PATH, TMP_PATH, ) from dzgui.config.xdg import get_real_home @@ -701,6 +702,7 @@ class ShortcutCreationPage(OptionalPageMixin, EnumeratedWizardPage): # type: ig self.add_start(self.checks_area) self.show_all() + self.connect("map", self._on_map) def _on_start_menu_toggled(self, button: Gtk.CheckButton) -> None: @@ -711,6 +713,9 @@ class ShortcutCreationPage(OptionalPageMixin, EnumeratedWizardPage): # type: ig def set_steam_path(self, path: Path) -> None: self.steam_path = path + if SNAP_STEAM_PATH in self.steam_path: + self.steam_checkbox.set_active(False) + self.steam_checkbox.set_sensitive(False) def is_steam_checkbox_active(self) -> bool: return self.steam_checkbox.get_active()