Allow translating some of the filter critera for headers, namely

subject, to, from and cc.

I've left the other ones untouched as I think those a raw header fields
and shouldn't be translated.
Topic open for bikeshedding though :)

BUG: 170033

svn path=/trunk/KDE/kdepim/; revision=856802
wilder-work
Thomas McGuire 18 years ago
parent e6b50b020c
commit cc9b62f8d5
  1. 16
      kmsearchpatternedit.cpp
  2. 3
      kmsearchpatternedit.h

@ -51,7 +51,11 @@ static const struct {
{ "<recipients>", I18N_NOOP( "All Recipients" ) },
{ "<size>", I18N_NOOP( "Size in Bytes" ) },
{ "<age in days>", I18N_NOOP( "Age in Days" ) },
{ "<status>", I18N_NOOP( "Message Status" ) }
{ "<status>", I18N_NOOP( "Message Status" ) },
{ "Subject", I18N_NOOP( "Subject" ) },
{ "From", I18N_NOOP( "From" ) },
{ "To", I18N_NOOP( "To" ) },
{ "CC", I18N_NOOP( "CC" ) }
};
static const int SpecialRuleFieldsCount =
sizeof( SpecialRuleFields ) / sizeof( *SpecialRuleFields );
@ -264,13 +268,13 @@ void KMSearchRuleWidget::initFieldList( bool headersOnly, bool absoluteDates )
mFilterFieldList.append( i18n( SpecialRuleFields[Size].displayName ) );
if ( !absoluteDates )
mFilterFieldList.append( i18n( SpecialRuleFields[AgeInDays].displayName ) );
mFilterFieldList.append( i18n( SpecialRuleFields[Status].displayName ) );
mFilterFieldList.append( i18n( SpecialRuleFields[Subject].displayName ) );
mFilterFieldList.append( i18n( SpecialRuleFields[From].displayName ) );
mFilterFieldList.append( i18n( SpecialRuleFields[To].displayName ) );
mFilterFieldList.append( i18n( SpecialRuleFields[CC].displayName ) );
// these others only represent message headers and you can add to
// them as you like
mFilterFieldList.append("Subject");
mFilterFieldList.append("From");
mFilterFieldList.append("To");
mFilterFieldList.append("CC");
mFilterFieldList.append("Reply-To");
mFilterFieldList.append("List-Id");
mFilterFieldList.append("Organization");

@ -56,7 +56,8 @@ public:
be used to initialize the widget. */
explicit KMSearchRuleWidget( QWidget* parent=0, KMSearchRule* aRule=0, bool headersOnly = false, bool absoluteDates = false );
enum { Message, Body, AnyHeader, Recipients, Size, AgeInDays, Status };
enum { Message, Body, AnyHeader, Recipients, Size, AgeInDays, Status,
Subject, From, To, CC };
/** Set whether only header fields can be searched. If @p is true only
header fields can be searched otherwise \<message\> and \<body\> searches

Loading…
Cancel
Save