kitchensync
main.cpp00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include <kdebug.h>
00024 #include <kaboutdata.h>
00025 #include <kcmdlineargs.h>
00026 #include <kuniqueapplication.h>
00027 #include <klocale.h>
00028 #include <stdlib.h>
00029
00030 #include <mainwindow.h>
00031
00032 #include "splash.h"
00033 #include "aboutdata.h"
00034
00035 static KCmdLineOptions options[] =
00036 {
00037 KCmdLineLastOption
00038 };
00039
00040 int main( int argc, char *argv[] )
00041 {
00042 KSync::AboutData aboutData;
00043
00044 KCmdLineArgs::init( argc, argv, &aboutData );
00045 KCmdLineArgs::addCmdLineOptions( options );
00046 KUniqueApplication::addCmdLineOptions();
00047
00048 KUniqueApplication::addCmdLineOptions();
00049
00050 if( !KUniqueApplication::start() ) {
00051 kdDebug(5210) << "KitchenSync already runs." << endl;
00052 exit( 0 );
00053 };
00054
00055 KUniqueApplication a;
00056
00057
00058
00059
00060 KGlobal::locale()->insertCatalogue( "libkcal" );
00061 KGlobal::locale()->insertCatalogue( "libkitchensync" );
00062
00063
00064
00065 KSync::Splash *splash = new KSync::Splash;
00066 KSync::MainWindow *mainwindow = new KSync::MainWindow;
00067 delete splash;
00068 mainwindow->show();
00069 kdDebug(5210) << "exec now " << endl;
00070 a.exec();
00071 }
|