Philipp Hörist pushed to branch master at gajim / gajim


Commits:
901695b7 by Philipp Hörist at 2025-04-01T23:24:05+02:00
change: Remove unread message confirmation dialog at shutdown

This dialog stems from a time where Gajim did not retain the unread message 
count.
Gajim does this now, so no information gets lost on shutdown, hence this dialog 
is now obsolete.

Fixes #12248

- - - - -


2 changed files:

- gajim/common/application.py
- gajim/gtk/main.py


Changes:

=====================================
gajim/common/application.py
=====================================
@@ -2,7 +2,6 @@
 #
 # SPDX-License-Identifier: GPL-3.0-only
 
-from typing import Any
 from typing import TextIO
 
 import cProfile
@@ -215,7 +214,7 @@ def end_profiling(self) -> None:
         ps = ps.sort_stats(SortKey.TIME)
         ps.print_stats()
 
-    def start_shutdown(self, *args: Any, **kwargs: Any) -> None:
+    def start_shutdown(self) -> None:
         app.app.systray.shutdown()
 
         accounts_to_disconnect: dict[str, Client] = {}
@@ -238,9 +237,6 @@ def _on_disconnect(event: AccountDisconnected) -> None:
                                        ged.CORE,
                                        _on_disconnect)
 
-        for client in accounts_to_disconnect.values():
-            client.change_status('offline', kwargs.get('message', ''))
-
     def _shutdown_core(self) -> None:
         # Commit any outstanding SQL transactions
         app.process_pool.shutdown(cancel_futures=True)


=====================================
gajim/gtk/main.py
=====================================
@@ -1326,36 +1326,4 @@ def quit(self) -> None:
             app.settings.set("mainwin_height", window_height)
 
         app.settings.save()
-
-        def on_continue2(message: str | None) -> None:
-            app.app.start_shutdown(message=message)
-
-        def on_continue(message: str | None) -> None:
-            if message is None:
-                # user pressed Cancel to change status message dialog
-                return
-
-            # Check for unread messages
-            if self.get_total_unread_count():
-                ConfirmationDialog(
-                    _("You Have Unread Messages"),
-                    _(
-                        "Messages will only be available for reading them 
later "
-                        "if storing chat history is enabled and if the contact 
"
-                        "is in your contact list."
-                    ),
-                    [
-                        DialogButton.make("Cancel"),
-                        DialogButton.make(
-                            "Remove",
-                            text=_("_Quit"),
-                            callback=on_continue2,
-                            args=[message],
-                        ),
-                    ],
-                )
-                return
-
-            on_continue2(message)
-
-        on_continue("")
+        app.app.start_shutdown()



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/901695b70466495a94283f9df022acca0ee9f6d0

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/901695b70466495a94283f9df022acca0ee9f6d0
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]

Reply via email to