summaryrefslogtreecommitdiffabout
path: root/kmicromail/composemail.cpp
authorzautrix <zautrix>2004-09-15 06:15:59 (UTC)
committer zautrix <zautrix>2004-09-15 06:15:59 (UTC)
commit35b8948c6c203473866c74f1d13185a848454e04 (patch) (side-by-side diff)
treeb6d8eca9863cbca8e24d474d8c895065faa17458 /kmicromail/composemail.cpp
parentf1f43030eefa765950cb501aece6cc71fb4e9859 (diff)
downloadkdepimpi-35b8948c6c203473866c74f1d13185a848454e04.zip
kdepimpi-35b8948c6c203473866c74f1d13185a848454e04.tar.gz
kdepimpi-35b8948c6c203473866c74f1d13185a848454e04.tar.bz2
Mail config added
Diffstat (limited to 'kmicromail/composemail.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/composemail.cpp30
1 files changed, 24 insertions, 6 deletions
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp
index 9b799b3..e6f7daa 100644
--- a/kmicromail/composemail.cpp
+++ b/kmicromail/composemail.cpp
@@ -12,7 +12,6 @@
//#include <opie2/odebug.h>
#include <kfiledialog.h>
//#include <qpe/resource.h>
-#include <qpe/config.h>
#include <qpe/global.h>
//#include <qpe/contact.h>
@@ -35,18 +34,19 @@
#include <libkdepim/externalapphandler.h>
#endif //DESKTOP_VERSION
+#include "koprefs.h"
//using namespace Opie::Core;
//using namespace Opie::Ui;
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 = "";
+ if ( KOPrefs::instance()->mUseKapi) {
KConfig config( locateLocal("config", "kabcrc") );
config.setGroup( "General" );
QString whoami_uid = config.readEntry( "WhoAmI" );
@@ -56,6 +56,8 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
tr( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ),
tr( "Ok" ) );
+
+ fillSettings();
} else
ExternalAppHandler::instance()->requestDetailsFromKAPI("", "sendbacklist", whoami_uid);
@@ -79,14 +81,18 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
}
senderNameEdit->setText(con.formattedName());
#endif
- Config cfg( "mail" );
- cfg.setGroup( "Compose" );
- checkBoxLater->setChecked( cfg.readBoolEntry( "sendLater", false ) );
+
+ } else {
+ fillSettings();
+ }
+ checkBoxLater->setChecked( KOPrefs::instance()->mSendLater );
attList->addColumn( tr( "Name" ) );
attList->addColumn( tr( "Size" ) );
QList<Account> accounts = settings->getAccounts();
+ if ( QApplication::desktop()->width() < 320 )
+ smtpAccountBox->setMaximumWidth( 80 );
Account *it;
for ( it = accounts.first(); it; it = accounts.next() ) {
if ( it->getType()==MAILLIB::A_SMTP ) {
@@ -113,9 +119,21 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
return;
}
connect( smtpAccountBox, SIGNAL( activated(int) ), SLOT( fillValues(int) ) );
-
+ message->setFont ( KOPrefs::instance()->mComposeFont );
}
+void ComposeMail::fillSettings()
+{
+ if ( QApplication::desktop()->width() < 320 )
+ fromBox->setMaximumWidth( 100 );
+ QStringList mailList = QStringList::split(";",KOPrefs::instance()->mEmail);
+ QStringList::ConstIterator sit = mailList.begin();
+ int pref = 0;
+ for (;sit!=mailList.end();++sit) {
+ fromBox->insertItem((*sit));
+ }
+ senderNameEdit->setText(KOPrefs::instance()->mName);
+}
void ComposeMail::saveAsDraft()