Bug 84409 - add 'attachment' status to quick search
Summary: add 'attachment' status to quick search
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: 1.9.8
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-03 13:07 UTC by Mikolaj Machowski
Modified: 2018-09-04 18:16 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikolaj Machowski 2004-07-03 13:07:46 UTC
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.
Comment 1 Mikolaj Machowski 2004-07-04 14:41:34 UTC
It would be useful also for users who want to easy find mails with attachements and get rid of them to save disk space.
Comment 2 Till Adam 2004-07-31 15:47:17 UTC
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 {


Comment 3 Mikolaj Machowski 2004-07-31 19:04:54 UTC
> 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

Comment 4 Thorsten Staerk 2007-12-15 22:15:34 UTC
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
Comment 5 Thorsten Staerk 2007-12-15 22:31:22 UTC
I am testing on imap, but don't think this makes a difference.
Comment 6 Thorsten Staerk 2007-12-15 23:19:15 UTC
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.
Comment 7 Mikolaj Machowski 2008-02-15 20:41:31 UTC
Couldn't confirm tstaerk report. Closing, tstaerk if you can reproduce this bug with 3.5.9 feel free to reopen.
Comment 8 Andrew Crouthamel 2018-09-04 18:16:41 UTC
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!