[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/kdab-post-4.0/kdepim
From: Till Adam <adam () kde ! org>
Date: 2007-11-19 10:25:57
Message-ID: 1195467957.296098.30185.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 738630 by tilladam:
Merged revisions 738629 via svnmerge from
svn+ssh://tilladam@svn.kde.org/home/kde/branches/kdepim/enterprise/kdepim
........
r738629 | tilladam | 2007-11-19 11:17:44 +0100 (Mon, 19 Nov 2007) | 6 lines
Use better strings to describe the pseudo headers in searches and filters
(e.g. <message> -> Full Message) and fix buglets uncovered by english now
being != internal strings.
Prokde35-z Item 36.
........
_M . (directory)
M +21 -10 kmail/kmsearchpatternedit.cpp
** branches/work/kdab-post-4.0/kdepim #property svnmerge-integrated
- /branches/kdepim/enterprise/kdepim:1-708704,708706,708741,708749,709066,711604,71 \
1623,712056,714358,715112,717162,717727,723348-723367,723653,724153,724155,724546,729306,729611,731653,733159,733883,734242,734247,734273,735684 \
/trunk/KDE/kdepim:1-738080 + \
/branches/kdepim/enterprise/kdepim:1-708704,708706,708741,708749,709066,711604,711623, \
712056,714358,715112,717162,717727,723348-723367,723653,724153,724155,724546,729306,729611,731653,733159,733883,734242,734247,734273,735684,738629 \
/trunk/KDE/kdepim:1-738080
--- branches/work/kdab-post-4.0/kdepim/kmail/kmsearchpatternedit.cpp #738629:738630
@@ -46,13 +46,13 @@
const char *internalName;
const char *displayName;
} SpecialRuleFields[] = {
- { "<message>", I18N_NOOP( "<message>" ) },
- { "<body>", I18N_NOOP( "<body>" ) },
- { "<any header>", I18N_NOOP( "<any header>" ) },
- { "<recipients>", I18N_NOOP( "<recipients>" ) },
- { "<size>", I18N_NOOP( "<size in bytes>" ) },
- { "<age in days>", I18N_NOOP( "<age in days>" ) },
- { "<status>", I18N_NOOP( "<status>" ) }
+ { "<message>", I18N_NOOP( "Complete Message" ) },
+ { "<body>", I18N_NOOP( "Body of Message" ) },
+ { "<any header>", I18N_NOOP( "Anywhere in Headers" ) },
+ { "<recipients>", I18N_NOOP( "All Recipients" ) },
+ { "<size>", I18N_NOOP( "Size in Bytes" ) },
+ { "<age in days>", I18N_NOOP( "Age in Days" ) },
+ { "<status>", I18N_NOOP( "Message Status" ) }
};
static const int SpecialRuleFieldsCount =
sizeof( SpecialRuleFields ) / sizeof( *SpecialRuleFields );
@@ -93,8 +93,8 @@
mRuleField->setMaxCount( mRuleField->count() );
mRuleField->adjustSize();
- if ((currentText != "<message>") &&
- (currentText != "<body>"))
+ if (( currentText != "<message>") &&
+ ( currentText != "<body>"))
mRuleField->setItemText( 0, QString::fromAscii( currentText ) );
else
mRuleField->setItemText( 0, QString() );
@@ -227,12 +227,23 @@
return -1; // no pseudo header
}
+static QString displayNameFromInternalName( const QString & internal )
+{
+ for ( int i = 0; i < SpecialRuleFieldsCount; ++i ) {
+ if ( internal == SpecialRuleFields[i].internalName )
+ return i18n(SpecialRuleFields[i].displayName);
+ }
+ return internal.latin1();
+}
+
+
+
int KMSearchRuleWidget::indexOfRuleField( const QByteArray & aName ) const
{
if ( aName.isEmpty() )
return -1;
- QString i18n_aName = i18n( aName );
+ QString i18n_aName = displayNameFromInternalName( aName );
for ( int i = 1; i < mRuleField->count(); ++i ) {
if ( mRuleField->itemText( i ) == i18n_aName )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic