# HG changeset patch # User Mark Doliner # Date 1202038799 0 # Node ID 8233bbcf3e86b6390bb84af839a974ac9d40555f # Parent 51d2bfedf6797ec44e61b6e02938f44c733b347d 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). diff -r 51d2bfedf679 -r 8233bbcf3e86 finch/gntaccount.c --- 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); diff -r 51d2bfedf679 -r 8233bbcf3e86 finch/gntcertmgr.c --- 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, diff -r 51d2bfedf679 -r 8233bbcf3e86 pidgin/gtkaccount.c --- 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, diff -r 51d2bfedf679 -r 8233bbcf3e86 pidgin/gtkcertmgr.c --- 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,