Mercurial > pidgin.yaz
changeset 19947:6f4facc932b6
merge of '136752a3a64ea88c43212015de4ce2ed521575d1'
and '47916685fe30d7e69c61b6e3af9b15b24801ca12'
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Wed, 12 Sep 2007 13:26:20 +0000 |
parents | ebf4fe12ad10 (current diff) 41cad24fd6df (diff) |
children | 7dbeede6da97 96cab0f92851 |
files | |
diffstat | 4 files changed, 33 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog.API Wed Sep 12 13:00:42 2007 +0000 +++ b/ChangeLog.API Wed Sep 12 13:26:20 2007 +0000 @@ -43,6 +43,7 @@ * finch_sound_is_enabled * The reserved field in the FinchConv is now used to store information about the conversation (using FinchConversationFlag) + * finch_account_dialog_show libgnt: * gnt_slider_set_small_step, gnt_slider_set_large_step to allow more
--- a/finch/gntaccount.c Wed Sep 12 13:00:42 2007 +0000 +++ b/finch/gntaccount.c Wed Sep 12 13:26:20 2007 +0000 @@ -715,6 +715,11 @@ gnt_widget_show(accounts.window); } +void finch_account_dialog_show(PurpleAccount *account) +{ + edit_account(account); +} + static gpointer finch_accounts_get_handle() {
--- a/finch/gntaccount.h Wed Sep 12 13:00:42 2007 +0000 +++ b/finch/gntaccount.h Wed Sep 12 13:26:20 2007 +0000 @@ -54,6 +54,13 @@ */ void finch_accounts_show_all(void); +/** + * Show the edit dialog for an account. + * + * @param account The account to edit, or @c NULL to create a new account. + */ +void finch_account_dialog_show(PurpleAccount *account); + /*@}*/ #endif
--- a/finch/gntconn.c Wed Sep 12 13:00:42 2007 +0000 +++ b/finch/gntconn.c Wed Sep 12 13:26:20 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);