Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions pkgs/by-name/bo/bottles-unwrapped/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,32 @@
lsb-release,
pciutils,
procps,
gamemode,
gamescope,
mangohud,
vkbasalt-cli,
vmtouch,
libportal,
nix-update-script,
removeWarningPopup ? false, # Final reminder to report any issues on nixpkgs' bugtracker
removeWarningPopup ? false,
}:

python3Packages.buildPythonApplication rec {
pname = "bottles-unwrapped";
version = "51.17";
version = "51.21";

src = fetchFromGitHub {
owner = "bottlesdevs";
repo = "bottles";
tag = version;
hash = "sha256-m4ATWpAZxIBp1X0cNeyNGmt6aIBo/cHH+DpOMkLia0E=";
hash = "sha256-rUS2LRr7NqTvNd706AC/U/QUDcF8tzwkHDuS3R0O1KY=";
};

patches =
[
./vulkan_icd.patch
./redirect-bugtracker.patch
./remove-flatpak-check.patch
./remove-core-tab.patch
]
++ (
if removeWarningPopup then
Expand Down Expand Up @@ -104,6 +104,7 @@ python3Packages.buildPythonApplication rec {
imagemagick
vkbasalt-cli

gamemode
gamescope
mangohud
vmtouch
Expand Down Expand Up @@ -132,6 +133,7 @@ python3Packages.buildPythonApplication rec {
psydvl
shamilton
Gliczy
XBagon
];
platforms = lib.platforms.linux;
mainProgram = "bottles";
Expand Down
76 changes: 0 additions & 76 deletions pkgs/by-name/bo/bottles-unwrapped/remove-core-tab.patch

This file was deleted.

77 changes: 77 additions & 0 deletions pkgs/by-name/bo/bottles-unwrapped/remove-flatpak-check.patch
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,80 @@ index 6ff7c011..c26ea0b9 100644
bottles_sources = [
'__init__.py',
'main.py',
diff --git a/bottles/frontend/views/bottle_details.py b/bottles/frontend/views/bottle_details.py
index 65667ea9..7ae1eb19 100644
--- a/bottles/frontend/views/bottle_details.py
+++ b/bottles/frontend/views/bottle_details.py
@@ -436,20 +436,19 @@ class BottleView(Adw.PreferencesPage):
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()
+ 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()

def __backup(self, widget, backup_type):
"""
diff --git a/bottles/frontend/views/bottle_preferences.py b/bottles/frontend/views/bottle_preferences.py
index 288e693b..b8b57618 100644
--- a/bottles/frontend/views/bottle_preferences.py
+++ b/bottles/frontend/views/bottle_preferences.py
@@ -139,7 +139,7 @@ class PreferencesView(Adw.PreferencesPage):
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 --git a/bottles/frontend/views/list.py b/bottles/frontend/views/list.py
index 43ab9c22..a283b178 100644
--- a/bottles/frontend/views/list.py
+++ b/bottles/frontend/views/list.py
@@ -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 --git a/bottles/frontend/views/new_bottle_dialog.py b/bottles/frontend/views/new_bottle_dialog.py
index a8b007d4..c6f0a156 100644
--- a/bottles/frontend/views/new_bottle_dialog.py
+++ b/bottles/frontend/views/new_bottle_dialog.py
@@ -80,7 +80,7 @@ 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():
+ if not self.window:
return

self.app = self.window.get_application()
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
diff --git a/bottles/frontend/windows/main_window.py b/bottles/frontend/windows/main_window.py
index 79bf0d72..e37ca43e 100644
--- a/bottles/frontend/windows/main_window.py
index 79bf0d72..e37ca43e 100644
--- a/bottles/frontend/windows/main_window.py
+++ b/bottles/frontend/windows/main_window.py
@@ -104,29 +104,15 @@ class MainWindow(Adw.ApplicationWindow):
diff --git a/bottles/frontend/windows/window.py b/bottles/frontend/windows/window.py
index 802b08b5..c4cada1d 100644
--- a/bottles/frontend/windows/window.py
+++ b/bottles/frontend/windows/window.py
@@ -102,29 +102,15 @@ class BottlesWindow(Adw.ApplicationWindow):

def response(dialog, response, *args):
if response == "close":
Expand Down
16 changes: 8 additions & 8 deletions pkgs/by-name/bo/bottles-unwrapped/warn-unsupported.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/bottles/frontend/windows/main_window.py b/bottles/frontend/windows/main_window.py
index 79bf0d72..e3a15cb5 100644
--- a/bottles/frontend/windows/main_window.py
+++ b/bottles/frontend/windows/main_window.py
@@ -104,29 +104,29 @@ class MainWindow(Adw.ApplicationWindow):
diff --git a/bottles/frontend/windows/window.py b/bottles/frontend/windows/window.py
index 802b08b5..e3de0536 100644
--- a/bottles/frontend/windows/window.py
+++ b/bottles/frontend/windows/window.py
@@ -102,29 +102,30 @@ class BottlesWindow(Adw.ApplicationWindow):

def response(dialog, response, *args):
if response == "close":
Expand All @@ -15,15 +15,15 @@ index 79bf0d72..e3a15cb5 100644
)
- download_url = "usebottles.com/download"
+ bugtracker_url = "github.com/NixOS/nixpkgs/issues"
+

error_dialog = Adw.AlertDialog.new(
_("Unsupported Environment"),
- f"{body} <a href='https://{download_url}' title='https://{download_url}'>{download_url}.</a>",
+ f"{body} <a href='https://{bugtracker_url}' title='https://{bugtracker_url}'>{bugtracker_url}.</a>",
+ f"{body} <a href='https://{bugtracker_url}' title='https://{bugtracker_url}'>{bugtracker_url}.</a> \nThis warning can be disabled by overriding the package: `(pkgs.bottles.override {{ removeWarningPopup = true; }})`",
)

- error_dialog.add_response("close", _("Close"))
+ error_dialog.add_response("close", _("Understood"))
error_dialog.add_response("close", _("Close"))
error_dialog.set_body_use_markup(True)
error_dialog.connect("response", response)
error_dialog.present(self)
Expand Down