summaryrefslogtreecommitdiffstats
path: root/kpdf/shell/main.cpp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit47d455dd55be855e4cc691c32f687f723d9247ee (patch)
tree52e236aaa2576bdb3840ebede26619692fed6d7d /kpdf/shell/main.cpp
downloadtdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.tar.gz
tdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpdf/shell/main.cpp')
-rw-r--r--kpdf/shell/main.cpp82
1 files changed, 82 insertions, 0 deletions
diff --git a/kpdf/shell/main.cpp b/kpdf/shell/main.cpp
new file mode 100644
index 00000000..20aa3eee
--- /dev/null
+++ b/kpdf/shell/main.cpp
@@ -0,0 +1,82 @@
+/***************************************************************************
+ * Copyright (C) 2002 by Wilco Greven <[email protected]> *
+ * Copyright (C) 2003 by Christophe Devriese *
+ * Copyright (C) 2003 by Laurent Montel <[email protected]> *
+ * Copyright (C) 2003-2004 by Albert Astals Cid <[email protected]> *
+ * Copyright (C) 2004 by Andy Goossens <[email protected]> *
+ * *
+ * 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. *
+ ***************************************************************************/
+
+#include "shell.h"
+#include <kapplication.h>
+#include <kaboutdata.h>
+#include <kcmdlineargs.h>
+#include <klocale.h>
+
+static const char description[] =
+I18N_NOOP("kpdf, a kde pdf viewer based on xpdf");
+
+static const char version[] = "0.5.10";
+
+static KCmdLineOptions options[] =
+{
+ { "+[URL]", I18N_NOOP("Document to open"), 0 },
+ KCmdLineLastOption
+};
+
+int main(int argc, char** argv)
+{
+ KAboutData about(
+ "kpdf",
+ I18N_NOOP("KPDF"),
+ version,
+ description,
+ KAboutData::License_GPL,
+ "(C) 2002 Wilco Greven, Christophe Devriese\n(C) 2004-2005 Albert Astals Cid, Enrico Ros");
+
+ about.addAuthor("Wilco Greven", 0, "[email protected]");
+ about.addAuthor("Christophe Devriese", 0, "[email protected]");
+ about.addAuthor("Laurent Montel", 0, "[email protected]");
+ about.addAuthor("Albert Astals Cid", I18N_NOOP("Current mantainer"), "[email protected]");
+ about.addAuthor("Enrico Ros", 0, "[email protected]");
+
+ about.addCredit("Derek Noonburg", I18N_NOOP("Xpdf author"), 0, "http://www.foolabs.com/xpdf/");
+ about.addCredit("Marco Martin", I18N_NOOP("Icon"), 0, "[email protected]");
+
+ KCmdLineArgs::init(argc, argv, &about);
+ KCmdLineArgs::addCmdLineOptions( options );
+ KApplication app;
+
+ // see if we are starting with session management
+ if (app.isRestored())
+ {
+ RESTORE(KPDF::Shell);
+ } else {
+ // no session.. just start up normally
+ KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
+
+ if (args->count() == 0)
+ {
+ KPDF::Shell* widget = new KPDF::Shell;
+ widget->show();
+ }
+ else
+ {
+ for (int i = 0; i < args->count(); ++i)
+ {
+ KPDF::Shell* widget = new KPDF::Shell(args->url(i));
+ widget->show();
+ }
+ }
+ args->clear();
+ }
+
+ return app.exec();
+}
+
+// vim:ts=2:sw=2:tw=78:et