summaryrefslogtreecommitdiffabout
path: root/kmicromail
authorzautrix <zautrix>2004-09-22 03:08:05 (UTC)
committer zautrix <zautrix>2004-09-22 03:08:05 (UTC)
commitd63eac7a612a9724705bc58ad98c65c6ac052d07 (patch) (side-by-side diff)
treedc584a0ddcbd5f828ea36b86b6af640e46e137f2 /kmicromail
parent633522024e48efc423155a04b71083a03696211d (diff)
downloadkdepimpi-d63eac7a612a9724705bc58ad98c65c6ac052d07.zip
kdepimpi-d63eac7a612a9724705bc58ad98c65c6ac052d07.tar.gz
kdepimpi-d63eac7a612a9724705bc58ad98c65c6ac052d07.tar.bz2
connected global config
Diffstat (limited to 'kmicromail') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/genericwrapper.cpp18
-rw-r--r--kmicromail/opiemail.cpp2
2 files changed, 2 insertions, 18 deletions
diff --git a/kmicromail/libmailwrapper/genericwrapper.cpp b/kmicromail/libmailwrapper/genericwrapper.cpp
index 09a6447..e691082 100644
--- a/kmicromail/libmailwrapper/genericwrapper.cpp
+++ b/kmicromail/libmailwrapper/genericwrapper.cpp
@@ -24,35 +24,17 @@ Genericwrapper::~Genericwrapper()
}
if (m_storage) {
mailstorage_free(m_storage);
}
cleanMimeCache();
}
const QDateTime Genericwrapper::parseDateTime( mailimf_date_time *date )
{
- static bool init = false ;
- if ( ! init ) {
- KConfig kon ( locateLocal( "config", "korganizerrc" ) );
- kon.setGroup("Locale");
- KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)kon.readNumEntry( "PreferredDate",0) );
- QString dummy = kon.readEntry( "UserDateFormatShort","%aK %d.%m.%y" );// kon.readEntry( "");
- KGlobal::locale()->setHore24Format( !kon.readNumEntry( "PreferredTime",0 ) );
- KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") ));
- dummy = kon.readEntry( "UserDateFormatLong","%A %d %b %y" );
- KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") ));
- kon.setGroup("Time & Date");
- KGlobal::locale()->setDaylightSaving( kon.readBoolEntry( "UseDaylightsaving", true ),
- kon.readNumEntry( "DaylightsavingStart", 90),
- kon.readNumEntry( "DaylightsavingEnd",304) );
- KGlobal::locale()->setTimezone( kon.readEntry( "TimeZoneName" ," 00:00 Europe/London(UTC)") );
-
- init = true;
- }
QDate da (date->dt_year,date->dt_month, date->dt_day );
QTime ti ( date->dt_hour, date->dt_min, date->dt_sec );
QDateTime dt ( da ,ti );
int addsec = -date->dt_zone*36;
//qDebug("adsec1 %d ",addsec );
dt = dt.addSecs( addsec );
int off = KGlobal::locale()->localTimeOffset( dt );
//qDebug("adsec2 %d ",off*60 );
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index 9a1a750..164988c 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -10,16 +10,17 @@
#include "selectstore.h"
#include "selectsmtp.h"
#include "accountitem.h"
#include "koprefsdialog.h"
#include <qmessagebox.h>
#include <qtimer.h>
#include <libkdepim/externalapphandler.h>
+#include <libkdepim/kpimglobalprefs.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>
@@ -27,16 +28,17 @@
/* QT */
//using namespace Opie::Core;
OpieMail::OpieMail( QWidget *parent, const char *name )
: MainWindow( parent, name) //, WStyle_ContextHelp )
{
settings = new Settings();
+ KPimGlobalPrefs::instance()->setGlobalConfig();
folderView->populate( settings->getAccounts() );
}
OpieMail::~OpieMail()
{
if (settings) delete settings;