changeset 17532:e2e709e5446b

If there's no account at startup, sohw the 'New Account' dialog too.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 30 May 2007 06:23:06 +0000
parents c7716cd81f33
children e91e2b450e5d
files finch/gntaccount.c
diffstat 1 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/finch/gntaccount.c	Wed May 30 02:00:31 2007 +0000
+++ b/finch/gntaccount.c	Wed May 30 06:23:06 2007 +0000
@@ -745,12 +745,18 @@
 			finch_accounts_get_handle(),
 			PURPLE_CALLBACK(account_abled_cb), GINT_TO_POINTER(TRUE));
 
-	for (iter = purple_accounts_get_all(); iter; iter = iter->next) {
-		if (purple_account_get_enabled(iter->data, FINCH_UI))
-			break;
+	iter = purple_accounts_get_all();
+	if (iter) {
+		for (; iter; iter = iter->next) {
+			if (purple_account_get_enabled(iter->data, FINCH_UI))
+				break;
+		}
+		if (!iter)
+			finch_accounts_show_all();
+	} else {
+		edit_account(NULL);
+		finch_accounts_show_all();
 	}
-	if (!iter)
-		finch_accounts_show_all();
 }
 
 void finch_accounts_uninit()