korganizer/korgac
korgacmain.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "koalarmclient.h"
00026
00027 #include <kdebug.h>
00028 #include <klocale.h>
00029 #include <kcmdlineargs.h>
00030 #include <kaboutdata.h>
00031 #include <kuniqueapplication.h>
00032
00033 #include <stdlib.h>
00034
00035 class ReminderDaemonApp : public KUniqueApplication
00036 {
00037 public:
00038 ReminderDaemonApp() : mClient( 0 )
00039 {
00040
00041 setQuitOnLastWindowClosed( false );
00042 }
00043
00044 int newInstance()
00045 {
00046
00047 if ( mClient ) {
00048 return 0;
00049 }
00050
00051 mClient = new KOAlarmClient;
00052
00053 return 0;
00054 }
00055
00056 private:
00057 KOAlarmClient *mClient;
00058 };
00059
00060 static const char korgacVersion[] = "0.9";
00061
00062 int main( int argc, char **argv )
00063 {
00064 KLocale::setMainCatalog( "korganizer" );
00065 KAboutData aboutData( "korgac", 0, ki18n( "KOrganizer Reminder Daemon" ),
00066 korgacVersion, ki18n( "KOrganizer Reminder Daemon" ),
00067 KAboutData::License_GPL,
00068 ki18n( "(c) 2003 Cornelius Schumacher" ),
00069 KLocalizedString(), "http://pim.kde.org" );
00070 aboutData.addAuthor( ki18n( "Cornelius Schumacher" ), ki18n( "Former Maintainer" ),
00071 "schumacher@kde.org" );
00072 aboutData.addAuthor( ki18n( "Reinhold Kainhofer" ), ki18n ( "Former Maintainer" ),
00073 "kainhofer@kde.org" );
00074 aboutData.addAuthor( ki18n( "Allen Winter" ),ki18n( "Janitorial Staff" ),
00075 "winter@kde.org" );
00076
00077 KCmdLineArgs::init( argc, argv, &aboutData );
00078
00079 KCmdLineOptions options;
00080 KCmdLineArgs::addCmdLineOptions( options );
00081 KUniqueApplication::addCmdLineOptions();
00082
00083 if ( !ReminderDaemonApp::start() ) {
00084 exit( 0 );
00085 }
00086
00087 ReminderDaemonApp app;
00088 app.disableSessionManagement();
00089
00090 return app.exec();
00091 }