diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-01 00:37:02 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-01 00:37:02 +0000 |
commit | cc29364f06178f8f6b457384f2ec37a042bd9d43 (patch) | |
tree | 7c77a3184c698bbf9d98cef09fb1ba8124daceba /kmail/headerlistquicksearch.cpp | |
parent | 4f6c584bacc8c3c694228f36ada3de77a76614a6 (diff) | |
download | tdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.tar.gz tdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.zip |
* Massive set of changes to bring in all fixes and enhancements from the Enterprise PIM branch
* Ensured that the Trinity changes were applied on top of those enhancements, and any redundancy removed
* Added journal read support to the CalDAV resource
* Fixed CalDAV resource to use events URL for tasks and journals when separate URL checkbox unchecked
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1170461 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/headerlistquicksearch.cpp')
-rw-r--r-- | kmail/headerlistquicksearch.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/kmail/headerlistquicksearch.cpp b/kmail/headerlistquicksearch.cpp index 9f20b7e80..69ac5b1f7 100644 --- a/kmail/headerlistquicksearch.cpp +++ b/kmail/headerlistquicksearch.cpp @@ -69,6 +69,7 @@ HeaderListQuickSearch::HeaderListQuickSearch( TQWidget *parent, TQLabel *label = new TQLabel( i18n("Stat&us:"), parent, "kde toolbar widget" ); mStatusCombo = new TQComboBox( parent, "quick search status combo box" ); + mStatusCombo->setSizeLimit( 12 ); mStatusCombo->insertItem( SmallIcon( "run" ), i18n("Any Status") ); insertStatus( StatusUnread ); @@ -78,6 +79,7 @@ HeaderListQuickSearch::HeaderListQuickSearch( TQWidget *parent, insertStatus( StatusForwarded ); insertStatus( StatusToDo ); insertStatus( StatusHasAttachment ); + insertStatus( StatusInvitation ); insertStatus( StatusWatched ); insertStatus( StatusIgnored ); mStatusCombo->setCurrentItem( 0 ); @@ -91,7 +93,7 @@ HeaderListQuickSearch::HeaderListQuickSearch( TQWidget *parent, 0, i18n( "Open Full Search" ) ); connect( btn, TQT_SIGNAL( clicked() ), TQT_SIGNAL( requestFullSearch() ) ); - /* Disable the signal connected by KListViewSearchLine since it will call + /* Disable the signal connected by KListViewSearchLine since it will call * itemAdded during KMHeaders::readSortOrder() which will in turn result * in getMsgBaseForItem( item ) wanting to access items which are no longer * there. Rather rely on KMHeaders::msgAdded and its signal. */ @@ -149,6 +151,17 @@ bool HeaderListQuickSearch::itemMatches(const TQListViewItem *item, const TQStri if ( !msg || ! ( msg->status() & mStatus ) ) return false; } + + // The full email address is not visible, but we still want it to be searchable. + // KListViewSearchLine::itemMatches() only searches in visible columns. + const HeaderItem *headerItem = static_cast<const HeaderItem*>( item ); + if ( headerItem->from().lower().contains( s.lower() ) ) { + return true; + } + if ( headerItem->to().lower().contains( s.lower() ) ) { + return true; + } + return KListViewSearchLine::itemMatches(item, s); } |