2
* This file is part of the System Settings package
3
* Copyright (C) 2005 Benjamin C Meyer
4
* <ben+systempreferences at meyerhome dot net>
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Library General Public License for more details.
16
* You should have received a copy of the GNU Library General Public License
17
* along with this library; see the file COPYING.LIB. If not, write to
18
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
* Boston, MA 02110-1301, USA.
22
#include <kuniqueapplication.h>
23
#include <kcmdlineargs.h>
24
#include <kaboutdata.h>
27
#include "mainwindow.h"
32
int main( int argc, char *argv[] )
34
KLocale::setMainCatalog("systemsettings");
36
KAboutData aboutData("systemsettings", 0, ki18n("System Settings"),
37
SYSTEM_SETTINGS_VERSION, ki18n("System Settings"),
38
KAboutData::License_LGPL, ki18n("(c) 2005, Benjamin C. Meyer; (c) 2007, Canonical Ltd"));
39
aboutData.addAuthor(ki18n("Benjamin C. Meyer"), ki18n("Author"),
40
"ben+systempreferences@meyerhome.net");
41
aboutData.addAuthor(ki18n("Jonathan Riddell"), ki18n("Contributor"),
42
"jriddell@ubuntu.com");
43
aboutData.addAuthor(ki18n("Michael D. Stemle"), ki18n("Contributor"),
44
"manchicken@notsosoft.net");
45
aboutData.addAuthor(ki18n("Simon Edwards"), ki18n("Contributor"),
46
"simon@simonzone.com");
47
aboutData.addAuthor(ki18n("Ellen Reitmayr"), ki18n("Usability"),
49
KCmdLineArgs::init(argc, argv, &aboutData);
51
// Tell which options are supported
53
KCmdLineOptions options;
54
options.add("menu <argument>", ki18n("Menu file"), "systemsettings");
55
KCmdLineArgs::addCmdLineOptions( options );
56
KUniqueApplication::addCmdLineOptions();
57
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
59
if (!KUniqueApplication::start()) {
60
std::cerr << "This program is already running." << std::endl;
63
KUniqueApplication application;
65
MainWindow *mainWindow = new MainWindow(args->getOption("menu"));
71
return application.exec();