aboutsummaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-10-30 19:00:48 +0100
committerfiaxh <fiaxh@users.noreply.github.com>2017-10-30 19:09:36 +0100
commit9a5433750128ae302c9d8c772204d89c2af35ae2 (patch)
treec7db083b33354cb348bdec05342079c1dc7139ac /main/src
parenta45ba285413a40740275ff91a38eb7f513488eff (diff)
downloaddino-9a5433750128ae302c9d8c772204d89c2af35ae2.tar.gz
dino-9a5433750128ae302c9d8c772204d89c2af35ae2.zip
fixup 8c0a44e (Added a confirmation dialog before removing an account)
Diffstat (limited to 'main/src')
-rw-r--r--main/src/ui/manage_accounts/dialog.vala11
1 files changed, 7 insertions, 4 deletions
diff --git a/main/src/ui/manage_accounts/dialog.vala b/main/src/ui/manage_accounts/dialog.vala
index af9686c8..8fbdb630 100644
--- a/main/src/ui/manage_accounts/dialog.vala
+++ b/main/src/ui/manage_accounts/dialog.vala
@@ -128,10 +128,13 @@ public class Dialog : Gtk.Dialog {
private void remove_account(AccountRow account_item) {
Gtk.MessageDialog msg = new Gtk.MessageDialog (
this, Gtk.DialogFlags.DESTROY_WITH_PARENT | Gtk.DialogFlags.MODAL,
- Gtk.MessageType.WARNING, Gtk.ButtonsType.YES_NO,
- _("Delete Account"));
- msg.format_secondary_markup(_("Do you really want to delete <b>%s</b>? This action is irreversible!"), account_item.jid_label.get_text());
- if (msg.run() == Gtk.ResponseType.YES) {
+ Gtk.MessageType.WARNING, Gtk.ButtonsType.OK_CANCEL,
+ _("Remove account %s?".printf(account_item.jid_label.get_text())));
+ msg.secondary_text = "You won't be able to access your conversation history anymore."; // TODO remove history!
+ Button ok_button = msg.get_widget_for_response(ResponseType.OK) as Button;
+ ok_button.label = _("Remove");
+ ok_button.get_style_context().add_class("destructive-action");
+ if (msg.run() == Gtk.ResponseType.OK) {
account_list.remove(account_item);
account_list.queue_draw();
if (account_item.account.enabled) account_disabled(account_item.account);