[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdepim/kmail
From: Ingo Klöcker <kloecker () kde ! org>
Date: 2005-02-01 0:27:23
Message-ID: 20050201002723.151981CFD4 () office ! kde ! org
[Download RAW message or body]
CVS commit by kloecker:
A treat for Allen: Avoid a submenu with just Local Folders in the Move To and Copy To menus
M +18 -4 kmfoldertree.cpp 1.348
--- kdepim/kmail/kmfoldertree.cpp #1.347:1.348
@@ -1675,7 +1675,21 @@ void KMFolderTree::folderToPopupMenu( bo
SLOT(copySelectedToFolder(int)) );
}
- if ( !item )
+ if ( !item ) {
item = firstChild();
+ // avoid a popup menu with the single entry 'Local Folders' if there
+ // are no IMAP accounts
+ if ( childCount() == 2 ) { // only 'Local Folders' and 'Searches'
+ KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>( item );
+ if ( fti->protocol() == KFolderTreeItem::Search ) {
+ // skip 'Searches'
+ item = item->nextSibling();
+ fti = static_cast<KMFolderTreeItem*>( item );
+ }
+ folderToPopupMenu( move, receiver, aMenuToFolder, menu, fti->firstChild() );
+ return;
+ }
+ }
+
while ( item )
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic