@ -162,12 +162,17 @@ void KInstitutionsView::loadAccounts(void)
// hide it, if unused
// hide it, if unused
noInstitutionItem - > setVisible ( noInstitutionItem - > childCount ( ) ! = 0 ) ;
noInstitutionItem - > setVisible ( noInstitutionItem - > childCount ( ) ! = 0 ) ;
bool showClosedAccounts = kmymoney2 - > toggleAction ( " view_show_all_accounts " ) - > isChecked ( )
| | ! KMyMoneyGlobalSettings : : hideClosedAccounts ( ) ;
TQValueList < MyMoneyInstitution > list = file - > institutionList ( ) ;
TQValueList < MyMoneyInstitution > list = file - > institutionList ( ) ;
TQValueList < MyMoneyInstitution > : : const_iterator it_i ;
TQValueList < MyMoneyInstitution > : : const_iterator it_i ;
for ( it_i = list . begin ( ) ; it_i ! = list . end ( ) ; + + it_i ) {
for ( it_i = list . begin ( ) ; it_i ! = list . end ( ) ; + + it_i ) {
KMyMoneyAccountTreeItem * item = new KMyMoneyAccountTreeItem ( m_accountTree , * it_i ) ;
KMyMoneyAccountTreeItem * item = new KMyMoneyAccountTreeItem ( m_accountTree , * it_i ) ;
item - > setPixmap ( 0 , none . pixmap ( ) ) ;
item - > setPixmap ( 0 , none . pixmap ( ) ) ;
loadSubAccounts ( item , ( * it_i ) . id ( ) ) ;
loadSubAccounts ( item , ( * it_i ) . id ( ) ) ;
if ( ! showClosedAccounts )
item - > setVisible ( item - > childCount ( ) ! = 0 ) ;
}
}
} catch ( MyMoneyException * e ) {
} catch ( MyMoneyException * e ) {
@ -201,7 +206,8 @@ void KInstitutionsView::loadAccounts(void)
void KInstitutionsView : : loadSubAccounts ( KMyMoneyAccountTreeItem * parent )
void KInstitutionsView : : loadSubAccounts ( KMyMoneyAccountTreeItem * parent )
{
{
bool showClosedAccounts = kmymoney2 - > toggleAction ( " view_show_all_accounts " ) - > isChecked ( ) ;
bool showClosedAccounts = kmymoney2 - > toggleAction ( " view_show_all_accounts " ) - > isChecked ( )
| | ! KMyMoneyGlobalSettings : : hideClosedAccounts ( ) ;
const MyMoneyAccount & account = dynamic_cast < const MyMoneyAccount & > ( parent - > itemObject ( ) ) ;
const MyMoneyAccount & account = dynamic_cast < const MyMoneyAccount & > ( parent - > itemObject ( ) ) ;
TQValueList < TQString > : : const_iterator it_a ;
TQValueList < TQString > : : const_iterator it_a ;
MyMoneyFile * file = MyMoneyFile : : instance ( ) ;
MyMoneyFile * file = MyMoneyFile : : instance ( ) ;
@ -230,7 +236,8 @@ void KInstitutionsView::loadSubAccounts(KMyMoneyAccountTreeItem* parent, const T
TQMap < TQString , MyMoneyAccount > : : const_iterator it_a ;
TQMap < TQString , MyMoneyAccount > : : const_iterator it_a ;
MyMoneyMoney value ;
MyMoneyMoney value ;
bool showClosedAccounts = kmymoney2 - > toggleAction ( " view_show_all_accounts " ) - > isChecked ( ) ;
bool showClosedAccounts = kmymoney2 - > toggleAction ( " view_show_all_accounts " ) - > isChecked ( )
| | ! KMyMoneyGlobalSettings : : hideClosedAccounts ( ) ;
for ( it_a = m_accountMap . begin ( ) ; it_a ! = m_accountMap . end ( ) ; + + it_a ) {
for ( it_a = m_accountMap . begin ( ) ; it_a ! = m_accountMap . end ( ) ; + + it_a ) {
const MyMoneyAccount & acc = * it_a ;
const MyMoneyAccount & acc = * it_a ;