File sandbox-dont-exit.patch of Package Bottles

diff -Pdpru Bottles/bottles/frontend/meson.build Bottles-fixed/bottles/frontend/meson.build
--- Bottles/bottles/frontend/meson.build	2025-03-17 04:14:40.000000000 +0100
+++ Bottles-fixed/bottles/frontend/meson.build	2025-05-23 18:46:01.415954987 +0200
@@ -25,10 +25,6 @@ params_file = configure_file(
 
 fs = import('fs')
 
-if not fs.is_file('/' + '.flatpak-info')
-  error('file does not exist')
-endif
-
 bottles_sources = [
   '__init__.py',
   'main.py',
diff -Pdpru Bottles/bottles/frontend/views/bottle_details.py Bottles-fixed/bottles/frontend/views/bottle_details.py
--- Bottles/bottles/frontend/views/bottle_details.py	2025-03-17 04:14:40.000000000 +0100
+++ Bottles-fixed/bottles/frontend/views/bottle_details.py	2025-05-23 18:47:57.014753206 +0200
@@ -435,21 +435,7 @@ class BottleView(Adw.PreferencesPage):
             dialog.set_modal(True)
             dialog.connect("response", execute)
             dialog.show()
-
-        if Xdp.Portal.running_under_sandbox():
-            if self.window.settings.get_boolean("show-sandbox-warning"):
-                dialog = Adw.MessageDialog.new(
-                    self.window,
-                    _("Be Aware of Sandbox"),
-                    _(
-                        "Bottles is running in a sandbox, a restricted permission environment needed to keep you safe. If the program won't run, consider moving inside the bottle (3 dots icon on the top), then launch from there."
-                    ),
-                )
-                dialog.add_response("dismiss", _("_Dismiss"))
-                dialog.connect("response", show_chooser)
-                dialog.present()
-            else:
-                show_chooser()
+            show_chooser()
 
     def __backup(self, widget, backup_type):
         """
diff -Pdpru Bottles/bottles/frontend/views/bottle_preferences.py Bottles-fixed/bottles/frontend/views/bottle_preferences.py
--- Bottles/bottles/frontend/views/bottle_preferences.py	2025-03-17 04:14:40.000000000 +0100
+++ Bottles-fixed/bottles/frontend/views/bottle_preferences.py	2025-05-23 18:48:08.216871371 +0200
@@ -139,7 +139,7 @@ class PreferencesView(Adw.PreferencesPag
         self.queue = details.queue
         self.details = details
 
-        if not gamemode_available or not Xdp.Portal.running_under_sandbox():
+        if not gamemode_available:
             return
 
         _not_available = _("This feature is unavailable on your system.")
diff -Pdpru Bottles/bottles/frontend/views/list.py Bottles-fixed/bottles/frontend/views/list.py
--- Bottles/bottles/frontend/views/list.py	2025-03-17 04:14:40.000000000 +0100
+++ Bottles-fixed/bottles/frontend/views/list.py	2025-05-23 18:48:17.462035955 +0200
@@ -82,8 +82,6 @@ class BottlesBottleRow(Adw.ActionRow):
 
     def run_executable(self, *_args):
         """Display file dialog for executable"""
-        if not Xdp.Portal.running_under_sandbox():
-            return
 
         def set_path(_dialog, response):
             if response != Gtk.ResponseType.ACCEPT:
diff -Pdpru Bottles/bottles/frontend/views/new_bottle_dialog.py Bottles-fixed/bottles/frontend/views/new_bottle_dialog.py
--- Bottles/bottles/frontend/views/new_bottle_dialog.py	2025-03-17 04:14:40.000000000 +0100
+++ Bottles-fixed/bottles/frontend/views/new_bottle_dialog.py	2025-05-23 18:48:23.728147512 +0200
@@ -80,8 +80,6 @@ class BottlesNewBottleDialog(Adw.Dialog)
         super().__init__(**kwargs)
         # common variables and references
         self.window = GtkUtils.get_parent_window()
-        if not self.window or not Xdp.Portal.running_under_sandbox():
-            return
 
         self.app = self.window.get_application()
         self.manager = self.window.manager
diff -Pdpru Bottles/bottles/frontend/windows/window.py Bottles-fixed/bottles/frontend/windows/window.py
--- Bottles/bottles/frontend/windows/window.py	2025-03-17 04:14:40.000000000 +0100
+++ Bottles-fixed/bottles/frontend/windows/window.py	2025-05-23 18:48:34.528339776 +0200
@@ -97,35 +97,6 @@ class BottlesWindow(Adw.ApplicationWindo
             manager = Adw.StyleManager.get_default()
             manager.set_color_scheme(Adw.ColorScheme.FORCE_DARK)
 
-        # Be VERY explicit that non-sandboxed environments are unsupported
-        if not Xdp.Portal.running_under_sandbox():
-
-            def response(dialog, response, *args):
-                if response == "close":
-                    quit(1)
-
-            body = _(
-                "Bottles is only supported within a sandboxed environment. Official sources of Bottles are available at"
-            )
-            download_url = "usebottles.com/download"
-
-            error_dialog = Adw.AlertDialog.new(
-                _("Unsupported Environment"),
-                f"{body} <a href='https://{download_url}' title='https://{download_url}'>{download_url}.</a>",
-            )
-
-            error_dialog.add_response("close", _("Close"))
-            error_dialog.set_body_use_markup(True)
-            error_dialog.connect("response", response)
-            error_dialog.present(self)
-            logging.error(
-                _(
-                    "Bottles is only supported within a sandboxed format. Official sources of Bottles are available at:"
-                )
-            )
-            logging.error("https://usebottles.com/download/")
-            return
-
         # Loading view
         self.page_loading = LoadingView()
 
openSUSE Build Service is sponsored by