Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
821ec029 by wurstsalat at 2025-03-01T16:43:44+01:00
imprv: Start Chat: Add confirmation dialog for 'Forget this Group Chat' action
Closes #12199
- - - - -
1 changed file:
- gajim/gtk/application.py
Changes:
=====================================
gajim/gtk/application.py
=====================================
@@ -873,12 +873,23 @@ def _on_forget_groupchat_action(
_action: Gio.SimpleAction, params: structs.AccountJidParam
) -> None:
- window = get_app_window("StartChatDialog")
- if window is not None:
- window.remove_row(params.account, str(params.jid))
+ def _forget():
+ window = get_app_window("StartChatDialog")
+ if window is not None:
+ window.remove_row(params.account, str(params.jid))
- client = app.get_client(params.account)
- client.get_module("MUC").leave(params.jid)
- client.get_module("Bookmarks").remove(params.jid)
+ client = app.get_client(params.account)
+ client.get_module("MUC").leave(params.jid)
+ client.get_module("Bookmarks").remove(params.jid)
- app.storage.archive.remove_history_for_jid(params.account, params.jid)
+ app.storage.archive.remove_history_for_jid(params.account,
params.jid)
+
+ ConfirmationDialog(
+ _("Forget this Group Chat?"),
+ _("Do you really want to remove this chat including its chat
history?"),
+ [
+ DialogButton.make("Cancel"),
+ DialogButton.make("Remove", callback=_forget),
+ ],
+ transient_for=app.window,
+ )
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/821ec029cba6e24451718746b7ce4e416bc028df
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/821ec029cba6e24451718746b7ce4e416bc028df
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]