1 /* This file is part of the KDE Project
3 Copyright (C) 2006-2008 Ralf Habacker <ralf.habacker@freenet.de>
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License version 2 as published by the Free Software Foundation.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
27 #include <kapplication.h>
28 #include <kcmdlineargs.h>
30 #include <kcomponentdata.h>
34 #include <kstandarddirs.h>
36 //void listAllGroups(const QString &groupName=QString());
38 int main(int argc
, char **argv
)
40 KAboutData
about("winstartmenu", "kdebase-runtime", ki18n("winstartmenu"), "1.0",
41 ki18n("An application to create/update or remove Windows Start Menu entries"),
42 KAboutData::License_GPL
,
43 ki18n("(C) 2008 Ralf Habacker"));
44 KCmdLineArgs::init( argc
, argv
, &about
);
46 KCmdLineOptions options
;
47 options
.add("remove", ki18n("Remove installed Start Menu entries"));
48 options
.add("install", ki18n("Install Start Menu entries (this is also the default when this option is not used)"));
49 KCmdLineArgs::addCmdLineOptions( options
); // Add my own options.
51 KComponentData
a(&about
);
53 // Get application specific arguments
54 KCmdLineArgs
*args
= KCmdLineArgs::parsedArgs();
56 KApplication
app(false);
58 if (args
->isSet("remove"))
59 removeStartMenuLinks();
61 updateStartMenuLinks();