comparison finch/gntconn.c @ 19947:6f4facc932b6

merge of '136752a3a64ea88c43212015de4ce2ed521575d1' and '47916685fe30d7e69c61b6e3af9b15b24801ca12'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 12 Sep 2007 13:26:20 +0000
parents 41cad24fd6df
children a04aaab1ad12 fb2880587f34 6b8bc3309ab7
comparison
equal deleted inserted replaced
19946:ebf4fe12ad10 19947:6f4facc932b6
28 #include "core.h" 28 #include "core.h"
29 #include "connection.h" 29 #include "connection.h"
30 #include "debug.h" 30 #include "debug.h"
31 #include "request.h" 31 #include "request.h"
32 32
33 #include "gntaccount.h"
33 #include "gntconn.h" 34 #include "gntconn.h"
34 35
35 #define INITIAL_RECON_DELAY_MIN 8000 36 #define INITIAL_RECON_DELAY_MIN 8000
36 #define INITIAL_RECON_DELAY_MAX 60000 37 #define INITIAL_RECON_DELAY_MAX 60000
37 38
85 86
86 return FALSE; 87 return FALSE;
87 } 88 }
88 89
89 static void 90 static void
91 ce_modify_account_cb(PurpleAccount *account)
92 {
93 finch_account_dialog_show(account);
94 }
95
96 static void
97 ce_enable_account_cb(PurpleAccount *account)
98 {
99 purple_account_set_enabled(account, FINCH_UI, TRUE);
100 }
101
102 static void
90 finch_connection_report_disconnect(PurpleConnection *gc, const char *text) 103 finch_connection_report_disconnect(PurpleConnection *gc, const char *text)
91 { 104 {
92 FinchAutoRecon *info; 105 FinchAutoRecon *info;
93 PurpleAccount *account = purple_connection_get_account(gc); 106 PurpleAccount *account = purple_connection_get_account(gc);
94 107
112 125
113 primary = g_strdup_printf(_("%s disconnected."), act); 126 primary = g_strdup_printf(_("%s disconnected."), act);
114 secondary = g_strdup_printf(_("%s\n\n" 127 secondary = g_strdup_printf(_("%s\n\n"
115 "Finch will not attempt to reconnect the account until you " 128 "Finch will not attempt to reconnect the account until you "
116 "correct the error and re-enable the account."), text); 129 "correct the error and re-enable the account."), text);
117 purple_notify_error(NULL, NULL, primary, secondary); 130
131 purple_request_action(account, NULL, primary, secondary, 2,
132 account, NULL, NULL,
133 account, 3,
134 _("OK"), NULL,
135 _("Modify Account"), PURPLE_CALLBACK(ce_modify_account_cb),
136 _("Re-enable Account"), PURPLE_CALLBACK(ce_enable_account_cb));
118 137
119 g_free(act); 138 g_free(act);
120 g_free(primary); 139 g_free(primary);
121 g_free(secondary); 140 g_free(secondary);
122 purple_account_set_enabled(account, FINCH_UI, FALSE); 141 purple_account_set_enabled(account, FINCH_UI, FALSE);