1
/* This file is part of the KDE project
2
Copyright (C) 2008 Omat Holding B.V. <info@omat.nl>
4
This program is free software; you can redistribute it and/or
5
modify it under the terms of the GNU General Public
6
License as published by the Free Software Foundation; either
7
version 2 of the License, or (at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
General Public License for more details.
14
You should have received a copy of the GNU General Public License
15
along with this program; if not, write to the Free Software
16
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
#include <QDBusInterface>
20
#include <kuniqueapplication.h>
21
#include <kstartupinfo.h>
22
#include <kcmdlineargs.h>
23
#include <kaboutdata.h>
30
* @class AkonadiTrayApplication
31
* @author Tom Albers <tomalbers@kde.nl>
32
* This class is a simple inheritance from KUniqueApplication
33
* the reason that it is reimplemented is that when AkonadiTray
34
* is launched a second time it would in the orinal implementation
35
* make the show(). which we do not want. This
36
* class misses that call.
38
class AkonadiTrayApplication : public KUniqueApplication
42
* Similar to KUniqueApplication::newInstance, only without
43
* the call to raise the widget when a second instance is started.
50
int main( int argc, char *argv[] )
52
KAboutData aboutData( "akonaditray", 0,
53
ki18n( "AkonadiTray" ),
55
ki18n( "System tray application to control basic Akonadi functions" ),
56
KAboutData::License_GPL,
57
ki18n( "(c) 2008 Omat Holding B.V." ),
59
aboutData.addAuthor( ki18n( "Tom Albers" ), ki18n( "Maintainer and Author" ),
60
"tomalbers@kde.nl", "http://www.omat.nl" );
61
aboutData.setProgramIconName( "akonadi" );
63
KCmdLineArgs::init( argc, argv, &aboutData );
65
if ( !KUniqueApplication::start() ) {
66
fprintf( stderr, "akonaditray is already running!\n" );
70
AkonadiTrayApplication a;
71
a.setQuitOnLastWindowClosed( false );