Diffstat (limited to 'kaddressbook/mainembedded.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/mainembedded.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp index 4f48850..10b1013 100644 --- a/kaddressbook/mainembedded.cpp +++ b/kaddressbook/mainembedded.cpp | |||
@@ -48,65 +48,65 @@ int main( int argc, char **argv ) | |||
48 | printf("KA/E command line commands:\n"); | 48 | printf("KA/E command line commands:\n"); |
49 | printf(" no command: Start KA/E in usual way\n"); | 49 | printf(" no command: Start KA/E in usual way\n"); |
50 | printf(" -help: This output\n"); | 50 | printf(" -help: This output\n"); |
51 | printf(" KA/E is exiting now. Bye!\n"); | 51 | printf(" KA/E is exiting now. Bye!\n"); |
52 | exitHelp = true; | 52 | exitHelp = true; |
53 | } | 53 | } |
54 | } | 54 | } |
55 | if ( ! exitHelp ) { | 55 | if ( ! exitHelp ) { |
56 | 56 | ||
57 | KGlobal::setAppName( "kaddressbook" ); | 57 | KGlobal::setAppName( "kaddressbook" ); |
58 | #ifndef DESKTOP_VERSION | 58 | #ifndef DESKTOP_VERSION |
59 | if ( QApplication::desktop()->width() > 320 ) | 59 | if ( QApplication::desktop()->width() > 320 ) |
60 | KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons22/"); | 60 | KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons22/"); |
61 | else | 61 | else |
62 | KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/"); | 62 | KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/"); |
63 | #else | 63 | #else |
64 | QString fileName ; | 64 | QString fileName ; |
65 | fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons22/"; | 65 | fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons22/"; |
66 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); | 66 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); |
67 | QApplication::addLibraryPath ( qApp->applicationDirPath () ); | 67 | QApplication::addLibraryPath ( qApp->applicationDirPath () ); |
68 | 68 | ||
69 | #endif | 69 | #endif |
70 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); | 70 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); |
71 | KAddressBookMain m ; | 71 | KAddressBookMain m ; |
72 | //US MainWindow m; | 72 | //US MainWindow m; |
73 | QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); | 73 | QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); |
74 | 74 | ||
75 | { | 75 | { |
76 | KConfig kon ( locateLocal( "config", "korganizerrc" ) ); | 76 | KConfig kon ( locateLocal( "config", "korganizerrc" ) ); |
77 | kon.setGroup("Locale"); | 77 | kon.setGroup("Locale"); |
78 | KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)kon.readNumEntry( "PreferredDate",0) ); | 78 | KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)kon.readNumEntry( "PreferredDate",0) ); |
79 | QString dummy = kon.readEntry( "UserDateFormatShort","%aK %d.%m.%y" );// kon.readEntry( ""); | 79 | QString dummy = kon.readEntry( "UserDateFormatShort","%aK %d.%m.%y" );// kon.readEntry( ""); |
80 | KGlobal::locale()->setHore24Format( !kon.readBoolEntry( "PreferredTime",0 ) ); | 80 | KGlobal::locale()->setHore24Format( !kon.readNumEntry( "PreferredTime",0 ) ); |
81 | KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); | 81 | KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); |
82 | dummy = kon.readEntry( "UserDateFormatLong","%A %d %b %y" ); | 82 | dummy = kon.readEntry( "UserDateFormatLong","%A %d %b %y" ); |
83 | KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); | 83 | KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); |
84 | kon.setGroup("Time & Date"); | 84 | kon.setGroup("Time & Date"); |
85 | KGlobal::locale()->setDaylightSaving( kon.readBoolEntry( "UseDaylightsaving", true ), | 85 | KGlobal::locale()->setDaylightSaving( kon.readBoolEntry( "UseDaylightsaving", true ), |
86 | kon.readNumEntry( "DaylightsavingStart", 90), | 86 | kon.readNumEntry( "DaylightsavingStart", 90), |
87 | kon.readNumEntry( "DaylightsavingEnd",304) ); | 87 | kon.readNumEntry( "DaylightsavingEnd",304) ); |
88 | KGlobal::locale()->setTimezone( kon.readEntry( "TimeZoneName" ," 00:00 Europe/London(UTC)") ); | 88 | KGlobal::locale()->setTimezone( kon.readEntry( "TimeZoneName" ," 00:00 Europe/London(UTC)") ); |
89 | } | 89 | } |
90 | #ifndef DESKTOP_VERSION | 90 | #ifndef DESKTOP_VERSION |
91 | a.showMainWidget( &m ); | 91 | a.showMainWidget( &m ); |
92 | #else | 92 | #else |
93 | a.setMainWidget( &m ); | 93 | a.setMainWidget( &m ); |
94 | m.resize (640, 480 ); | 94 | m.resize (640, 480 ); |
95 | m.show(); | 95 | m.show(); |
96 | #endif | 96 | #endif |
97 | a.exec(); | 97 | a.exec(); |
98 | 98 | ||
99 | } | 99 | } |
100 | qDebug("KA: Bye! "); | 100 | qDebug("KA: Bye! "); |
101 | } | 101 | } |
102 | 102 | ||
103 | /* | 103 | /* |
104 | #include <stdlib.h> | 104 | #include <stdlib.h> |
105 | 105 | ||
106 | #include <qstring.h> | 106 | #include <qstring.h> |
107 | 107 | ||
108 | #include <kabc/stdaddressbook.h> | 108 | #include <kabc/stdaddressbook.h> |
109 | #include <kaboutdata.h> | 109 | #include <kaboutdata.h> |
110 | #include <kcmdlineargs.h> | 110 | #include <kcmdlineargs.h> |
111 | #include <kcrash.h> | 111 | #include <kcrash.h> |
112 | #include <kdebug.h> | 112 | #include <kdebug.h> |