Skip to content
Open
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
4 changes: 2 additions & 2 deletions data/io.github.flattool.Warehouse.desktop.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Desktop Entry]
# Translators: Do not translate the application name
Name=Warehouse
Exec=warehouse %F
Exec=warehouse %U
Icon=io.github.flattool.Warehouse
Terminal=false
Type=Application
Expand All @@ -10,4 +10,4 @@ StartupNotify=true
Keywords=flatpak;packages;apps;remotes;snapshots;
Comment=Manage all things Flatpak
X-Purism-FormFactor=Workstation;Mobile;
MimeType=application/vnd.flatpak.ref;application/vnd.flatpak;x-scheme-handler/flatpak;application/vnd.flatpak.repo
MimeType=application/vnd.flatpak.ref;application/vnd.flatpak;x-scheme-handler/flatpak;x-scheme-handler/flatpak+https;x-scheme-handler/flatpak+http;application/vnd.flatpak.repo
3 changes: 2 additions & 1 deletion src/install_page/select_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ def local_install_apply_callback(self, installation, file_names):
requests = []
for file in file_names:
# sadly flatpak doesn't support multiple local installs in one command :(
file_ref = file.get_path() or file.get_uri()
requests.append(
{
"remote": "local_file",
"installation": installation,
"package_names": [file.get_path()],
"package_names": [file_ref],
"extra_flags": [],
}
)
Expand Down
11 changes: 8 additions & 3 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,15 @@ def do_command_line(self, command_line):

if len(args) > 1: # First arg is program name
files = []
for path in args[1:]:
gfile = Gio.File.new_for_path(path)
if gfile.query_exists():
for arg in args[1:]:
if arg.startswith("flatpak+https://") or arg.startswith("flatpak+http://"):
url = arg[len("flatpak+"):]
gfile = Gio.File.new_for_uri(url)
files.append(gfile)
else:
gfile = Gio.File.new_for_path(arg)
if gfile.query_exists():
files.append(gfile)

if files:
self.open(files, "")
Expand Down
4 changes: 2 additions & 2 deletions src/main_window/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ def on_file_drop(self, drop_target, value, x, y):
paks = []
remotes = []
for file in value:
path = file.get_path()
path = file.get_path() or file.get_uri()
if path.endswith(".flatpak") or path.endswith(".flatpakref"):
paks.append(Gio.File.new_for_path(path))
paks.append(file)
elif path.endswith(".flatpakrepo"):
remotes.append(path)
else:
Expand Down