Version: (using KDE Devel) Installed from: Compiled sources OS: Linux Very often mails with attachmensts have null or very small amount of information and the only way to find it is just looking through list of mails with attachments.
It would be useful also for users who want to easy find mails with attachements and get rid of them to save disk space.
CVS commit by tilladam: Add "has attachment" to the list of stati to search for in the quick search dropdown, but not in the normal search/filter dialog where it is special cased. CCMAIL: 84409-done@bugs.kde.org CCMAIL: 80541-done@bugs.kde.org M +2 -0 kmsearchpattern.cpp 1.70 M +3 -1 kmsearchpattern.h 1.26 M +3 -3 rulewidgethandlermanager.cpp 1.11 --- kdepim/kmail/kmsearchpattern.cpp #1.69:1.70 @@ -614,4 +614,6 @@ KMMsgStatus KMSearchRuleStatus::statusFr if ( ! aStatusString.compare("ham") ) status = KMMsgStatusHam; + if ( ! aStatusString.compare("has an attachment") ) + status = KMMsgStatusHasAttach; return status; --- kdepim/kmail/kmsearchpattern.h #1.25:1.26 @@ -229,8 +229,10 @@ namespace KMail { I18N_NOOP( "spam" ), I18N_NOOP( "ham" ), - I18N_NOOP( "todo" ) + I18N_NOOP( "todo" ), + I18N_NOOP( "has an attachment") }; static const int StatusValueCount = sizeof( StatusValues ) / sizeof( *StatusValues ); + static const int StatusValueCountWithoutHidden = StatusValueCount - 1; } --- kdepim/kmail/rulewidgethandlermanager.cpp #1.10:1.11 @@ -1058,5 +1058,5 @@ namespace { QComboBox *statusCombo = new QComboBox( valueStack, "statusRuleValueCombo" ); - for ( int i = 0; i < KMail::StatusValueCount; ++i ) { + for ( int i = 0; i < KMail::StatusValueCountWithoutHidden; ++i ) { statusCombo->insertItem( i18n( KMail::StatusValues[i] ) ); } @@ -1218,5 +1218,5 @@ namespace { const QString value = rule->contents(); int valueIndex = 0; - for ( ; valueIndex < KMail::StatusValueCount; ++valueIndex ) + for ( ; valueIndex < KMail::StatusValueCountWithoutHidden; ++valueIndex ) if ( value == QString::fromLatin1( KMail::StatusValues[valueIndex] ) ) @@ -1227,5 +1227,5 @@ namespace { if ( statusCombo ) { statusCombo->blockSignals( true ); - if ( valueIndex < KMail::StatusValueCount ) + if ( valueIndex < KMail::StatusValueCountWithoutHidden ) statusCombo->setCurrentItem( valueIndex ); else {
> Add "has attachment" to the list of stati to search for in the quick > search dropdown, but not in the normal search/filter dialog where it is > special cased. Thanks for this. BTW - quick trick for search dialog: look in body for Content-disposition: attachment
This does not work reliably. Reproduce: 1. send yourself 4 mails with attachments 2. receive them 3. click onto 3 of the 4 mails. The mails' status changes to read and a staples ("Büroklammer") appears in the subject column of the folder list 4. search for mails with attachments actual result: 3 mails expected result:4 mails
I am testing on imap, but don't think this makes a difference.
Best would be if kmail could check for attachments as soon as the mail is received - it would then carry the "staples" icon in the subject column.
Couldn't confirm tstaerk report. Closing, tstaerk if you can reproduce this bug with 3.5.9 feel free to reopen.
Hello! Sorry to be the bearer of bad news, but this version of Kmail has been unmaintained for many years so I am closing this bug. Please try using the latest version of Kmail to see if your issue persists. If it does, please submit a new bug in "kmail2". Thank you!