Summary: | Wrong folder order in folder selection drop down boxes | ||
---|---|---|---|
Product: | [Unmaintained] kmail | Reporter: | Ingo Klöcker <kloecker> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.7 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Ingo Klöcker
2004-11-04 22:55:51 UTC
I can verify the problem. The problem is that KMFolderComboBox::createFolderList() assumes that the five local system folders can't have any subfolders. That's obviously no longer true. For KDE 3.3.x we have to come up with a fix, but for KDE 3.4 I think we should get rid of the folder selection drop down box and use the nice folder selection dialog which appears when moving/copying messages with 'm'/'c'. The drop down box simply doesn't work for large folder trees (cf. bug 74268). CVS commit by kloecker: Fix broken order of folders in the folder combobox. Since we now allow subfolders below the system folders we can't simply move the system folders to the begin of the list. Therefore we now leave the system folders where they are. Additionally, the local folders are now listed before the IMAP folders which should have always been the case. BUG:92710 M +15 -21 kmfoldercombobox.cpp 1.18.2.1 --- kdepim/kmail/kmfoldercombobox.cpp #1.18:1.18.2.1 @@ -66,29 +66,23 @@ void KMFolderComboBox::createFolderList( QValueList<QGuardedPtr<KMFolder> > *folders) { + kmkernel->folderMgr()->createI18nFolderList( names, folders ); + if ( !mOutboxShown ) { + QValueList< QGuardedPtr<KMFolder> >::iterator folderIt = folders->begin(); + QStringList::iterator namesIt = names->begin(); + for ( ; folderIt != folders->end(); ++folderIt, ++namesIt ) { + KMFolder *folder = *folderIt; + if ( folder == kmkernel->outboxFolder() ) + break; + } + if ( folderIt != folders->end() ) { + folders->remove( folderIt ); + names->remove( namesIt ); + } + } + if (mImapShown) kmkernel->imapFolderMgr()->createI18nFolderList( names, folders ); kmkernel->dimapFolderMgr()->createI18nFolderList( names, folders ); - kmkernel->folderMgr()->createFolderList( names, folders ); - uint i = 0; - while (i < folders->count()) - { - if ((*(folders->at(i)))->isSystemFolder() - && (*(folders->at(i)))->folderType() != KMFolderTypeImap - && (*(folders->at(i)))->folderType() != KMFolderTypeCachedImap) - { - folders->remove(folders->at(i)); - names->remove(names->at(i)); - } - else i++; - } - - folders->prepend(kmkernel->draftsFolder()); - folders->prepend(kmkernel->trashFolder()); - folders->prepend(kmkernel->sentFolder()); - if (mOutboxShown) folders->prepend(kmkernel->outboxFolder()); - folders->prepend(kmkernel->inboxFolder()); - for (int i = ((mOutboxShown) ? 4 : 3); i >= 0; i--) - names->prepend((*(folders->at(i)))->label()); } |