summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/composemail.cpp4
-rw-r--r--kmicromail/composemail.h4
-rw-r--r--kmicromail/opiemail.cpp8
-rw-r--r--kmicromail/opiemail.h4
4 files changed, 10 insertions, 10 deletions
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp
index 14feeee..01dd406 100644
--- a/kmicromail/composemail.cpp
+++ b/kmicromail/composemail.cpp
@@ -9,66 +9,66 @@
/* OPIE */
//#include <opie2/ofiledialog.h>
//#include <opie2/odebug.h>
#include <kfiledialog.h>
//#include <qpe/resource.h>
#include <qpe/config.h>
#include <qpe/global.h>
//#include <qpe/contact.h>
#include <qcombobox.h>
#include <qcheckbox.h>
#include <qtimer.h>
#include <qmessagebox.h>
#include <qpushbutton.h>
#include <qmultilineedit.h>
#include <qlabel.h>
#include <qtabwidget.h>
#include <qlistview.h>
#include <kabc/addresseedialog.h>
#include <kabc/stdaddressbook.h>
#include <kabc/addressee.h>
#ifdef DESKTOP_VERSION
#include <kabc/addresseedialog.h>
#else //DESKTOP_VERSION
#include <libkdepim/externalapphandler.h>
#endif //DESKTOP_VERSION
//using namespace Opie::Core;
//using namespace Opie::Ui;
-ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags )
- : ComposeMailUI( parent, name, modal, flags )
+ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal )
+ : ComposeMailUI( parent, name, modal )
{
mPickLineEdit = 0;
connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)),
this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&)));
settings = s;
m_replyid = "";
KConfig config( locateLocal("config", "kabcrc") );
config.setGroup( "General" );
QString whoami_uid = config.readEntry( "WhoAmI" );
if ( whoami_uid.isEmpty() ) {
QMessageBox::information( 0, tr( "Hint" ),
tr( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ),
tr( "Ok" ) );
} else
bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI("", "sendbacklist", whoami_uid);
#ifdef DESKTOP_VERSION
KABC::Addressee con = KABC::StdAddressBook::self()->whoAmI( );
QStringList mails = con.emails();
QString defmail = con.preferredEmail();
if ( mails.count() == 0)
QMessageBox::information( 0, tr( "Hint" ),
tr( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ),
tr( "Ok" ) );
if (defmail.length()!=0) {
fromBox->insertItem(defmail);
}
QStringList::ConstIterator sit = mails.begin();
for (;sit!=mails.end();++sit) {
if ( (*sit)==defmail)
continue;
diff --git a/kmicromail/composemail.h b/kmicromail/composemail.h
index 657f665..e20d9e1 100644
--- a/kmicromail/composemail.h
+++ b/kmicromail/composemail.h
@@ -1,70 +1,70 @@
#ifndef COMPOSEMAIL_H
#define COMPOSEMAIL_H
#include <qlineedit.h>
#include <qlistview.h>
#include "composemailui.h"
//#include "addresspickerui.h"
#include <libmailwrapper/settings.h>
#include <libmailwrapper/mailwrapper.h>
class RecMail;
#include <opie2/osmartpointer.h>
#if 0
class AddressPicker : public AddressPickerUI
{
//Q_OBJECT
public:
- AddressPicker( QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags flags = 0 );
+ AddressPicker( QWidget *parent = 0, const char *name = 0, bool modal = false );
static QString getNames();
protected:
QString selectedNames;
void accept();
};
#endif
class RecMail;
class ComposeMail : public ComposeMailUI
{
Q_OBJECT
public:
- ComposeMail( Settings *s, QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags flags = 0 );
+ ComposeMail( Settings *s, QWidget *parent = 0, const char *name = 0, bool modal = false );
virtual ~ComposeMail();
void reEditMail(const Opie::Core::OSmartPointer<RecMail>&current);
public slots:
void slotAdjustColumns();
void setTo( const QString & to );
void setSubject( const QString & subject );
void setInReplyTo( const QString & messageId );
void setMessage( const QString & text );
void insertAttendees(const QString&, const QStringList& namelist, const QStringList& emaillist, const QStringList& uidlist);
protected slots:
void accept();
void reject();
private slots:
void fillValues( int current );
void pickAddress();
void pickAddressTo();
void pickAddressCC();
void pickAddressBCC();
void pickAddressReply();
void saveAsDraft();
void addAttachment();
void removeAttachment();
void clearStatus();
void setStatus( QString );
protected:
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index a1c5645..0c581c0 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -1,60 +1,60 @@
// CHANGED 2004-09-31 Lutz Rogowski
// CHANGED 2004-08-06 Lutz Rogowski
#include "settingsdialog.h"
#include "opiemail.h"
#include "editaccounts.h"
#include "composemail.h"
#include "mailistviewitem.h"
#include "viewmail.h"
#include "selectstore.h"
#include "selectsmtp.h"
#include <qmessagebox.h>
#include <libkdepim/externalapphandler.h>
#include <qpe/qpeapplication.h>
#include <libmailwrapper/smtpwrapper.h>
#include <libmailwrapper/mailtypes.h>
#include <libmailwrapper/abstractmail.h>
/* OPIE */
//#include <qpe/resource.h>
//#include <qpe/qpeapplication.h>
/* QT */
-using namespace Opie::Core;
+//using namespace Opie::Core;
-OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags )
+OpieMail::OpieMail( QWidget *parent, const char *name )
: MainWindow( parent, name) //, WStyle_ContextHelp )
{
settings = new Settings();
folderView->populate( settings->getAccounts() );
}
OpieMail::~OpieMail()
{
if (settings) delete settings;
}
void OpieMail::appMessage(const QCString &msg, const QByteArray &data)
{
}
#include <stdlib.h>
void OpieMail::message(const QCString &msg, const QByteArray &data)
{
// copied from old mail2
static int ii = 0;
qDebug("call ############################# %d ", ii);
// block second call
if ( ii < 2 ) {
//++ii;
if ( ii > 1 ) {
qDebug("qcop call blocked ");
//return;
}
}
++ii;
@@ -84,65 +84,65 @@ void OpieMail::message(const QCString &msg, const QByteArray &data)
} else
ExternalAppHandler::instance()->appMessage ( msg, data);
}
void OpieMail::slotwriteMail2(const QString& namemail )
{
// qDebug("OpieMail::slotwriteMail2 ");
qApp->processEvents();
ComposeMail compose( settings, this, 0, true );
if ( !namemail.isEmpty() ) {
QString to = namemail;
if ( namemail.find( " <") > 1 ) {
to = "\"" +to.replace( QRegExp( " <"), "\" <") ;
} else
if ( namemail.find( "<") > 1 ) {
to = "\"" +to.replace( QRegExp( "<"), "\" <") ;
}
int sub = to.find( ">:");
if ( sub > 0 ) {
compose.setTo( to.left(sub+1) );
compose.setSubject( to.mid(sub+2) );
} else
compose.setTo( to );
}
compose.slotAdjustColumns();
compose.showMaximized();
compose.exec();
raise();
//qDebug("retttich ");
}
void OpieMail::slotwriteMail(const QString&name,const QString&email)
{
// qDebug("OpieMail::slotwriteMail ");
- ComposeMail compose( settings, this, 0, true , WStyle_ContextHelp );
+ ComposeMail compose( settings, this, 0, true );
if (!email.isEmpty())
{
if (!name.isEmpty())
{
compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">");
}
else
{
compose.setTo(email);
}
}
compose.slotAdjustColumns();
compose.showMaximized();
compose.exec();
}
void OpieMail::slotComposeMail()
{
slotwriteMail2( QString () );
//slotwriteMail(0l,0l);
}
void OpieMail::slotSendQueued()
{
SMTPaccount *smtp = 0;
QList<Account> list = settings->getAccounts();
QList<SMTPaccount> smtpList;
smtpList.setAutoDelete(false);
Account *it;
for ( it = list.first(); it; it = list.next() )
{
@@ -388,38 +388,38 @@ void OpieMail::slotMoveCopyAllMail()
if ( t.count() == 0 )
return;
RecMailP mail = t.first();
AbstractMail*targetMail = 0;
QString targetFolder = "";
Selectstore sels;
folderView->setupFolderselect(&sels);
if (!sels.exec()) return;
targetMail = sels.currentMail();
targetFolder = sels.currentFolder();
if ( (mail->Wrapper()==targetMail && mail->getMbox()==targetFolder) ||
targetFolder.isEmpty())
{
return;
}
if (sels.newFolder() && !targetMail->createMbox(targetFolder))
{
QMessageBox::critical(0,tr("Error creating new Folder"),
tr("<center>Error while creating<br>new folder - breaking.</center>"));
return;
}
sels.hide();
qApp->processEvents();
//qDebug("hiding sels ");
mail->Wrapper()->mvcpMailList(t,targetFolder,targetMail,sels.moveMails());
folderView->refreshCurrent();
}
void OpieMail::reEditMail()
{
if (!mailView->currentItem()) return;
- ComposeMail compose( settings, this, 0, true , WStyle_ContextHelp );
+ ComposeMail compose( settings, this, 0, true );
compose.reEditMail(((MailListViewItem*)mailView->currentItem() )->data());
compose.slotAdjustColumns();
compose.showMaximized();
compose.exec();
}
diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h
index 934f232..7434e59 100644
--- a/kmicromail/opiemail.h
+++ b/kmicromail/opiemail.h
@@ -1,48 +1,48 @@
// CHANGED 2004-09-31 Lutz Rogowski
#ifndef OPIEMAIL_H
#define OPIEMAIL_H
#include "mainwindow.h"
#include <libmailwrapper/settings.h>
#include <opie2/osmartpointer.h>
#include <libmailwrapper/mailtypes.h>
class OpieMail : public MainWindow
{
Q_OBJECT
public:
- OpieMail( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 );
+ OpieMail( QWidget *parent = 0, const char *name = 0 );
virtual ~OpieMail();
- static QString appName() { return QString::fromLatin1("opiemail"); }
+ static QString appName() { return QString::fromLatin1("kopiemail"); }
public slots:
virtual void slotwriteMail(const QString&name,const QString&email);
virtual void slotwriteMail2(const QString&nameemail);
virtual void slotComposeMail();
virtual void appMessage(const QCString &msg, const QByteArray &data);
virtual void message(const QCString &msg, const QByteArray &data);
protected slots:
virtual void slotSendQueued();
virtual void slotSearchMails();
virtual void slotEditSettings();
virtual void slotEditAccounts();
virtual void displayMail();
virtual void slotDeleteMail();
virtual void slotDeleteAllMail();
virtual void mailHold(int, QListViewItem *,const QPoint&,int);
virtual void slotShowFolders( bool show );
virtual void refreshMailView(const QValueList<RecMailP>&);
virtual void mailLeftClicked( QListViewItem * );
virtual void slotMoveCopyMail();
virtual void slotMoveCopyAllMail();
virtual void reEditMail();
void clearSelection();
private:
Settings *settings;
};
#endif