]> cloud.milkyroute.net Git - dolphin.git/blob - src/main.cpp
port Dolphin from KUrl to QUrl
[dolphin.git] / src / main.cpp
1 /***************************************************************************
2 * Copyright (C) 2006 by Peter Penz <peter.penz19@gmail.com> *
3 * Copyright (C) 2006 by Stefan Monov <logixoul@gmail.com> *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program 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 *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
19 ***************************************************************************/
20
21 #include "dolphinapplication.h"
22
23 #include "dolphinmainwindow.h"
24
25 #include <k4aboutdata.h>
26 #include <KCmdLineArgs>
27 #include <KLocalizedString>
28 #include <kmainwindow.h>
29 #include <kdemacros.h>
30 #include <kdeversion.h>
31 #include <KDebug>
32
33 extern "C"
34 KDE_EXPORT int kdemain(int argc, char **argv)
35 {
36 K4AboutData about("dolphin", 0,
37 ki18nc("@title", "Dolphin"),
38 "4.60",
39 ki18nc("@title", "File Manager"),
40 K4AboutData::License_GPL,
41 ki18nc("@info:credit", "(C) 2006-2014 Peter Penz, Frank Reininghaus, and Emmanuel Pescosta"));
42 about.setHomepage("http://dolphin.kde.org");
43 about.addAuthor(ki18nc("@info:credit", "Emmanuel Pescosta"),
44 ki18nc("@info:credit", "Maintainer (since 2014) and developer"),
45 "emmanuelpescosta099@gmail.com");
46 about.addAuthor(ki18nc("@info:credit", "Frank Reininghaus"),
47 ki18nc("@info:credit", "Maintainer (2012-2014) and developer"),
48 "frank78ac@googlemail.com");
49 about.addAuthor(ki18nc("@info:credit", "Peter Penz"),
50 ki18nc("@info:credit", "Maintainer and developer (2006-2012)"),
51 "peter.penz19@gmail.com");
52 about.addAuthor(ki18nc("@info:credit", "Sebastian Trüg"),
53 ki18nc("@info:credit", "Developer"),
54 "trueg@kde.org"),
55 about.addAuthor(ki18nc("@info:credit", "David Faure"),
56 ki18nc("@info:credit", "Developer"),
57 "faure@kde.org");
58 about.addAuthor(ki18nc("@info:credit", "Aaron J. Seigo"),
59 ki18nc("@info:credit", "Developer"),
60 "aseigo@kde.org");
61 about.addAuthor(ki18nc("@info:credit", "Rafael Fernández López"),
62 ki18nc("@info:credit", "Developer"),
63 "ereslibre@kde.org");
64 about.addAuthor(ki18nc("@info:credit", "Kevin Ottens"),
65 ki18nc("@info:credit", "Developer"),
66 "ervin@kde.org");
67 about.addAuthor(ki18nc("@info:credit", "Holger Freyther"),
68 ki18nc("@info:credit", "Developer"),
69 "freyther@gmx.net");
70 about.addAuthor(ki18nc("@info:credit", "Max Blazejak"),
71 ki18nc("@info:credit", "Developer"),
72 "m43ksrocks@gmail.com");
73 about.addAuthor(ki18nc("@info:credit", "Michael Austin"),
74 ki18nc("@info:credit", "Documentation"),
75 "tuxedup@users.sourceforge.net");
76 // the .desktop file is not taken into account when launching manually, so
77 // set the icon precautionally:
78 about.setProgramIconName("system-file-manager");
79
80 KCmdLineArgs::init(argc, argv, &about);
81
82 KCmdLineOptions options;
83
84 options.add("select", ki18nc("@info:shell", "The files and directories passed as arguments "
85 "will be selected."));
86 options.add("split", ki18nc("@info:shell", "Dolphin will get started with a split view."));
87 options.add("+[Url]", ki18nc("@info:shell", "Document to open"));
88 KCmdLineArgs::addCmdLineOptions(options);
89
90 {
91 DolphinApplication app;
92 if (app.isSessionRestored()) {
93 app.restoreSession();
94 }
95 app.exec(); // krazy:exclude=crashy
96 }
97
98 return 0;
99 }