KNotify
main.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 #include <kuniqueapplication.h>
00023 #include <kaboutdata.h>
00024 #include <kcmdlineargs.h>
00025 #include <kdebug.h>
00026 #include <kglobal.h>
00027 #include <klocale.h>
00028 #include <kmessage.h>
00029 #include <kpassivepopupmessagehandler.h>
00030 #include <kdefakes.h>
00031
00032 #include "knotify.h"
00033
00034
00035 int main(int argc, char **argv)
00036 {
00037 KAboutData aboutdata("knotify", "knotify4", ki18n("KNotify"),
00038 "4.0", ki18n("KDE Notification Daemon"),
00039 KAboutData::License_GPL, ki18n("(C) 1997-2008, KDE Developers"));
00040 aboutdata.addAuthor(ki18n("Olivier Goffart"),ki18n("Current Maintainer"),"ogoffart@kde.org");
00041 aboutdata.addAuthor(ki18n("Carsten Pfeiffer"),ki18n("Previous Maintainer"),"pfeiffer@kde.org");
00042 aboutdata.addAuthor(ki18n("Christian Esken"),KLocalizedString(),"esken@kde.org");
00043 aboutdata.addAuthor(ki18n("Stefan Westerfeld"),ki18n("Sound support"),"stefan@space.twc.de");
00044 aboutdata.addAuthor(ki18n("Charles Samuels"),ki18n("Previous Maintainer"),"charles@kde.org");
00045 aboutdata.addAuthor(ki18n("Allan Sandfeld Jensen"),ki18n("Porting to KDE 4"),"kde@carewolf.com");
00046
00047 KCmdLineArgs::init( argc, argv, &aboutdata );
00048 KUniqueApplication::addCmdLineOptions();
00049
00050
00051 if ( !KUniqueApplication::start() ) {
00052 kDebug() << "Running knotify found";
00053 return 0;
00054 }
00055
00056
00057
00058
00059
00060 unsetenv( "SESSION_MANAGER" );
00061 KUniqueApplication app;
00062
00063
00064
00065
00066
00067
00068 KMessage::setMessageHandler( new KPassivePopupMessageHandler(0) );
00069
00070
00071 KNotify notify;
00072
00073 return app.exec();
00074 }
00075