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
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Build-Depends:
debhelper (>= 9),
dh-python,
python3-all,
python3-gbulb,
python3-gi (>= 3.50.0) | python3-gbulb,
python3-setuptools,
python3-systemd,
Standards-Version: 3.9.5
Expand Down
12 changes: 9 additions & 3 deletions qui/clipboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,15 @@
gi.require_version("Gtk", "3.0") # isort:skip
from gi.repository import Gtk, Gio, Gdk # isort:skip

import gbulb
try:
from gi.events import GLibEventLoopPolicy

asyncio.set_event_loop_policy(GLibEventLoopPolicy())
except ImportError:
import gbulb

gbulb.install()

import pyinotify

import gettext
Expand All @@ -55,8 +63,6 @@

from .utils import run_asyncio_and_show_errors

gbulb.install()

DATA = "/var/run/qubes/qubes-clipboard.bin"
METADATA = "/var/run/qubes/qubes-clipboard.bin.metadata"
FROM = "/var/run/qubes/qubes-clipboard.bin.source"
Expand Down
13 changes: 9 additions & 4 deletions qui/devices/device_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,20 @@
gi.require_version("Gtk", "3.0") # isort:skip
from gi.repository import Gtk, Gdk, Gio # isort:skip

try:
from gi.events import GLibEventLoopPolicy

asyncio.set_event_loop_policy(GLibEventLoopPolicy())
except ImportError:
import gbulb

gbulb.install()

from qui.devices import backend
from qui.devices import actionable_widgets

from qubes_config.widgets.gtk_utils import is_theme_light

import gbulb

gbulb.install()

import gettext

t = gettext.translation("desktop-linux-manager", fallback=True)
Expand Down
13 changes: 10 additions & 3 deletions qui/tools/qubes_device_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,14 @@
# pylint: enable=import-error

# pylint: disable=wrong-import-order
import gbulb
try:
from gi.events import GLibEventLoopPolicy

asyncio.set_event_loop_policy(GLibEventLoopPolicy())
except ImportError:
import gbulb

gbulb.install()

# pylint: enable=wrong-import-position

Expand Down Expand Up @@ -256,10 +263,10 @@ async def handle_request(self, params, service, source_domain):
def main():
args = parser.parse_args()

gbulb.install()
agent = DeviceAgent(args.socket_path)

asyncio.run(agent.run())
loop = asyncio.get_event_loop()
loop.run_until_complete(agent.run())


if __name__ == "__main__":
Expand Down
9 changes: 7 additions & 2 deletions qui/tray/domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,14 @@
gi.require_version("Gtk", "3.0") # isort:skip
from gi.repository import Gdk, Gio, Gtk, GLib, GdkPixbuf # isort:skip

import gbulb
try:
from gi.events import GLibEventLoopPolicy

gbulb.install()
asyncio.set_event_loop_policy(GLibEventLoopPolicy())
except ImportError:
import gbulb

gbulb.install()

import gettext

Expand Down
9 changes: 7 additions & 2 deletions qui/tray/updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,14 @@
gi.require_version("Gtk", "3.0") # isort:skip
from gi.repository import Gtk, Gio # isort:skip

import gbulb
try:
from gi.events import GLibEventLoopPolicy

gbulb.install()
asyncio.set_event_loop_policy(GLibEventLoopPolicy())
except ImportError:
import gbulb

gbulb.install()

import gettext

Expand Down
3 changes: 2 additions & 1 deletion qui/updater/summary_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,8 @@ def shutdown_domains(self, to_shutdown):
)
self.status = RestartStatus.ERROR_TMPL_DOWN

asyncio.run(wait_for_domain_shutdown(wait_for))
loop = asyncio.get_event_loop()
loop.run_until_complete(wait_for_domain_shutdown(wait_for))

return wait_for

Expand Down
4 changes: 4 additions & 0 deletions rpm_spec/qubes-desktop-linux-manager.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: gettext

Requires: python%{python3_pkgversion}-setuptools
%if 0%{?fedora} < 42
Requires: python%{python3_pkgversion}-gbulb
%else
Requires: python%{python3_pkgversion}-gobject >= 3.50.0
%endif
Requires: python%{python3_pkgversion}-inotify
Requires: libappindicator-gtk3
Requires: python%{python3_pkgversion}-systemd
Expand Down