1/*
2
3 This file is part of the KFloppy program, part of the KDE project
4
5 Copyright (C) 1997 Bernd Johannes Wuebben <wuebben@math.cornell.edu>
6 Copyright (C) 2004, 2005 Nicolas GOUTTE <goutte@kde.org>
7
8
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22
23*/
24
25#include <kdeversion.h>
26#include <kapplication.h>
27#include <kcmdlineargs.h>
28#include <kaboutdata.h>
29#include <klocale.h>
30#include "floppy.h"
31
32
33static const char description[] =
34 I18N_NOOP("KDE Floppy Disk Utility");
35
36int main( int argc, char *argv[] )
37{
38 KAboutData aboutData("kfloppy", 0,
39 ki18n("KFloppy"),
40 "4.9 pre", ki18n(description), KAboutData::License_GPL,
41 ki18n("(c) 1997, Bernd Johannes Wuebben\n"
42 "(c) 2001, Chris Howells\n"
43 "(c) 2002, Adriaan de Groot\n"
44 "(c) 2004, 2005, Nicolas Goutte"),
45 ki18n("KFloppy helps you format floppies with the filesystem of your choice."),
46 "http://utils.kde.org/projects/kfloppy"
47 );
48
49 aboutData.addAuthor(ki18n("Bernd Johannes Wuebben"), ki18n("Author and former maintainer"), "wuebben@kde.org");
50 aboutData.addCredit(ki18n("Chris Howells"), ki18n("User interface re-design"), "howells@kde.org");
51 aboutData.addCredit(ki18n("Adriaan de Groot"), ki18n("Add BSD support"), "groot@kde.org");
52 aboutData.addCredit(ki18n("Nicolas Goutte"), ki18n("Make KFloppy work again for KDE 3.4"), "goutte@kde.org");
53
54 KCmdLineArgs::init( argc, argv, &aboutData );
55
56 KCmdLineOptions options;
57 options.add("+[device]", ki18n("Default device"));
58 KCmdLineArgs::addCmdLineOptions( options );
59
60 KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
61 QString device;
62 if (args->count()) {
63 device = args->arg(0);
64 }
65 args->clear();
66
67 KApplication a;
68
69 FloppyData* floppy = new FloppyData();
70 bool autoformat = floppy->setInitialDevice(device);
71 floppy->show();
72 if (autoformat)
73 floppy->format();
74 return a.exec();
75}
76