finch/gntconn.c

changeset 19969
53aca1037b2c
parent 19859
71d37b57eff2
child 20004
1f294c8fa7bc
child 20147
66f05a854eee
child 20315
21fbfe31160a
--- 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);

mercurial