Philipp Hörist pushed to branch master at gajim / gajim
Commits:
c99cb802 by Philipp Hörist at 2026-07-21T19:57:42+02:00
imprv: Don't inhibit logout the whole application runtime
The inhbit cookie should only be taken on ::query-end. Then Gajim does not
show up in a inhbit list with "Quitting..." altough it does not shutdown.
- - - - -
1 changed file:
- gajim/gtk/application.py
Changes:
=====================================
gajim/gtk/application.py
=====================================
@@ -96,6 +96,7 @@ def __init__(self):
# required to track screensaver state
self.props.register_session = True
+ self._inhibit_cookie: int | None = None
self.add_main_option(
"version",
@@ -299,12 +300,6 @@ def _startup(self) -> None:
body_use_markup=True,
)
- self._inhibit_cookie = self.inhibit(
- app.window,
- Gtk.ApplicationInhibitFlags.LOGOUT,
- _("There are connected accounts"),
- )
-
GLib.timeout_add(100, self._auto_connect)
def _on_window_added(
@@ -319,11 +314,18 @@ def start_shutdown(self) -> None:
def _shutdown_complete(self) -> None:
CoreApplication._shutdown_complete(self)
- self.uninhibit(self._inhibit_cookie)
+ if self._inhibit_cookie is not None:
+ self.uninhibit(self._inhibit_cookie)
+ self._inhibit_cookie = None
self.quit()
def _on_query_end(self, _application: GajimApplication) -> None:
app.log("app").info("Session end signal received")
+ self._inhibit_cookie = self.inhibit(
+ app.window,
+ Gtk.ApplicationInhibitFlags.LOGOUT,
+ _("Quitting…"),
+ )
# Use a idle call so Gtk can send QueryEndResponse on Linux
idle_add_once(self.start_shutdown)
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/c99cb802b758098d1cc617594e682a3dec188ceb
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/c99cb802b758098d1cc617594e682a3dec188ceb
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]