[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/kdepim/enterprise/kdepim
From: Pradeepto Bhattacharya <pradeepto () kde ! org>
Date: 2008-01-10 6:33:49
Message-ID: 1199946829.323754.2640.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 759153 by pradeepto:
Merged revisions 661269 via svnmerge from
svn+ssh://pradeepto@svn.kde.org/home/kde/branches/KDE/3.5/kdepim
........
r661269 | winterz | 2007-05-05 07:16:55 +0530 (Sat, 05 May 2007) | 7 lines
Fix sending invitations to Outlook users.
Patch provided and tested by Thorsten and Jan-Pascal. Thanks!
Contains a couple of new strings, but this has been ok'd
by at least 3 translators.
CCMAIL: kde-i18n-doc@kde.org, thorsten.schnebeck@gmx.net, janpascal@vanbest.org
........
_M . (directory)
M +23 -6 kmail/callback.cpp
M +26 -2 kmail/configuredialog.cpp
M +1 -0 kmail/configuredialog_p.h
M +6 -0 kmail/kmail.kcfg
M +4 -2 kmail/kmkernel.cpp
M +2 -2 korganizer/komailclient.cpp
** branches/kdepim/enterprise/kdepim #property svnmerge-integrated
- /branches/KDE/3.5/kdepim:1-658468,658731,658742,658798,659645,659861,660183,68990 \
8,710278-710780,710782-712428,712430-713465,713467-713486,713488-713780,713782-714098, \
714100-714451,714453-714806,714808-714809,714811-715296,715298-716783,716785-717081,71 \
7083-717101,717103-717165,717167-717733,717735-719366,719368-719527,719529-719674,7196 \
76-720927,720929-721290,721292-721899,721901-722200,722202-722728,722730-722969,722971 \
-725946,725948-727906,727908-729902,729904-730526,730528-730904,730906-732920,732922-734070,734508,734733,734909-735153,735421,735808,736109,745678,750129,750193 \
/branches/work/~moenicke/enterprise_pretty:1-717209 \
/branches/work/~vkrause/enterprise:1-702837,702839-739155 + \
/branches/KDE/3.5/kdepim:1-658468,658731,658742,658798,659645,659861,660183,661269,689 \
908,710278-710780,710782-712428,712430-713465,713467-713486,713488-713780,713782-71409 \
8,714100-714451,714453-714806,714808-714809,714811-715296,715298-716783,716785-717081, \
717083-717101,717103-717165,717167-717733,717735-719366,719368-719527,719529-719674,71 \
9676-720927,720929-721290,721292-721899,721901-722200,722202-722728,722730-722969,7229 \
71-725946,725948-727906,727908-729902,729904-730526,730528-730904,730906-732920,732922-734070,734508,734733,734909-735153,735421,735808,736109,745678,750129,750193 \
/branches/work/~moenicke/enterprise_pretty:1-717209 \
/branches/work/~vkrause/enterprise:1-702837,702839-739155
--- branches/kdepim/enterprise/kdepim/kmail/callback.cpp #759152:759153
@@ -33,6 +33,7 @@
#include "callback.h"
#include "kmkernel.h"
#include "kmmessage.h"
+#include "kmmsgpart.h"
#include <libemailfunctions/email.h>
#include <libkpimidentities/identity.h>
#include <libkpimidentities/identitymanager.h>
@@ -62,11 +63,8 @@
KMMessage *msg = new KMMessage;
msg->initHeader();
- msg->setHeaderField( "Content-Type",
- "text/calendar; method=reply; charset=\"utf-8\"" );
msg->setSubject( subject );
msg->setTo( to );
- msg->setBody( iCal.utf8() );
msg->setFrom( receiver() );
if ( delMessage && deleteInvitationAfterReply() )
@@ -81,12 +79,13 @@
// Try and match the receiver with an identity
const KPIM::Identity& identity =
kmkernel->identityManager()->identityForAddress( receiver() );
- if( identity != KPIM::Identity::null() )
+ if( identity != KPIM::Identity::null() ) {
// Identity found. Use this
msg->setFrom( identity.fullEmailAddr() );
msg->setHeaderField("X-KMail-Identity", QString::number( identity.uoid() ));
- // Remove BCC from identity on ical invitations \
(https://intevation.de/roundup/kolab/issue474)
- msg->setBcc( "" );
+ }
+ // Remove BCC from identity on ical invitations \
(https://intevation.de/roundup/kolab/issue474) + msg->setBcc( "" );
}
KMail::Composer * cWin = KMail::makeComposer();
@@ -95,6 +94,24 @@
cWin->disableWordWrap();
cWin->setSigningAndEncryptionDisabled( true );
+ if( GlobalSettings::self()->exchangeCompatibleInvitations() ) {
+ // For Exchange, send ical as attachment, with proper
+ // parameters
+ msg->setCharset( "utf-8" );
+ KMMessagePart *msgPart = new KMMessagePart;
+ msgPart->setName( "cal.ics" );
+ // msgPart->setCteStr( attachCte ); // "base64" ?
+ msgPart->setBodyEncoded( iCal.utf8() );
+ msgPart->setTypeStr( "text" );
+ msgPart->setSubtypeStr( "calendar" );
+ msgPart->setParameter( "method", "reply" );
+ cWin->addAttach( msgPart );
+ } else {
+ msg->setHeaderField( "Content-Type",
+ "text/calendar; method=reply; charset=\"utf-8\"" );
+ msg->setBody( iCal.utf8() );
+ }
+
if ( options.readBoolEntry( "AutomaticSending", true ) ) {
cWin->setAutoDeleteWindow( true );
cWin->slotSendNow();
--- branches/kdepim/enterprise/kdepim/kmail/configuredialog.cpp #759152:759153
@@ -4830,6 +4830,14 @@
this, SLOT( slotLegacyBodyInvitesToggled( bool ) ) );
connect( mLegacyBodyInvites, SIGNAL( stateChanged( int ) ),
this, SLOT( slotEmitChanged( void ) ) );
+
+ mExchangeCompatibleInvitations = new QCheckBox( i18n( "Exchange compatible \
invitation naming" ), gBox ); + QToolTip::add( mExchangeCompatibleInvitations, i18n( \
"Microsoft Outlook, when used in combination with a Microsoft Exchange server, has a \
problem understanding standards-compliant groupware e-mail. Turn this option on to \
send groupware invitations in a way that Microsoft Exchange understands." ) ); + \
QWhatsThis::add( mExchangeCompatibleInvitations, i18n( GlobalSettings::self()-> + \
exchangeCompatibleInvitationsItem()->whatsThis().utf8() ) ); + connect( \
mExchangeCompatibleInvitations, SIGNAL( stateChanged( int ) ), + this, \
SLOT( slotEmitChanged( void ) ) ); +
mAutomaticSending = new QCheckBox( i18n( "Automatic invitation sending" ), gBox );
QToolTip::add( mAutomaticSending, i18n( "When this is on, the user will not see \
the mail composer window. Invitation mails are sent automatically" ) ); \
QWhatsThis::add( mAutomaticSending, i18n( GlobalSettings::self()-> @@ -4864,15 \
+4872,19 @@ }
void MiscPage::GroupwareTab::doLoadFromGlobalSettings() {
- // Read the groupware config
if ( mEnableGwCB ) {
mEnableGwCB->setChecked( GlobalSettings::self()->groupwareEnabled() );
gBox->setEnabled( mEnableGwCB->isChecked() );
}
+
mLegacyMangleFromTo->setChecked( \
GlobalSettings::self()->legacyMangleFromToHeaders() ); \
mLegacyBodyInvites->blockSignals( true ); +
mLegacyBodyInvites->setChecked( GlobalSettings::self()->legacyBodyInvites() );
mLegacyBodyInvites->blockSignals( false );
+
+ mExchangeCompatibleInvitations->setChecked( \
GlobalSettings::self()->exchangeCompatibleInvitations() ); +
mAutomaticSending->setChecked( GlobalSettings::self()->automaticSending() );
mAutomaticSending->setEnabled( !mLegacyBodyInvites->isChecked() );
@@ -4926,11 +4938,23 @@
}
void MiscPage::GroupwareTab::save() {
+ KConfigGroup groupware( KMKernel::config(), "Groupware" );
+
// Write the groupware config
- if ( mEnableGwCB )
+ if ( mEnableGwCB ) {
+ groupware.writeEntry( "GroupwareEnabled", mEnableGwCB->isChecked() );
+ }
+ groupware.writeEntry( "LegacyMangleFromToHeaders", \
mLegacyMangleFromTo->isChecked() ); + groupware.writeEntry( "LegacyBodyInvites", \
mLegacyBodyInvites->isChecked() ); + groupware.writeEntry( \
"ExchangeCompatibleInvitations", mExchangeCompatibleInvitations->isChecked() ); + \
groupware.writeEntry( "AutomaticSending", mAutomaticSending->isChecked() ); +
+ if ( mEnableGwCB ) {
GlobalSettings::self()->setGroupwareEnabled( mEnableGwCB->isChecked() );
+ }
GlobalSettings::self()->setLegacyMangleFromToHeaders( \
mLegacyMangleFromTo->isChecked() ); GlobalSettings::self()->setLegacyBodyInvites( \
mLegacyBodyInvites->isChecked() ); + \
GlobalSettings::self()->setExchangeCompatibleInvitations( \
mExchangeCompatibleInvitations->isChecked() ); \
GlobalSettings::self()->setAutomaticSending( mAutomaticSending->isChecked() );
int format = mStorageFormatCombo->currentItem();
--- branches/kdepim/enterprise/kdepim/kmail/configuredialog_p.h #759152:759153
@@ -1017,6 +1017,7 @@
QCheckBox* mLegacyMangleFromTo;
QCheckBox* mLegacyBodyInvites;
+ QCheckBox* mExchangeCompatibleInvitations;
QCheckBox* mAutomaticSending;
};
--- branches/kdepim/enterprise/kdepim/kmail/kmail.kcfg #759152:759153
@@ -178,6 +178,12 @@
<default>false</default>
</entry>
+ <entry name="ExchangeCompatibleInvitations" type="Bool">
+ <label>Exchange compatible invitations naming</label>
+ <whatsthis>Microsoft Outlook, when used in combination with a Microsoft \
Exchange server, has a problem understanding standards-compliant groupware e-mail. \
Turn this option on to send groupware invitations in a way that Microsoft Exchange \
understands.</whatsthis> + <default>false</default>
+ </entry>
+
<entry name="AutomaticSending" type="Bool">
<label>Automatic invitation sending</label>
<whatsthis>When this is checked, you will not see the mail composer window. \
Instead, all invitation mails are sent automatically. If you want to see the mail \
before sending it, you can uncheck this option. However, be aware that the text in \
the composer window is in iCalendar syntax, and you should not try modifying it by \
hand.</whatsthis>
--- branches/kdepim/enterprise/kdepim/kmail/kmkernel.cpp #759152:759153
@@ -531,14 +531,16 @@
msgPart->setTypeStr( attachType );
msgPart->setSubtypeStr( attachSubType );
msgPart->setParameter( attachParamAttr, attachParamValue );
- msgPart->setContentDisposition( attachContDisp );
+ if( ! GlobalSettings::self()->exchangeCompatibleInvitations() ) {
+ msgPart->setContentDisposition( attachContDisp );
+ }
if( !attachCharset.isEmpty() ) {
// kdDebug(5006) << "KMKernel::openComposer set attachCharset to "
// << attachCharset << endl;
msgPart->setCharset( attachCharset );
}
// Don't show the composer window, if the automatic sending is checked
- KConfigGroup options( config(), "Groupware" );
+ KConfigGroup options( config(), "Groupware" );
iCalAutoSend = options.readBoolEntry( "AutomaticSending", true );
}
}
--- branches/kdepim/enterprise/kdepim/korganizer/komailclient.cpp #759152:759153
@@ -62,7 +62,7 @@
for(uint i=0; i<attendees.count();++i) {
const QString email = (*attendees.at(i))->email();
// In case we (as one of our identities) are the organizer we are sending this
- // mail. We could also have added ourselves as an attendee, in which case we
+ // mail. We could also have added ourselves as an attendee, in which case we
// don't want to send ourselves a notification mail.
if( organizerEmail != email )
toList << email;
@@ -198,7 +198,7 @@
idx = attachment.find(':',idx)+1;
const int newline = attachment.find('\n',idx);
meth = attachment.mid(idx, newline - idx - 1);
- meth = meth.lower();
+ meth = meth.lower().stripWhiteSpace();
} else {
meth = "publish";
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic