Commit 9a104185 authored by Pino Toscano's avatar Pino Toscano

move the about data in an own file, so it can be used from both the shell and the part

svn path=/trunk/playground/graphics/okular/; revision=641337
parent f1fd2750
/***************************************************************************
* Copyright (C) 2007 by Pino Toscano <pino@kde.org> *
* *
* 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. *
***************************************************************************/
#ifndef _ABOUTDATA_H_
#define _ABOUTDATA_H_
#include <kaboutdata.h>
inline KAboutData* okularAboutData( const char* name, const char* iname )
{
KAboutData *about = new KAboutData(
name, //"okular",
iname, //I18N_NOOP("okular"),
"0.5.82",
I18N_NOOP("okular, an universal document viewer"),
KAboutData::License_GPL,
"(C) 2002 Wilco Greven, Christophe Devriese\n"
"(C) 2004-2005 Albert Astals Cid, Enrico Ros\n"
"(C) 2005 Piotr Szymanski"
);
about->addAuthor("Pino Toscano", I18N_NOOP("Current mantainer"), "pino@kde.org");
about->addAuthor("Tobias Koenig", I18N_NOOP("Lots of framework work, ODT and FictionBook backends"), "tokoe@kde.org");
about->addAuthor("Albert Astals Cid", I18N_NOOP("Former mantainer"), "aacid@kde.org");
about->addAuthor("Piotr Szymanski", I18N_NOOP("Created okular from KPDF codebase"), "djurban@pld-dc.org");
about->addAuthor("Enrico Ros", 0, "eros.kde@email.it");
about->addAuthor("Wilco Greven", 0, "greven@kde.org");
about->addAuthor("Christophe Devriese", 0, "oelewapperke@oelewapperke.org");
about->addAuthor("Laurent Montel", 0, "montel@kde.org");
about->addCredit("Marco Martin", I18N_NOOP("Icon"), "m4rt@libero.it");
return about;
}
#endif
......@@ -55,6 +55,7 @@
#include <kfilterdev.h>
// local includes
#include "aboutdata.h"
#include "part.h"
#include "ui/pageview.h"
#include "ui/toc.h"
......@@ -590,7 +591,7 @@ KAboutData* Part::createAboutData()
// the non-i18n name here must be the same as the directory in
// which the part's rc file is installed ('partrcdir' in the
// Makefile)
KAboutData* aboutData = new KAboutData("okularpart", I18N_NOOP("okular::Part"), "0.1");
KAboutData* aboutData = okularAboutData( "okularpart", I18N_NOOP( "okularpart" ) );
aboutData->addAuthor("Wilco Greven", 0, "greven@kde.org");
return aboutData;
}
......
......@@ -14,14 +14,9 @@
#include "shell.h"
#include <kapplication.h>
#include <kaboutdata.h>
#include <kcmdlineargs.h>
#include <klocale.h>
static const char description[] =
I18N_NOOP("okular, a Universal document viewer");
static const char version[] = "0.5.82";
#include "aboutdata.h"
static KCmdLineOptions options[] =
{
......@@ -34,26 +29,9 @@ static KCmdLineOptions options[] =
int main(int argc, char** argv)
{
KAboutData about(
"okular",
I18N_NOOP("okular"),
version,
description,
KAboutData::License_GPL,
"(C) 2002 Wilco Greven, Christophe Devriese\n(C) 2004-2005 Albert Astals Cid, Enrico Ros\n(C) 2005 Piotr Szymanski");
about.addAuthor("Pino Toscano", I18N_NOOP("Current mantainer"), "pino@kde.org");
about.addAuthor("Tobias Koenig", I18N_NOOP("Lots of framework work, ODT and FictionBook backends"), "tokoe@kde.org");
about.addAuthor("Albert Astals Cid", I18N_NOOP("Former mantainer"), "aacid@kde.org");
about.addAuthor("Piotr Szymanski", I18N_NOOP("Created okular from KPDF codebase"), "djurban@pld-dc.org");
about.addAuthor("Enrico Ros", 0, "eros.kde@email.it");
about.addAuthor("Wilco Greven", 0, "greven@kde.org");
about.addAuthor("Christophe Devriese", 0, "oelewapperke@oelewapperke.org");
about.addAuthor("Laurent Montel", 0, "montel@kde.org");
about.addCredit("Marco Martin", I18N_NOOP("Icon"), 0, "m4rt@libero.it");
KAboutData * about = okularAboutData( "okular", I18N_NOOP( "okular" ) );
KCmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::init(argc, argv, about);
KCmdLineArgs::addCmdLineOptions( options );
KApplication app;
......@@ -80,7 +58,9 @@ int main(int argc, char** argv)
}
}
return app.exec();
int ret = app.exec();
delete about;
return ret;
}
// vim:ts=2:sw=2:tw=78:et
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment