changeset 14422:84a480acb6ad

[gaim-migrate @ 17130] Show the accounts-dialog at startup if there's no enabled account. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 02 Sep 2006 20:17:43 +0000
parents 553bbd68387e
children cfd5bcc06a7e
files console/gntaccount.c console/libgnt/wms/s.c
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/console/gntaccount.c	Sat Sep 02 19:29:06 2006 +0000
+++ b/console/gntaccount.c	Sat Sep 02 20:17:43 2006 +0000
@@ -693,6 +693,8 @@
 
 void gg_accounts_init()
 {
+	GList *iter;
+
 	gaim_signal_connect(gaim_accounts_get_handle(), "account-added",
 			gg_accounts_get_handle(), GAIM_CALLBACK(account_added_callback),
 			NULL);
@@ -700,7 +702,12 @@
 			gg_accounts_get_handle(), GAIM_CALLBACK(account_removed_callback),
 			NULL);
 	
-	gg_accounts_show_all();
+	for (iter = gaim_accounts_get_all(); iter; iter = iter->next) {
+		if (gaim_account_get_enabled(iter->data, GAIM_GNT_UI))
+			break;
+	}
+	if (!iter)
+		gg_accounts_show_all();
 }
 
 void gg_accounts_uninit()
--- a/console/libgnt/wms/s.c	Sat Sep 02 19:29:06 2006 +0000
+++ b/console/libgnt/wms/s.c	Sat Sep 02 20:17:43 2006 +0000
@@ -14,6 +14,7 @@
 	gnt_widget_get_size(win, &w, &h);
 	wresize(win->window, h, w + 1);
 	mvwvline(win->window, 0, w, ACS_VLINE | COLOR_PAIR(GNT_COLOR_NORMAL), h);
+	touchwin(win->window);
 }
 
 static void