[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE_3_4_BRANCH: kdepim/kmail
From: Cornelius Schumacher <schumacher () kde ! org>
Date: 2005-04-12 11:40:32
Message-ID: 20050412114032.6F7E2633 () office ! kde ! org
[Download RAW message or body]
CVS commit by cschumac:
Show categories in recipients picker.
M +23 -0 recipientspicker.cpp 1.22.2.1
--- kdepim/kmail/recipientspicker.cpp #1.22:1.22.2.1
@@ -362,4 +362,6 @@ void RecipientsPicker::initCollections()
}
+ QMap<QString,RecipientsCollection *> categoryMap;
+
mAllRecipients = new RecipientsCollection;
mAllRecipients->setTitle( i18n("All") );
@@ -379,4 +381,20 @@ void RecipientsPicker::initCollections()
(*collIt)->addItem( item );
}
+
+ QStringList categories = (*it).categories();
+ QStringList::ConstIterator catIt;
+ for( catIt = categories.begin(); catIt != categories.end(); ++catIt ) {
+ QMap<QString, RecipientsCollection *>::ConstIterator catMapIt;
+ catMapIt = categoryMap.find( *catIt );
+ RecipientsCollection *collection;
+ if ( catMapIt == categoryMap.end() ) {
+ collection = new RecipientsCollection;
+ collection->setTitle( *catIt );
+ categoryMap.insert( *catIt, collection );
+ } else {
+ collection = *catMapIt;
+ }
+ collection->addItem( item );
+ }
}
}
@@ -389,4 +407,9 @@ void RecipientsPicker::initCollections()
}
+ QMap<QString, RecipientsCollection *>::ConstIterator it3;
+ for( it3 = categoryMap.begin(); it3 != categoryMap.end(); ++it3 ) {
+ insertCollection( *it3 );
+ }
+
insertDistributionLists();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic