--msg option wasn't working, now it does.

svn path=/trunk/kdenetwork/kmail/; revision=59362
wilder-work
Don Sanders 26 years ago
parent 4bd29b8532
commit d24d427907
  1. 4
      kmailIface.h
  2. 18
      kmkernel.cpp
  3. 4
      kmkernel.h
  4. 2
      kmversion.h
  5. 6
      main.cpp

@ -20,9 +20,9 @@ class KMailIface : virtual public DCOPObject
k_dcop:
virtual void checkMail() = 0;
virtual void openReader(KURL messageFile) = 0;
virtual void openReader() = 0;
virtual int openComposer(QString to, QString cc, QString bcc, QString subject,
int hidden) = 0;
int hidden, KURL messageFile) = 0;
virtual int send(int composerId, int how) = 0; //0=default,1=now,2=later
virtual int addAttachment(int composerId, KURL url,
QString comment) = 0;

@ -29,6 +29,7 @@
#include "kmacctmgr.h"
#include "kbusyptr.h"
#include "kmaddrbook.h"
#include "kfileio.h"
#include <kabapi.h>
#include <kwin.h>
@ -68,7 +69,7 @@ void KMKernel::checkMail () //might create a new reader but won
mWin->slotCheckMail();
}
void KMKernel::openReader( KURL /*messageFile*/)
void KMKernel::openReader()
{
#warning Ugly hack! (sven)
KMMainWin *mWin = 0;
@ -87,14 +88,11 @@ void KMKernel::openReader( KURL /*messageFile*/)
mWin = new KMMainWin;
mWin->show();
KWin::setActiveWindow(mWin->winId());
//and "Activate" by kwin?
//if (!messageFile.isEmpty())
// mWin->viewMessage(messageFile);
}
int KMKernel::openComposer (QString to, QString cc,
QString bcc, QString subject, int hidden)
QString bcc, QString subject, int hidden,
KURL messageFile )
{
debug ("KMKernel::openComposer called");
@ -105,10 +103,12 @@ int KMKernel::openComposer (QString to, QString cc,
if (!subject.isEmpty()) msg->setSubject(subject);
if (!to.isEmpty()) msg->setTo(to);
if (!messageFile.isEmpty() && messageFile.isLocalFile())
msg->setBody( kFileToString( messageFile.path(), true, false ) );
KMComposeWin *cWin = new KMComposeWin(msg);
if (hidden == 0)
cWin->show();
//return cWin->composerId()
return 1;
}
@ -508,9 +508,9 @@ void KMKernel::action(bool mailto, bool check, QString to, QString cc,
{
if (mailto)
openComposer (to, cc, bcc, subj, 0);
openComposer (to, cc, bcc, subj, 0, messageFile);
else
openReader(messageFile);
openReader();
if (check)
checkMail();

@ -37,8 +37,8 @@ public:
void checkMail ();
//returns id of composer if more are opened
int openComposer (QString to, QString cc, QString bcc, QString subject,
int hidden);
void openReader(KURL messageFile);
int hidden, KURL messageFile);
void openReader();
int ready();
int send(int composerId, int how); //0=now, 1=later
int addAttachment(int composerId, KURL url, QString comment);

@ -3,6 +3,6 @@
#ifndef kmversion_h
#define kmversion_h
#define KMAIL_VERSION "1.1.61"
#define KMAIL_VERSION "1.1.62"
#endif /*kmversion_h*/

@ -154,6 +154,12 @@ int KMailApplication::newInstance()
bcc = args->getOption("bcc");
}
if (args->getOption("msg"))
{
mailto = true;
messageFile = QString::fromLocal8Bit(args->getOption("msg"));
}
if (args->isSet("composer"))
mailto = true;

Loading…
Cancel
Save