comparison console/gntaccount.c @ 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 f74c19f2da30
children 81650a27f253
comparison
equal deleted inserted replaced
14421:553bbd68387e 14422:84a480acb6ad
691 gnt_tree_remove(GNT_TREE(accounts.tree), account); 691 gnt_tree_remove(GNT_TREE(accounts.tree), account);
692 } 692 }
693 693
694 void gg_accounts_init() 694 void gg_accounts_init()
695 { 695 {
696 GList *iter;
697
696 gaim_signal_connect(gaim_accounts_get_handle(), "account-added", 698 gaim_signal_connect(gaim_accounts_get_handle(), "account-added",
697 gg_accounts_get_handle(), GAIM_CALLBACK(account_added_callback), 699 gg_accounts_get_handle(), GAIM_CALLBACK(account_added_callback),
698 NULL); 700 NULL);
699 gaim_signal_connect(gaim_accounts_get_handle(), "account-removed", 701 gaim_signal_connect(gaim_accounts_get_handle(), "account-removed",
700 gg_accounts_get_handle(), GAIM_CALLBACK(account_removed_callback), 702 gg_accounts_get_handle(), GAIM_CALLBACK(account_removed_callback),
701 NULL); 703 NULL);
702 704
703 gg_accounts_show_all(); 705 for (iter = gaim_accounts_get_all(); iter; iter = iter->next) {
706 if (gaim_account_get_enabled(iter->data, GAIM_GNT_UI))
707 break;
708 }
709 if (!iter)
710 gg_accounts_show_all();
704 } 711 }
705 712
706 void gg_accounts_uninit() 713 void gg_accounts_uninit()
707 { 714 {
708 if (accounts.window) 715 if (accounts.window)