Extend the openComposer() DCOP method by an identity parameter and use

that in KOrganizer to send invitations from the identity that was used
as organizer instead of the default identity.

Kolab issue 2830

svn path=/branches/kdepim/enterprise/kdepim/; revision=861999
wilder-work
Volker Krause 18 years ago
parent 61af22fdc8
commit 0fb5214ec1
  1. 15
      kmailIface.h
  2. 22
      kmkernel.cpp
  3. 17
      kmkernel.h

@ -60,6 +60,19 @@ k_dcop:
const QString &attachParamValue,
const QCString &attachContDisp,
const QCString &attachCharset) = 0;
virtual int openComposer (const QString &to, const QString &cc,
const QString &bcc, const QString &subject,
const QString &body, int hidden,
const QString &attachName,
const QCString &attachCte,
const QCString &attachData,
const QCString &attachType,
const QCString &attachSubType,
const QCString &attachParamAttr,
const QString &attachParamValue,
const QCString &attachContDisp,
const QCString &attachCharset,
uint identity) = 0;
/** Open composer and return reference to DCOP interface of composer window.
If hidden is true, the window will not be shown. If you use that option,
it's your responsibility to call the send() function of the composer in
@ -211,7 +224,7 @@ k_dcop_hidden:
/** Clears the list of added message ids which is used to filter out
duplicates. */
virtual void dcopResetAddMessage() = 0;
virtual void loadProfile( const QString& path ) = 0;
virtual void saveToProfile( const QString& path ) const = 0;
};

@ -484,6 +484,27 @@ int KMKernel::openComposer (const QString &to, const QString &cc,
const QString &attachParamValue,
const QCString &attachContDisp,
const QCString &attachCharset )
{
kdDebug(5006) << "KMKernel::openComposer called (deprecated version)" << endl;
return openComposer ( to, cc, bcc, subject, body, hidden,
attachName, attachCte, attachData,
attachType, attachSubType, attachParamAttr,
attachParamValue, attachContDisp, attachCharset, 0 );
}
int KMKernel::openComposer (const QString &to, const QString &cc,
const QString &bcc, const QString &subject,
const QString &body, int hidden,
const QString &attachName,
const QCString &attachCte,
const QCString &attachData,
const QCString &attachType,
const QCString &attachSubType,
const QCString &attachParamAttr,
const QString &attachParamValue,
const QCString &attachContDisp,
const QCString &attachCharset,
unsigned int identity )
{
kdDebug(5006) << "KMKernel::openComposer()" << endl;
@ -495,6 +516,7 @@ int KMKernel::openComposer (const QString &to, const QString &cc,
if ( !bcc.isEmpty() ) msg->setBcc(bcc);
if ( !subject.isEmpty() ) msg->setSubject(subject);
if ( !to.isEmpty() ) msg->setTo(to);
if ( identity > 0 ) msg->setHeaderField( "X-KMail-Identity", QString::number( identity ) );
if ( !body.isEmpty() ) {
msg->setBody(body.utf8());
} else {

@ -135,6 +135,9 @@ public:
const QString &attachParamValue,
const QCString &attachContDisp);
/** For backward compatibility
* @deprecated
*/
int openComposer (const QString &to, const QString &cc,
const QString &bcc, const QString &subject,
const QString &body, int hidden,
@ -148,6 +151,20 @@ public:
const QCString &attachContDisp,
const QCString &attachCharset);
int openComposer (const QString &to, const QString &cc,
const QString &bcc, const QString &subject,
const QString &body, int hidden,
const QString &attachName,
const QCString &attachCte,
const QCString &attachData,
const QCString &attachType,
const QCString &attachSubType,
const QCString &attachParamAttr,
const QString &attachParamValue,
const QCString &attachContDisp,
const QCString &attachCharset,
unsigned int identity);
DCOPRef openComposer(const QString &to, const QString &cc,
const QString &bcc, const QString &subject,
const QString &body,bool hidden);

Loading…
Cancel
Save