changeset 15726:2eacd3be75a0

Add a 'Reconnect' button in the 'account was disconnected.' dialog.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Mon, 26 Feb 2007 05:44:06 +0000
parents 1e4f4e000c76
children 326aab92ba64
files console/gntaccount.c console/gntconn.c
diffstat 2 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/console/gntaccount.c	Mon Feb 26 01:11:44 2007 +0000
+++ b/console/gntaccount.c	Mon Feb 26 05:44:06 2007 +0000
@@ -594,6 +594,7 @@
 			break;
 		}
 	}
+	gaim_request_close_with_handle(account); /* Close any other opened delete window */
 	gaim_accounts_delete(account);
 }
 
@@ -610,7 +611,6 @@
 	prompt = g_strdup_printf(_("Are you sure you want to delete %s?"),
 			gaim_account_get_username(account));
 
-	gaim_request_close_with_handle(account); /* Close any other opened delete window */
 	gaim_request_action(account, _("Delete Account"), prompt, NULL, 0, account, 2,
 			_("Delete"), really_delete_account, _("Cancel"), NULL);
 	g_free(prompt);
--- a/console/gntconn.c	Mon Feb 26 01:11:44 2007 +0000
+++ b/console/gntconn.c	Mon Feb 26 05:44:06 2007 +0000
@@ -22,7 +22,9 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include "notify.h"
+#include "account.h"
+#include "core.h"
+#include "request.h"
 
 #include "gntconn.h"
 #include "gntgaim.h"
@@ -40,7 +42,11 @@
 	secondary = g_strdup_printf(_("%s was disconnected due to the following error:\n%s"),
 			act, text);
 
-	gaim_notify_error(account, _("Connection Error"), primary, secondary);
+	gaim_request_action(account, _("Connection Error"), primary, secondary, 1,
+						account, 2,
+						_("OK"), NULL,
+						_("Connect"),
+						GAIM_CALLBACK(gaim_account_connect));
 
 	g_free(act);
 	g_free(primary);