2006-11-21 06:02:05 +00:00
|
|
|
/***************************************************************************
|
2011-02-04 14:57:33 +00:00
|
|
|
* Copyright (C) 2006 by Peter Penz <peter.penz19@gmail.com> *
|
2006-11-21 06:02:05 +00:00
|
|
|
* Copyright (C) 2006 by Stefan Monov <logixoul@gmail.com> *
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
* along with this program; if not, write to the *
|
|
|
|
* Free Software Foundation, Inc., *
|
2006-12-08 21:24:08 +00:00
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
|
2006-11-21 06:02:05 +00:00
|
|
|
***************************************************************************/
|
|
|
|
|
2006-11-29 00:02:19 +00:00
|
|
|
#include "dolphinapplication.h"
|
2007-03-22 16:39:43 +00:00
|
|
|
|
2007-09-27 12:36:40 +00:00
|
|
|
#include "dolphinmainwindow.h"
|
|
|
|
|
2011-02-04 19:42:42 +00:00
|
|
|
#include <KAboutData>
|
2011-02-04 14:43:21 +00:00
|
|
|
#include <KCmdLineArgs>
|
|
|
|
#include <KLocale>
|
2007-09-27 12:36:40 +00:00
|
|
|
#include <kmainwindow.h>
|
2011-02-04 14:43:21 +00:00
|
|
|
#include <KDebug>
|
2006-11-21 06:02:05 +00:00
|
|
|
|
2010-03-16 12:30:46 +00:00
|
|
|
extern "C"
|
|
|
|
KDE_EXPORT int kdemain(int argc, char **argv)
|
2006-11-21 06:02:05 +00:00
|
|
|
{
|
2007-07-02 08:49:20 +00:00
|
|
|
KAboutData about("dolphin", 0,
|
2007-07-13 18:39:57 +00:00
|
|
|
ki18nc("@title", "Dolphin"),
|
2012-06-24 14:45:58 +00:00
|
|
|
"2.1",
|
2007-07-13 18:39:57 +00:00
|
|
|
ki18nc("@title", "File Manager"),
|
2006-11-21 06:02:05 +00:00
|
|
|
KAboutData::License_GPL,
|
2011-12-23 13:39:44 +00:00
|
|
|
ki18nc("@info:credit", "(C) 2006-2012 Peter Penz"));
|
2008-07-26 14:01:34 +00:00
|
|
|
about.setHomepage("http://dolphin.kde.org");
|
2007-07-11 10:04:13 +00:00
|
|
|
about.addAuthor(ki18nc("@info:credit", "Peter Penz"),
|
2010-07-26 16:42:15 +00:00
|
|
|
ki18nc("@info:credit", "Maintainer and developer"),
|
2010-08-13 19:42:27 +00:00
|
|
|
"peter.penz19@gmail.com");
|
2011-11-05 14:16:25 +00:00
|
|
|
about.addAuthor(ki18nc("@info:credit", "Frank Reininghaus"),
|
|
|
|
ki18nc("@info:credit", "Developer"),
|
|
|
|
"frank78ac@googlemail.com");
|
|
|
|
about.addAuthor(ki18nc("@info:credit", "Sebastian Trüg"),
|
|
|
|
ki18nc("@info:credit", "Developer"),
|
|
|
|
"trueg@kde.org"),
|
2007-07-13 18:56:51 +00:00
|
|
|
about.addAuthor(ki18nc("@info:credit", "David Faure"),
|
2007-07-11 10:04:13 +00:00
|
|
|
ki18nc("@info:credit", "Developer"),
|
2007-07-13 18:56:51 +00:00
|
|
|
"faure@kde.org");
|
|
|
|
about.addAuthor(ki18nc("@info:credit", "Aaron J. Seigo"),
|
2007-07-11 10:04:13 +00:00
|
|
|
ki18nc("@info:credit", "Developer"),
|
2007-07-13 18:56:51 +00:00
|
|
|
"aseigo@kde.org");
|
|
|
|
about.addAuthor(ki18nc("@info:credit", "Rafael Fernández López"),
|
|
|
|
ki18nc("@info:credit", "Developer"),
|
2007-10-03 00:44:18 +00:00
|
|
|
"ereslibre@kde.org");
|
2007-07-13 18:56:51 +00:00
|
|
|
about.addAuthor(ki18nc("@info:credit", "Kevin Ottens"),
|
|
|
|
ki18nc("@info:credit", "Developer"),
|
|
|
|
"ervin@kde.org");
|
|
|
|
about.addAuthor(ki18nc("@info:credit", "Holger Freyther"),
|
|
|
|
ki18nc("@info:credit", "Developer"),
|
|
|
|
"freyther@gmx.net");
|
|
|
|
about.addAuthor(ki18nc("@info:credit", "Max Blazejak"),
|
|
|
|
ki18nc("@info:credit", "Developer"),
|
|
|
|
"m43ksrocks@gmail.com");
|
2007-07-11 10:04:13 +00:00
|
|
|
about.addAuthor(ki18nc("@info:credit", "Michael Austin"),
|
|
|
|
ki18nc("@info:credit", "Documentation"),
|
|
|
|
"tuxedup@users.sourceforge.net");
|
2009-01-12 10:11:30 +00:00
|
|
|
// the .desktop file is not taken into account when launching manually, so
|
|
|
|
// set the icon precautionally:
|
2008-04-20 23:35:54 +00:00
|
|
|
about.setProgramIconName("system-file-manager");
|
2006-11-21 06:02:05 +00:00
|
|
|
|
|
|
|
KCmdLineArgs::init(argc, argv, &about);
|
2007-07-02 08:49:20 +00:00
|
|
|
|
|
|
|
KCmdLineOptions options;
|
2009-12-17 21:07:18 +00:00
|
|
|
|
2010-05-04 18:09:27 +00:00
|
|
|
options.add("select", ki18nc("@info:shell", "The files and directories passed as arguments "
|
|
|
|
"will be selected."));
|
2011-04-12 18:01:31 +00:00
|
|
|
options.add("split", ki18nc("@info:shell", "Dolphin will get started with a split view."));
|
2010-05-04 18:09:27 +00:00
|
|
|
options.add("+[Url]", ki18nc("@info:shell", "Document to open"));
|
2006-11-21 06:02:05 +00:00
|
|
|
KCmdLineArgs::addCmdLineOptions(options);
|
2007-03-22 07:19:07 +00:00
|
|
|
|
2007-03-22 16:39:43 +00:00
|
|
|
DolphinApplication app;
|
2007-11-30 18:42:17 +00:00
|
|
|
if (app.isSessionRestored()) {
|
2011-04-12 18:01:31 +00:00
|
|
|
app.restoreSession();
|
2007-04-09 19:12:54 +00:00
|
|
|
}
|
2009-05-26 18:24:23 +00:00
|
|
|
app.exec(); // krazy:exclude=crashy
|
2007-09-27 12:36:40 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|