summaryrefslogtreecommitdiffabout
path: root/kmicromail/composemail.cpp
Side-by-side diff
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
@@ -13,5 +13,4 @@
#include <kfiledialog.h>
//#include <qpe/resource.h>
-#include <qpe/config.h>
#include <qpe/global.h>
//#include <qpe/contact.h>
@@ -36,4 +35,5 @@
#endif //DESKTOP_VERSION
+#include "koprefs.h"
//using namespace Opie::Core;
@@ -42,5 +42,4 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
: ComposeMailUI( parent, name, modal )
{
-
mPickLineEdit = 0;
connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)),
@@ -48,4 +47,5 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
settings = s;
m_replyid = "";
+ if ( KOPrefs::instance()->mUseKapi) {
KConfig config( locateLocal("config", "kabcrc") );
config.setGroup( "General" );
@@ -57,4 +57,6 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
tr( "Ok" ) );
+
+ fillSettings();
} else
ExternalAppHandler::instance()->requestDetailsFromKAPI("", "sendbacklist", whoami_uid);
@@ -80,7 +82,9 @@ 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" ) );
@@ -88,4 +92,6 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
QList<Account> accounts = settings->getAccounts();
+ if ( QApplication::desktop()->width() < 320 )
+ smtpAccountBox->setMaximumWidth( 80 );
Account *it;
for ( it = accounts.first(); it; it = accounts.next() ) {
@@ -114,7 +120,19 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
}
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);
+}