Mercurial > pidgin
diff finch/gntconn.c @ 19768:41cad24fd6df
Instead of just notifying the user about a connection error, give him options
to re-enable the account, or change account settings.
(This does not introduce any new strings)
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Wed, 12 Sep 2007 13:24:12 +0000 |
parents | 44b4e8bd759b |
children | a04aaab1ad12 fb2880587f34 6b8bc3309ab7 |
line wrap: on
line diff
--- a/finch/gntconn.c Wed Sep 12 12:20:49 2007 +0000 +++ b/finch/gntconn.c Wed Sep 12 13:24:12 2007 +0000 @@ -30,6 +30,7 @@ #include "debug.h" #include "request.h" +#include "gntaccount.h" #include "gntconn.h" #define INITIAL_RECON_DELAY_MIN 8000 @@ -87,6 +88,18 @@ } static void +ce_modify_account_cb(PurpleAccount *account) +{ + finch_account_dialog_show(account); +} + +static void +ce_enable_account_cb(PurpleAccount *account) +{ + purple_account_set_enabled(account, FINCH_UI, TRUE); +} + +static void finch_connection_report_disconnect(PurpleConnection *gc, const char *text) { FinchAutoRecon *info; @@ -114,7 +127,13 @@ secondary = g_strdup_printf(_("%s\n\n" "Finch will not attempt to reconnect the account until you " "correct the error and re-enable the account."), text); - purple_notify_error(NULL, NULL, primary, secondary); + + purple_request_action(account, NULL, primary, secondary, 2, + account, NULL, NULL, + account, 3, + _("OK"), NULL, + _("Modify Account"), PURPLE_CALLBACK(ce_modify_account_cb), + _("Re-enable Account"), PURPLE_CALLBACK(ce_enable_account_cb)); g_free(act); g_free(primary);