Mercurial > pidgin
changeset 22257:8233bbcf3e86
The Gnome Human Interface Guidelines say, "if pressing this button by
mistake could cause a loss of data, do not set a default button for the
window. Do not make Cancel the default button instead."
So I changed our account deletion dialog to not have a default action.
For things like deleting a buddy or a certificate I think it makes
sense to have the default be "yes" because it's much less severe
than deleting an account (which deletes your buddies, contacts, etc).
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 03 Feb 2008 11:39:59 +0000 |
parents | 51d2bfedf679 |
children | fbd8297fe387 |
files | finch/gntaccount.c finch/gntcertmgr.c pidgin/gtkaccount.c pidgin/gtkcertmgr.c |
diffstat | 4 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/gntaccount.c Sun Feb 03 11:36:33 2008 +0000 +++ b/finch/gntaccount.c Sun Feb 03 11:39:59 2008 +0000 @@ -632,7 +632,8 @@ prompt = g_strdup_printf(_("Are you sure you want to delete %s?"), purple_account_get_username(account)); - purple_request_action(account, _("Delete Account"), prompt, NULL, 0, + purple_request_action(account, _("Delete Account"), prompt, NULL, + PURPLE_DEFAULT_ACTION_NONE, account, NULL, NULL, account, 2, _("Delete"), really_delete_account, _("Cancel"), NULL);
--- a/finch/gntcertmgr.c Sun Feb 03 11:36:33 2008 +0000 +++ b/finch/gntcertmgr.c Sun Feb 03 11:39:59 2008 +0000 @@ -234,7 +234,7 @@ purple_request_close_with_handle((void *)key); purple_request_yes_no((void *)key, _("Confirm certificate delete"), primary, NULL, - 1, + 0, NULL, NULL, NULL, g_strdup(key), tls_peers_mgmt_delete_confirm_cb,
--- a/pidgin/gtkaccount.c Sun Feb 03 11:36:33 2008 +0000 +++ b/pidgin/gtkaccount.c Sun Feb 03 11:39:59 2008 +0000 @@ -1833,7 +1833,8 @@ purple_account_get_username(account)); purple_request_close_with_handle(account); - purple_request_action(account, NULL, buf, NULL, 0, + purple_request_action(account, NULL, buf, NULL, + PURPLE_DEFAULT_ACTION_NONE, account, NULL, NULL, account, 2, _("Delete"), delete_account_cb,
--- a/pidgin/gtkcertmgr.c Sun Feb 03 11:36:33 2008 +0000 +++ b/pidgin/gtkcertmgr.c Sun Feb 03 11:39:59 2008 +0000 @@ -372,7 +372,7 @@ purple_request_yes_no(tpm_dat, _("Confirm certificate delete"), primary, NULL, /* Can this be NULL? */ - 1, /* NO is default action */ + 0, /* "yes" is the default action */ NULL, NULL, NULL, id, /* id ownership passed to callback */ tls_peers_mgmt_delete_confirm_cb,