summaryrefslogtreecommitdiffabout
path: root/kaddressbook/mainembedded.cpp
Side-by-side diff
Diffstat (limited to 'kaddressbook/mainembedded.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/mainembedded.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index 10b1013..965fb06 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -6,24 +6,25 @@
#include <qwindowsstyle.h>
#include <qplatinumstyle.h>
#include <qmainwindow.h>
#endif
#include <kstandarddirs.h>
#include <qregexp.h>
#include <kglobal.h>
#include <stdio.h>
#include <qdir.h>
#include "kaddressbookmain.h"
#include "externalapphandler.h"
+#include <libkdepim/kpimglobalprefs.h>
int main( int argc, char **argv )
{
#ifndef DESKTOP_VERSION
QPEApplication a( argc, argv );
a.setKeepRunning ();
#else
QApplication a( argc, argv );
QApplication::setStyle( new QPlatinumStyle ());
QString hdir = QDir::homeDirPath();
// there is a bug when creating dirs for WIN 98
// it is difficult to fix, because we have no WIN 98 runnung
@@ -64,37 +65,25 @@ int main( int argc, char **argv )
QString fileName ;
fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons22/";
KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
QApplication::addLibraryPath ( qApp->applicationDirPath () );
#endif
KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook")));
KAddressBookMain m ;
//US MainWindow m;
QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
{
- 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)") );
+ KPimGlobalPrefs::instance()->setGlobalConfig();
}
#ifndef DESKTOP_VERSION
a.showMainWidget( &m );
#else
a.setMainWidget( &m );
m.resize (640, 480 );
m.show();
#endif
a.exec();
}
qDebug("KA: Bye! ");