[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-i18n-doc
Subject: Permission to break the string freeze
From: Till Adam <adam () kde ! org>
Date: 2006-01-22 16:37:56
Message-ID: 200601221737.56575.adam () kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/mixed)]
Heya boys and girls,
I'd like to commit the attached patch to 3.5 branch of KMail, since it=20
improves usability quite a bit. Ok?
Till
["acceptInvitationsWhenNotReceiver.diff" (text/x-diff)]
Index: callback.cpp
===================================================================
--- callback.cpp (revision 497931)
+++ callback.cpp (working copy)
@@ -112,10 +112,6 @@ QString Callback::receiver() const
mReceiverSet = true;
QStringList addrs = KPIM::splitEmailAddrList( mMsg->to() );
- if( addrs.count() < 2 )
- // Only one receiver, so that has to be us
- mReceiver = mMsg->to();
- else {
int found = 0;
for( QStringList::Iterator it = addrs.begin(); it != addrs.end(); ++it ) {
if( kmkernel->identityManager()->identityForAddress( *it ) !=
@@ -125,20 +121,37 @@ QString Callback::receiver() const
mReceiver = *it;
}
}
-
+ QStringList ccaddrs = KPIM::splitEmailAddrList( mMsg->cc() );
+ for( QStringList::Iterator it = ccaddrs.begin(); it != ccaddrs.end(); ++it ) {
+ if( kmkernel->identityManager()->identityForAddress( *it ) !=
+ KPIM::Identity::null() ) {
+ // Ok, this could be us
+ ++found;
+ mReceiver = *it;
+ }
+ }
if( found != 1 ) {
bool ok;
- mReceiver =
- KInputDialog::getItem( i18n( "Select Address" ),
- i18n( "<qt>None of your identities match the "
+ QString selectMessage;
+ if (found == 0) {
+ selectMessage = i18n("<qt>None of your identities match the "
+ "receiver of this message,<br>please "
+ "choose which of the following addresses "
+ "is yours, if any:");
+ } else {
+ selectMessage = i18n("<qt>Several of your identities match the "
"receiver of this message,<br>please "
"choose which of the following addresses "
- "is yours:" ),
+ "is yours:");
+ }
+
+ mReceiver =
+ KInputDialog::getItem( i18n( "Select Address" ),
+ selectMessage,
addrs, 0, FALSE, &ok, kmkernel->mainWin() );
if( !ok )
mReceiver = QString::null;
}
- }
return mReceiver;
}
[Attachment #6 (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic