1 | /** |
2 | * Copyright (C) 2005 Benjamin C Meyer (ben at meyerhome dot net) |
3 | * |
4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU Lesser General Public License as published |
6 | * by the Free Software Foundation; either version 2.1 of the License, or |
7 | * (at your option) any later version. |
8 | * |
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 |
12 | * GNU Lesser General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU Lesser 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. |
17 | */ |
18 | |
19 | #include "sweeper.h" |
20 | |
21 | #include <kaboutdata.h> |
22 | #include <kapplication.h> |
23 | #include <kcmdlineargs.h> |
24 | #include <klocale.h> |
25 | |
26 | int main(int argc, char *argv[]) |
27 | { |
28 | KAboutData aboutData("sweeper" , 0, ki18n("Sweeper" ), "1.9" , |
29 | ki18n("Helps clean unwanted traces the user leaves on the system." ), |
30 | KAboutData::License_LGPL, ki18n("(c) 2003-2005, Ralf Hoelzer" ), KLocalizedString(), |
31 | "http://utils.kde.org/projects/sweeper" ); |
32 | |
33 | aboutData.addAuthor(ki18n("Ralf Hoelzer" ), ki18n("Original author" ), "ralf@well.com" ); |
34 | aboutData.addAuthor(ki18n("Brian S. Stephan" ), ki18n("Maintainer" ), "bssteph@irtonline.org" ); |
35 | aboutData.addAuthor(ki18n("Benjamin Meyer" ), ki18n("Thumbnail Cache" ), "ben+kdeprivacy@meyerhome.net" ); |
36 | |
37 | aboutData.setProgramIconName(QLatin1String( "trash-empty" )); |
38 | |
39 | // command line |
40 | KCmdLineArgs::init(argc, argv, &aboutData); |
41 | KCmdLineOptions options; |
42 | options.add("automatic" , ki18n("Sweeps without user interaction" )); |
43 | KCmdLineArgs::addCmdLineOptions(options); |
44 | KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); |
45 | |
46 | // Application |
47 | KApplication a(true); |
48 | Sweeper *app; |
49 | if(args->isSet("automatic" )) { |
50 | app = new Sweeper(true); |
51 | } else { |
52 | app = new Sweeper(false); |
53 | app->show(); |
54 | } |
55 | return a.exec(); |
56 | } |
57 | |
58 | // kate: tab-width 3; indent-mode cstyle; replace-tabs true; |
59 | |