rename libflatpak_query fp_turbo

This commit is contained in:
GloriousEggroll 2025-04-04 11:09:21 -06:00
parent 19f2159a6b
commit 8a0912c20a
4 changed files with 152 additions and 152 deletions

144
README.md
View file

@ -53,8 +53,8 @@ Shop: `./main.py`
CLI:
```
./libflatpak_query.py -h
usage: libflatpak_query.py [-h] [--id ID] [--repo REPO] [--list-all] [--categories] [--subcategories] [--list-installed] [--check-updates] [--list-repos] [--add-repo REPO_FILE] [--remove-repo REPO_NAME] [--toggle-repo ENABLE/DISABLE]
./fp_turbo.py -h
usage: fp_turbo.py [-h] [--id ID] [--repo REPO] [--list-all] [--categories] [--subcategories] [--list-installed] [--check-updates] [--list-repos] [--add-repo REPO_FILE] [--remove-repo REPO_NAME] [--toggle-repo ENABLE/DISABLE]
[--install APP_ID] [--remove APP_ID] [--update APP_ID] [--system] [--refresh] [--refresh-local] [--add-file-perms PATH] [--remove-file-perms PATH] [--list-file-perms] [--list-other-perm-toggles PERM_NAME]
[--toggle-other-perms ENABLE/DISABLE] [--perm-type PERM_TYPE] [--perm-option PERM_OPTION] [--list-other-perm-values PERM_NAME] [--add-other-perm-values TYPE] [--remove-other-perm-values TYPE] [--perm-value VALUE]
[--override] [--global-add-file-perms PATH] [--global-remove-file-perms PATH] [--global-list-file-perms] [--global-list-other-perm-toggles PERM_NAME] [--global-toggle-other-perms ENABLE/DISABLE]
@ -135,75 +135,75 @@ options:
Common CLI combinations:
```
./libflatpak_query.py --id <app id>
./libflatpak_query.py --id <app id> --repo flatpak beta
./libflatpak_query.py --id <app id> --repo flatpak-beta --system
./libflatpak_query.py --list-all
./libflatpak_query.py --list-all --system
./libflatpak_query.py --categories
./libflatpak_query.py --categories --system
./libflatpak_query.py --subcategories
./libflatpak_query.py --subcategories --system
./libflatpak_query.py --list-installed
./libflatpak_query.py --list-installed --system
./libflatpak_query.py --check-updates
./libflatpak_query.py --check-updates --system
./libflatpak_query.py --list-repos
./libflatpak_query.py --list-repos --system
./libflatpak_query.py --add-repo <.flatpakrepo or url to .flatpakrepo file>
./libflatpak_query.py --add-repo <.flatpakrepo or url to .flatpakrepo file> --system
./libflatpak_query.py --remove-repo <repo name>
./libflatpak_query.py --remove-repo <repo name> --system
./libflatpak_query.py --toggle-repo <enable/disable> --repo <repo name>
./libflatpak_query.py --toggle-repo <enable/disable> --repo <repo name> --system
./libflatpak_query.py --install <app id>
./libflatpak_query.py --install <app id> --repo <repo name>
./libflatpak_query.py --install <app id> --repo <repo name> --system
./libflatpak_query.py --remove <app id>
./libflatpak_query.py --remove <app id> --system
./libflatpak_query.py --update <app id>
./libflatpak_query.py --update <app id> --system
./libflatpak_query.py --id <app id> --list-file-perms
./libflatpak_query.py --id <app id> --add-file-perms <host, host-os, host-etc, home, or "/path/to/directory" for custom paths>
./libflatpak_query.py --id <app id> --remove-file-perms <host, host-os, host-etc, home, or "/path/to/directory" for custom paths>
./libflatpak_query.py --id <app id> --list-other-perm-toggles <shared, sockets, devices, features, persistent>
./libflatpak_query.py --id <app id> --toggle-other-perms True --perm-type <shared, sockets, devices, features, persistent> --perm-option <network, ipc>
./libflatpak_query.py --id <app id> --toggle-other-perms False --perm-type <shared, sockets, devices, features, persistent> --perm-option <network, ipc>
./libflatpak_query.py --id <app id> --list-other-perm-values <environment, session_bus, system_bus>
./libflatpak_query.py --id <app id> --add-other-perm-values <environment, session_bus, system_bus> --perm-value <ENVVAR=value or xxx.yyy.zzz=talk or xxx.yyy.zzz=own>
./libflatpak_query.py --id <app id> --remove-other-perm-values <environment, session_bus, system_bus> --perm-value <ENVVAR=value or xxx.yyy.zzz=talk or xxx.yyy.zzz=own>
./libflatpak_query.py --override --global-list-file-perms
./libflatpak_query.py --override --global-add-file-perms <host, host-os, host-etc, home, or "/path/to/directory" for custom paths>
./libflatpak_query.py --override --global-remove-file-perms <host, host-os, host-etc, home, or "/path/to/directory" for custom paths>
./libflatpak_query.py --override --global-list-other-perm-toggles <shared, sockets, devices, features, persistent>
./libflatpak_query.py --override --global-toggle-other-perms True --perm-type <shared, sockets, devices, features, persistent> --perm-option <network, ipc>
./libflatpak_query.py --override --global-toggle-other-perms False --perm-type <shared, sockets, devices, features, persistent> --perm-option <network, ipc>
./libflatpak_query.py --override --global-list-other-perm-values <environment, session_bus, system_bus>
./libflatpak_query.py --override --global-add-other-perm-values <environment, session_bus, system_bus> --perm-value <ENVVAR=value or xxx.yyy.zzz=talk or xxx.yyy.zzz=own>
./libflatpak_query.py --override --global-remove-other-perm-values <environment, session_bus, system_bus> --perm-value <ENVVAR=value or xxx.yyy.zzz=talk or xxx.yyy.zzz=own>
./libflatpak_query.py --id <app id> --list-file-perms --system
./libflatpak_query.py --id <app id> --add-file-perms <host, host-os, host-etc, home, or "/path/to/directory" for custom paths> --system
./libflatpak_query.py --id <app id> --remove-file-perms <host, host-os, host-etc, home, or "/path/to/directory" for custom paths> --system
./libflatpak_query.py --id <app id> --add-file-perms "/path/to/directory" --perm-type persistent
./libflatpak_query.py --id <app id> --remove-file-perms "/path/to/directory" --perm-type persistent
./libflatpak_query.py --id <app id> --list-other-perm-toggles <shared, sockets, devices, features, persistent> --system
./libflatpak_query.py --id <app id> --toggle-other-perms True --perm-type <shared, sockets, devices, features, persistent> --perm-option <network, ipc> --system
./libflatpak_query.py --id <app id> --toggle-other-perms False --perm-type <shared, sockets, devices, features, persistent> --perm-option <network, ipc> --system
./libflatpak_query.py --id <app id> --list-other-perm-values <environment, session_bus, system_bus> --system
./libflatpak_query.py --id <app id> --add-other-perm-values <environment, session_bus, system_bus> --perm-value <ENVVAR=value or xxx.yyy.zzz=talk or xxx.yyy.zzz=own> --system
./libflatpak_query.py --id <app id> --remove-other-perm-values <environment, session_bus, system_bus> --perm-value <ENVVAR=value or xxx.yyy.zzz=talk or xxx.yyy.zzz=own> --system
./libflatpak_query.py --override --global-list-file-perms --system
./libflatpak_query.py --override --global-add-file-perms <host, host-os, host-etc, home, or "/path/to/directory" for custom paths> --system
./libflatpak_query.py --override --global-remove-file-perms <host, host-os, host-etc, home, or "/path/to/directory" for custom paths> --system
./libflatpak_query.py --override --global-list-other-perm-toggles <shared, sockets, devices, features, persistent> --system
./libflatpak_query.py --override --global-toggle-other-perms True --perm-type <shared, sockets, devices, features, persistent> --perm-option <network, ipc> --system
./libflatpak_query.py --override --global-toggle-other-perms False --perm-type <shared, sockets, devices, features, persistent> --perm-option <network, ipc> --system
./libflatpak_query.py --override --global-list-other-perm-values <environment, session_bus, system_bus> --system
./libflatpak_query.py --override --global-add-other-perm-values <environment, session_bus, system_bus> --perm-value <ENVVAR=value or xxx.yyy.zzz=talk or xxx.yyy.zzz=own> --system
./libflatpak_query.py --override --global-remove-other-perm-values <environment, session_bus, system_bus> --perm-value <ENVVAR=value or xxx.yyy.zzz=talk or xxx.yyy.zzz=own> --system
./fp_turbo.py --id <app id>
./fp_turbo.py --id <app id> --repo flatpak beta
./fp_turbo.py --id <app id> --repo flatpak-beta --system
./fp_turbo.py --list-all
./fp_turbo.py --list-all --system
./fp_turbo.py --categories
./fp_turbo.py --categories --system
./fp_turbo.py --subcategories
./fp_turbo.py --subcategories --system
./fp_turbo.py --list-installed
./fp_turbo.py --list-installed --system
./fp_turbo.py --check-updates
./fp_turbo.py --check-updates --system
./fp_turbo.py --list-repos
./fp_turbo.py --list-repos --system
./fp_turbo.py --add-repo <.flatpakrepo or url to .flatpakrepo file>
./fp_turbo.py --add-repo <.flatpakrepo or url to .flatpakrepo file> --system
./fp_turbo.py --remove-repo <repo name>
./fp_turbo.py --remove-repo <repo name> --system
./fp_turbo.py --toggle-repo <enable/disable> --repo <repo name>
./fp_turbo.py --toggle-repo <enable/disable> --repo <repo name> --system
./fp_turbo.py --install <app id>
./fp_turbo.py --install <app id> --repo <repo name>
./fp_turbo.py --install <app id> --repo <repo name> --system
./fp_turbo.py --remove <app id>
./fp_turbo.py --remove <app id> --system
./fp_turbo.py --update <app id>
./fp_turbo.py --update <app id> --system
./fp_turbo.py --id <app id> --list-file-perms
./fp_turbo.py --id <app id> --add-file-perms <host, host-os, host-etc, home, or "/path/to/directory" for custom paths>
./fp_turbo.py --id <app id> --remove-file-perms <host, host-os, host-etc, home, or "/path/to/directory" for custom paths>
./fp_turbo.py --id <app id> --list-other-perm-toggles <shared, sockets, devices, features, persistent>
./fp_turbo.py --id <app id> --toggle-other-perms True --perm-type <shared, sockets, devices, features, persistent> --perm-option <network, ipc>
./fp_turbo.py --id <app id> --toggle-other-perms False --perm-type <shared, sockets, devices, features, persistent> --perm-option <network, ipc>
./fp_turbo.py --id <app id> --list-other-perm-values <environment, session_bus, system_bus>
./fp_turbo.py --id <app id> --add-other-perm-values <environment, session_bus, system_bus> --perm-value <ENVVAR=value or xxx.yyy.zzz=talk or xxx.yyy.zzz=own>
./fp_turbo.py --id <app id> --remove-other-perm-values <environment, session_bus, system_bus> --perm-value <ENVVAR=value or xxx.yyy.zzz=talk or xxx.yyy.zzz=own>
./fp_turbo.py --override --global-list-file-perms
./fp_turbo.py --override --global-add-file-perms <host, host-os, host-etc, home, or "/path/to/directory" for custom paths>
./fp_turbo.py --override --global-remove-file-perms <host, host-os, host-etc, home, or "/path/to/directory" for custom paths>
./fp_turbo.py --override --global-list-other-perm-toggles <shared, sockets, devices, features, persistent>
./fp_turbo.py --override --global-toggle-other-perms True --perm-type <shared, sockets, devices, features, persistent> --perm-option <network, ipc>
./fp_turbo.py --override --global-toggle-other-perms False --perm-type <shared, sockets, devices, features, persistent> --perm-option <network, ipc>
./fp_turbo.py --override --global-list-other-perm-values <environment, session_bus, system_bus>
./fp_turbo.py --override --global-add-other-perm-values <environment, session_bus, system_bus> --perm-value <ENVVAR=value or xxx.yyy.zzz=talk or xxx.yyy.zzz=own>
./fp_turbo.py --override --global-remove-other-perm-values <environment, session_bus, system_bus> --perm-value <ENVVAR=value or xxx.yyy.zzz=talk or xxx.yyy.zzz=own>
./fp_turbo.py --id <app id> --list-file-perms --system
./fp_turbo.py --id <app id> --add-file-perms <host, host-os, host-etc, home, or "/path/to/directory" for custom paths> --system
./fp_turbo.py --id <app id> --remove-file-perms <host, host-os, host-etc, home, or "/path/to/directory" for custom paths> --system
./fp_turbo.py --id <app id> --add-file-perms "/path/to/directory" --perm-type persistent
./fp_turbo.py --id <app id> --remove-file-perms "/path/to/directory" --perm-type persistent
./fp_turbo.py --id <app id> --list-other-perm-toggles <shared, sockets, devices, features, persistent> --system
./fp_turbo.py --id <app id> --toggle-other-perms True --perm-type <shared, sockets, devices, features, persistent> --perm-option <network, ipc> --system
./fp_turbo.py --id <app id> --toggle-other-perms False --perm-type <shared, sockets, devices, features, persistent> --perm-option <network, ipc> --system
./fp_turbo.py --id <app id> --list-other-perm-values <environment, session_bus, system_bus> --system
./fp_turbo.py --id <app id> --add-other-perm-values <environment, session_bus, system_bus> --perm-value <ENVVAR=value or xxx.yyy.zzz=talk or xxx.yyy.zzz=own> --system
./fp_turbo.py --id <app id> --remove-other-perm-values <environment, session_bus, system_bus> --perm-value <ENVVAR=value or xxx.yyy.zzz=talk or xxx.yyy.zzz=own> --system
./fp_turbo.py --override --global-list-file-perms --system
./fp_turbo.py --override --global-add-file-perms <host, host-os, host-etc, home, or "/path/to/directory" for custom paths> --system
./fp_turbo.py --override --global-remove-file-perms <host, host-os, host-etc, home, or "/path/to/directory" for custom paths> --system
./fp_turbo.py --override --global-list-other-perm-toggles <shared, sockets, devices, features, persistent> --system
./fp_turbo.py --override --global-toggle-other-perms True --perm-type <shared, sockets, devices, features, persistent> --perm-option <network, ipc> --system
./fp_turbo.py --override --global-toggle-other-perms False --perm-type <shared, sockets, devices, features, persistent> --perm-option <network, ipc> --system
./fp_turbo.py --override --global-list-other-perm-values <environment, session_bus, system_bus> --system
./fp_turbo.py --override --global-add-other-perm-values <environment, session_bus, system_bus> --perm-value <ENVVAR=value or xxx.yyy.zzz=talk or xxx.yyy.zzz=own> --system
./fp_turbo.py --override --global-remove-other-perm-values <environment, session_bus, system_bus> --perm-value <ENVVAR=value or xxx.yyy.zzz=talk or xxx.yyy.zzz=own> --system
./libflatpak_query.py --get-all-portal-permissions
./libflatpak_query.py --get-portal-permissions <portal>
./libflatpak_query.py --get-app-portal-permissions --id <app id>
./libflatpak_query.py --set-app-portal-permissions <portal> --portal-perm-value <yes/no> --id <app id>
./fp_turbo.py --get-all-portal-permissions
./fp_turbo.py --get-portal-permissions <portal>
./fp_turbo.py --get-app-portal-permissions --id <app id>
./fp_turbo.py --set-app-portal-permissions <portal> --portal-perm-value <yes/no> --id <app id>
```

94
main.py
View file

@ -7,8 +7,8 @@ gi.require_version("GLib", "2.0")
gi.require_version("Flatpak", "1.0")
gi.require_version('GdkPixbuf', '2.0')
from gi.repository import Gtk, Gio, Gdk, GLib, GdkPixbuf
import libflatpak_query
from libflatpak_query import AppStreamComponentKind as AppKind
import fp_turbo
from fp_turbo import AppStreamComponentKind as AppKind
import json
import threading
import subprocess
@ -494,8 +494,8 @@ class MainWindow(Gtk.Window):
def populate_repo_dropdown(self):
# Get list of repositories
libflatpak_query.repolist(self.system_mode)
repos = libflatpak_query.repolist()
fp_turbo.repolist(self.system_mode)
repos = fp_turbo.repolist()
# Clear existing items
self.repo_dropdown.remove_all()
@ -532,7 +532,7 @@ class MainWindow(Gtk.Window):
# Show the dialog
dialog.show_all()
searcher = libflatpak_query.get_reposearcher(self.system_mode)
searcher = fp_turbo.get_reposearcher(self.system_mode)
# Define thread target function
def retrieve_metadata():
@ -576,7 +576,7 @@ class MainWindow(Gtk.Window):
def refresh_local(self):
try:
searcher = libflatpak_query.get_reposearcher(self.system_mode)
searcher = fp_turbo.get_reposearcher(self.system_mode)
installed_results, updates_results = searcher.refresh_local(self.system_mode)
self.installed_results = installed_results
self.updates_results = updates_results
@ -1159,7 +1159,7 @@ class MainWindow(Gtk.Window):
self.right_container.pack_start(header_bar, False, False, 0)
# Get list of repositories
repos = libflatpak_query.repolist(self.system_mode)
repos = fp_turbo.repolist(self.system_mode)
# Create a scrolled window for repositories
scrolled_window = Gtk.ScrolledWindow()
@ -1546,7 +1546,7 @@ class MainWindow(Gtk.Window):
content_area.pack_start(Gtk.Label(label=label), False, False, 0)
# Search for available repositories containing this app
searcher = libflatpak_query.get_reposearcher(self.system_mode)
searcher = fp_turbo.get_reposearcher(self.system_mode)
if self.system_mode is False:
content_area.pack_start(Gtk.Label(label="Installation Type: User"), False, False, 0)
else:
@ -1555,7 +1555,7 @@ class MainWindow(Gtk.Window):
# Populate repository dropdown
if button and app:
available_repos = set()
repos = libflatpak_query.repolist(self.system_mode)
repos = fp_turbo.repolist(self.system_mode)
for repo in repos:
if not repo.get_disabled():
search_results = searcher.search_flatpak(id, repo.get_name())
@ -1601,9 +1601,9 @@ class MainWindow(Gtk.Window):
# Show waiting dialog
GLib.idle_add(self.show_waiting_dialog)
if button and app:
success, message = libflatpak_query.install_flatpak(app, selected_repo, self.system_mode)
success, message = fp_turbo.install_flatpak(app, selected_repo, self.system_mode)
else:
success, message = libflatpak_query.install_flatpakref(app, self.system_mode)
success, message = fp_turbo.install_flatpakref(app, self.system_mode)
GLib.idle_add(lambda: self.on_task_complete(dialog, success, message))
# Start spinner and begin installation
thread = threading.Thread(target=perform_installation)
@ -1666,7 +1666,7 @@ class MainWindow(Gtk.Window):
# Show waiting dialog
GLib.idle_add(self.show_waiting_dialog, "Removing package...")
success, message = libflatpak_query.remove_flatpak(app, None, self.system_mode)
success, message = fp_turbo.remove_flatpak(app, None, self.system_mode)
# Update UI on main thread
GLib.idle_add(lambda: self.on_task_complete(dialog, success, message))
@ -1694,7 +1694,7 @@ class MainWindow(Gtk.Window):
listbox.add(row_header)
# Get permissions
success, perms = libflatpak_query.list_other_perm_values(app_id, perm_type, self.system_mode)
success, perms = fp_turbo.list_other_perm_values(app_id, perm_type, self.system_mode)
if not success:
perms = {"paths": []}
@ -1793,9 +1793,9 @@ class MainWindow(Gtk.Window):
# Get permissions
if perm_type == "persistent":
success, perms = libflatpak_query.list_other_perm_toggles(app_id, perm_type, self.system_mode)
success, perms = fp_turbo.list_other_perm_toggles(app_id, perm_type, self.system_mode)
else:
success, perms = libflatpak_query.list_other_perm_values(app_id, perm_type, self.system_mode)
success, perms = fp_turbo.list_other_perm_values(app_id, perm_type, self.system_mode)
if not success:
perms = {"paths": []}
@ -1844,7 +1844,7 @@ class MainWindow(Gtk.Window):
listbox.add(row_header)
# Get filesystem permissions
success, perms = libflatpak_query.list_file_perms(app_id, self.system_mode)
success, perms = fp_turbo.list_file_perms(app_id, self.system_mode)
if not success:
perms = {"paths": [], "special_paths": []}
@ -2017,15 +2017,15 @@ class MainWindow(Gtk.Window):
# Handle portal permissions specially
if section_title == "Portals":
success, perms = libflatpak_query.portal_get_app_permissions(app_id)
success, perms = fp_turbo.portal_get_app_permissions(app_id)
if not success:
perms = {}
elif section_title in ["Persistent", "Environment", "System Bus", "Session Bus"]:
success, perms = libflatpak_query.list_other_perm_toggles(app_id, perm_type, self.system_mode)
success, perms = fp_turbo.list_other_perm_toggles(app_id, perm_type, self.system_mode)
if not success:
perms = {"paths": []}
else:
success, perms = libflatpak_query.list_other_perm_toggles(app_id, perm_type, self.system_mode)
success, perms = fp_turbo.list_other_perm_toggles(app_id, perm_type, self.system_mode)
if not success:
perms = {"paths": []}
@ -2066,13 +2066,13 @@ class MainWindow(Gtk.Window):
def _on_switch_toggled(self, switch, state, app_id, perm_type, option):
"""Handle switch toggle events"""
if perm_type is None: # Portal section
success, message = libflatpak_query.portal_set_app_permissions(
success, message = fp_turbo.portal_set_app_permissions(
option.lower(),
app_id,
"yes" if state else "no"
)
else:
success, message = libflatpak_query.toggle_other_perms(
success, message = fp_turbo.toggle_other_perms(
app_id,
perm_type,
option.lower(),
@ -2088,21 +2088,21 @@ class MainWindow(Gtk.Window):
"""Handle remove path button click"""
if perm_type:
if perm_type == "persistent":
success, message = libflatpak_query.remove_file_permissions(
success, message = fp_turbo.remove_file_permissions(
app_id,
path,
"persistent",
self.system_mode
)
else:
success, message = libflatpak_query.remove_permission_value(
success, message = fp_turbo.remove_permission_value(
app_id,
perm_type,
path,
self.system_mode
)
else:
success, message = libflatpak_query.remove_file_permissions(
success, message = fp_turbo.remove_file_permissions(
app_id,
path,
"filesystems",
@ -2136,21 +2136,21 @@ class MainWindow(Gtk.Window):
path = entry.get_text()
if perm_type:
if perm_type == "persistent":
success, message = libflatpak_query.add_file_permissions(
success, message = fp_turbo.add_file_permissions(
app_id,
path,
"persistent",
self.system_mode
)
else:
success, message = libflatpak_query.add_permission_value(
success, message = fp_turbo.add_permission_value(
app_id,
perm_type,
path,
self.system_mode
)
else:
success, message = libflatpak_query.add_file_permissions(
success, message = fp_turbo.add_file_permissions(
app_id,
path,
"filesystems",
@ -2213,7 +2213,7 @@ class MainWindow(Gtk.Window):
listbox.add(row_header)
# Get permissions
success, perms = libflatpak_query.global_list_other_perm_values(perm_type, True, self.system_mode)
success, perms = fp_turbo.global_list_other_perm_values(perm_type, True, self.system_mode)
if not success:
perms = {"paths": []}
@ -2312,9 +2312,9 @@ class MainWindow(Gtk.Window):
# Get permissions
if perm_type == "persistent":
success, perms = libflatpak_query.global_list_other_perm_toggles(perm_type, True, self.system_mode)
success, perms = fp_turbo.global_list_other_perm_toggles(perm_type, True, self.system_mode)
else:
success, perms = libflatpak_query.global_list_other_perm_values(perm_type, True, self.system_mode)
success, perms = fp_turbo.global_list_other_perm_values(perm_type, True, self.system_mode)
if not success:
perms = {"paths": []}
@ -2363,7 +2363,7 @@ class MainWindow(Gtk.Window):
listbox.add(row_header)
# Get filesystem permissions
success, perms = libflatpak_query.global_list_file_perms(True, self.system_mode)
success, perms = fp_turbo.global_list_file_perms(True, self.system_mode)
if not success:
perms = {"paths": [], "special_paths": []}
@ -2525,11 +2525,11 @@ class MainWindow(Gtk.Window):
listbox.add(row_header)
if section_title in ["Persistent", "Environment", "System Bus", "Session Bus"]:
success, perms = libflatpak_query.global_list_other_perm_toggles(perm_type, True, self.system_mode)
success, perms = fp_turbo.global_list_other_perm_toggles(perm_type, True, self.system_mode)
if not success:
perms = {"paths": []}
else:
success, perms = libflatpak_query.global_list_other_perm_toggles(perm_type, True, self.system_mode)
success, perms = fp_turbo.global_list_other_perm_toggles(perm_type, True, self.system_mode)
if not success:
perms = {"paths": []}
@ -2569,7 +2569,7 @@ class MainWindow(Gtk.Window):
def _global_on_switch_toggled(self, switch, state, perm_type, option):
"""Handle switch toggle events"""
success, message = libflatpak_query.global_toggle_other_perms(
success, message = fp_turbo.global_toggle_other_perms(
perm_type,
option.lower(),
state,
@ -2585,21 +2585,21 @@ class MainWindow(Gtk.Window):
"""Handle remove path button click"""
if perm_type:
if perm_type == "persistent":
success, message = libflatpak_query.global_remove_file_permissions(
success, message = fp_turbo.global_remove_file_permissions(
path,
"persistent",
True,
self.system_mode
)
else:
success, message = libflatpak_query.global_remove_permission_value(
success, message = fp_turbo.global_remove_permission_value(
perm_type,
path,
True,
self.system_mode
)
else:
success, message = libflatpak_query.global_remove_file_permissions(
success, message = fp_turbo.global_remove_file_permissions(
path,
"filesystems",
True,
@ -2633,21 +2633,21 @@ class MainWindow(Gtk.Window):
path = entry.get_text()
if perm_type:
if perm_type == "persistent":
success, message = libflatpak_query.global_add_file_permissions(
success, message = fp_turbo.global_add_file_permissions(
path,
"persistent",
True,
self.system_mode
)
else:
success, message = libflatpak_query.global_add_permission_value(
success, message = fp_turbo.global_add_permission_value(
perm_type,
path,
True,
self.system_mode
)
else:
success, message = libflatpak_query.global_add_file_permissions(
success, message = fp_turbo.global_add_file_permissions(
path,
"filesystems",
True,
@ -2728,7 +2728,7 @@ class MainWindow(Gtk.Window):
# Show waiting dialog
GLib.idle_add(self.show_waiting_dialog, "Updating package...")
success, message = libflatpak_query.update_flatpak(app, None, self.system_mode)
success, message = fp_turbo.update_flatpak(app, None, self.system_mode)
# Update UI on main thread
GLib.idle_add(lambda: self.on_task_complete(dialog, success, message))
@ -2764,7 +2764,7 @@ class MainWindow(Gtk.Window):
checkbox.get_parent().set_sensitive(True)
if checkbox.get_active():
checkbox.get_style_context().remove_class("dim-label")
success, message = libflatpak_query.repotoggle(repo.get_name(), True, self.system_mode)
success, message = fp_turbo.repotoggle(repo.get_name(), True, self.system_mode)
message_type = Gtk.MessageType.INFO
if success:
self.refresh_local()
@ -2784,7 +2784,7 @@ class MainWindow(Gtk.Window):
dialog.destroy()
else:
checkbox.get_style_context().add_class("dim-label")
success, message = libflatpak_query.repotoggle(repo.get_name(), False, self.system_mode)
success, message = fp_turbo.repotoggle(repo.get_name(), False, self.system_mode)
message_type = Gtk.MessageType.INFO
if success:
self.refresh_local()
@ -2819,7 +2819,7 @@ class MainWindow(Gtk.Window):
if response == Gtk.ResponseType.YES:
try:
libflatpak_query.repodelete(repo.get_name(), self.system_mode)
fp_turbo.repodelete(repo.get_name(), self.system_mode)
self.refresh_local()
self.show_category_apps('repositories')
except GLib.GError as e:
@ -2852,7 +2852,7 @@ class MainWindow(Gtk.Window):
def on_add_flathub_repo_button_clicked(self, button):
"""Handle the Add Flathub Repository button click"""
# Add the repository
success, error_message = libflatpak_query.repoadd("https://dl.flathub.org/repo/flathub.flatpakrepo", self.system_mode)
success, error_message = fp_turbo.repoadd("https://dl.flathub.org/repo/flathub.flatpakrepo", self.system_mode)
if error_message:
error_dialog = Gtk.MessageDialog(
transient_for=None, # Changed from self
@ -2870,7 +2870,7 @@ class MainWindow(Gtk.Window):
def on_add_flathub_beta_repo_button_clicked(self, button):
"""Handle the Add Flathub Beta Repository button click"""
# Add the repository
success, error_message = libflatpak_query.repoadd("https://dl.flathub.org/beta-repo/flathub-beta.flatpakrepo", self.system_mode)
success, error_message = fp_turbo.repoadd("https://dl.flathub.org/beta-repo/flathub-beta.flatpakrepo", self.system_mode)
if error_message:
error_dialog = Gtk.MessageDialog(
transient_for=None, # Changed from self
@ -2953,7 +2953,7 @@ class MainWindow(Gtk.Window):
if response == Gtk.ResponseType.OK and repo_file_path:
# Add the repository
success, error_message = libflatpak_query.repoadd(repo_file_path, self.system_mode)
success, error_message = fp_turbo.repoadd(repo_file_path, self.system_mode)
if error_message:
error_dialog = Gtk.MessageDialog(
transient_for=None, # Changed from self

View file

@ -2227,7 +2227,7 @@
}
],
"query": "",
"processingTimeMs": 7,
"processingTimeMs": 10,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -10295,7 +10295,7 @@
}
],
"query": "",
"processingTimeMs": 15,
"processingTimeMs": 17,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -11560,7 +11560,7 @@
}
],
"query": "",
"processingTimeMs": 5,
"processingTimeMs": 6,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -14472,7 +14472,7 @@
}
],
"query": "",
"processingTimeMs": 3,
"processingTimeMs": 2,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -17060,7 +17060,7 @@
}
],
"query": "",
"processingTimeMs": 10,
"processingTimeMs": 11,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -17761,7 +17761,7 @@
}
],
"query": "",
"processingTimeMs": 4,
"processingTimeMs": 3,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -22043,7 +22043,7 @@
}
],
"query": "",
"processingTimeMs": 13,
"processingTimeMs": 12,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -29483,7 +29483,7 @@
}
],
"query": "",
"processingTimeMs": 3,
"processingTimeMs": 2,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -32767,7 +32767,7 @@
}
],
"query": "",
"processingTimeMs": 10,
"processingTimeMs": 8,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -33768,7 +33768,7 @@
}
],
"query": "",
"processingTimeMs": 3,
"processingTimeMs": 4,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -42183,7 +42183,7 @@
}
],
"query": "",
"processingTimeMs": 12,
"processingTimeMs": 13,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -46062,7 +46062,7 @@
}
],
"query": "",
"processingTimeMs": 3,
"processingTimeMs": 4,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -49945,7 +49945,7 @@
}
],
"query": "",
"processingTimeMs": 13,
"processingTimeMs": 12,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -53151,7 +53151,7 @@
}
],
"query": "",
"processingTimeMs": 9,
"processingTimeMs": 10,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -58832,7 +58832,7 @@
}
],
"query": "",
"processingTimeMs": 8,
"processingTimeMs": 7,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -63656,7 +63656,7 @@
"verification_website": null,
"verification_timestamp": "1688996679",
"runtime": "org.freedesktop.Platform/x86_64/23.08",
"updated_at": 1743517723,
"updated_at": 1743783025,
"arches": [
"x86_64",
"aarch64"
@ -65841,7 +65841,7 @@
"verification_website": null,
"verification_timestamp": "1688996679",
"runtime": "org.freedesktop.Platform/x86_64/23.08",
"updated_at": 1743517723,
"updated_at": 1743783025,
"arches": [
"x86_64",
"aarch64"
@ -66403,7 +66403,7 @@
"verification_website": null,
"verification_timestamp": "1688996679",
"runtime": "org.freedesktop.Platform/x86_64/23.08",
"updated_at": 1743517723,
"updated_at": 1743783025,
"arches": [
"x86_64",
"aarch64"
@ -69505,7 +69505,7 @@
}
],
"query": "",
"processingTimeMs": 6,
"processingTimeMs": 7,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -69733,7 +69733,7 @@
}
],
"query": "",
"processingTimeMs": 2,
"processingTimeMs": 3,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -69861,7 +69861,7 @@
"verification_website": null,
"verification_timestamp": "1688996679",
"runtime": "org.freedesktop.Platform/x86_64/23.08",
"updated_at": 1743517723,
"updated_at": 1743783025,
"arches": [
"x86_64",
"aarch64"
@ -73210,7 +73210,7 @@
"verification_website": null,
"verification_timestamp": "1688996679",
"runtime": "org.freedesktop.Platform/x86_64/23.08",
"updated_at": 1743517723,
"updated_at": 1743783025,
"arches": [
"x86_64",
"aarch64"
@ -73930,7 +73930,7 @@
}
],
"query": "",
"processingTimeMs": 3,
"processingTimeMs": 4,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -74208,7 +74208,7 @@
"verification_website": null,
"verification_timestamp": "1688996679",
"runtime": "org.freedesktop.Platform/x86_64/23.08",
"updated_at": 1743517723,
"updated_at": 1743783025,
"arches": [
"x86_64",
"aarch64"
@ -75016,7 +75016,7 @@
}
],
"query": "",
"processingTimeMs": 3,
"processingTimeMs": 4,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -76622,7 +76622,7 @@
}
],
"query": "",
"processingTimeMs": 6,
"processingTimeMs": 7,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -77438,7 +77438,7 @@
}
],
"query": "",
"processingTimeMs": 4,
"processingTimeMs": 7,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -82050,7 +82050,7 @@
}
],
"query": "",
"processingTimeMs": 3,
"processingTimeMs": 4,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -82634,7 +82634,7 @@
}
],
"query": "",
"processingTimeMs": 2,
"processingTimeMs": 3,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -84809,7 +84809,7 @@
}
],
"query": "",
"processingTimeMs": 2,
"processingTimeMs": 3,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -89321,7 +89321,7 @@
}
],
"query": "",
"processingTimeMs": 2,
"processingTimeMs": 3,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -95379,7 +95379,7 @@
}
],
"query": "",
"processingTimeMs": 4,
"processingTimeMs": 3,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,
@ -98992,7 +98992,7 @@
}
],
"query": "",
"processingTimeMs": 7,
"processingTimeMs": 8,
"hitsPerPage": 250,
"page": 1,
"totalPages": 1,