You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

156 lines
7.1 KiB

* Copyright (C) 2001-2005 Anne-Marie Mahfouf <>
This program is free software; you can redistribute it and/or
modify it under the terms of version 2 of the GNU General Public
License as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "khangman.h"
#include "version.h"
#include <tdeapplication.h>
#include <tdeaboutdata.h>
#include <tdecmdlineargs.h>
#include <tdelocale.h>
#include <kprocess.h>
#include <kstandarddirs.h>
#include "fontchecker.h"
static const char description[] =
I18N_NOOP("Classical hangman game for TDE");
static const char version[] = "0.1";
static TDECmdLineOptions options[] =
// { "+[URL]", I18N_NOOP( "Document to open" ), 0 },
int main(int argc, char **argv)
TDEAboutData aboutData( "khangman", I18N_NOOP("KHangMan"),
KHM_VERSION, description, TDEAboutData::License_GPL,
"(c) 2001-2006, Anne-Marie Mahfouf", 0,
aboutData.addAuthor("Primoz Anzur", I18N_NOOP("Previous maintainer"), "");
//write the names with accents and all and this file save with utf8 encoding
aboutData.addAuthor("Anne-Marie Mahfouf", I18N_NOOP("Actual maintainer, author"), "");
aboutData.addCredit("Renaud Blanchard",
I18N_NOOP("Graphics"), "");
aboutData.addCredit("Stefan Asserhäll",
I18N_NOOP("Swedish data files, coding help, transparent pictures and i18n fixes"), "");
aboutData.addCredit("Joe Bolin",
I18N_NOOP("Nature theme background"), "");
aboutData.addCredit("Primoz Anzur",
I18N_NOOP("Blue theme background, icons"), "");
I18N_NOOP("Spanish data files"), "");
aboutData.addCredit("Erik Kjær Pedersenn",
I18N_NOOP("Danish data files"), "" );
aboutData.addCredit("Niko Lewman",
I18N_NOOP("Finnish data files"), "" );
aboutData.addCredit("João Sebastião de Oliveira Bueno",
I18N_NOOP("Brazilian Portuguese data files"), "" );
aboutData.addCredit("Antoni Bella",
I18N_NOOP("Catalan data files"), "");
aboutData.addCredit("Giovanni Venturi",
I18N_NOOP("Italian data files"), "");
I18N_NOOP("Dutch data files"), "");
aboutData.addCredit("Lukáš Tinkl",
I18N_NOOP("Czech data files"), "");
aboutData.addCredit("Tamas Szanto",
I18N_NOOP("Hungarian data files"), "");
aboutData.addCredit("Torger Åge Sinnes",
I18N_NOOP("Norwegian (Bokmål) data files"), "");
aboutData.addCredit("Roger Kovacs",
I18N_NOOP("Tajik data files"), "");
aboutData.addCredit("Chusslove Illich",
I18N_NOOP("Serbian (Cyrillic and Latin) data files"), "chaslav@sezampro.yu");
aboutData.addCredit("Jure Repinc",
I18N_NOOP("Slovenian data files"), "");
aboutData.addCredit("Pedro Morais",
I18N_NOOP("Portuguese data files"), "");
aboutData.addCredit("Gaute Hvoslef Kvalnes",
I18N_NOOP("Norwegian (Nynorsk) data files"), "");
aboutData.addCredit("Mehmet Özel",
I18N_NOOP("Turkish data files"), "");
aboutData.addCredit("Черепанов Андрей",
I18N_NOOP("Russian data files"), "");
aboutData.addCredit("Radostin Radnev",
I18N_NOOP("Bulgarian data files"), "");
aboutData.addCredit("Kevin Patrick Scannell",
I18N_NOOP("Irish (Gaelic) data files"), "");
aboutData.addCredit("Matt Howe",
I18N_NOOP("Softer Hangman Pictures"), "");
aboutData.addCredit("Benjamin Meyer",
I18N_NOOP("Coding help"), "");
aboutData.addCredit("Robert Gogolok",
I18N_NOOP("Coding help"), "");
aboutData.addCredit("Lubos Lunàk",
I18N_NOOP("Coding help"), "");
aboutData.addCredit("Albert Astals Cid",
I18N_NOOP("Coding help, fixed a lot of things"), "");
aboutData.addCredit("Danny Allen",
I18N_NOOP("SVG icon"), "");
aboutData.addCredit("Peter Hedlund",
I18N_NOOP("Code for generating icons for the characters toolbar"), "");
aboutData.addCredit("Inge Wallin",
I18N_NOOP("Code cleaning"), "");
TDECmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::addCmdLineOptions( options );
TDEApplication app;
KHangMan *mainWin = 0;
TQFont f("Domestic Manners", 12, TQFont::Normal, true);
TQFont fd("Dustismo Roman", 12, TQFont::Normal, true);
if (!fontChecker::checkInstalled(f, locate("appdata", "fonts/Domestic_Manners.ttf")))
TDEProcess *proc = new TDEProcess;
for (int i = 0; i < argc; i++) *proc << argv[i];
else if (!fontChecker::checkInstalled(fd, locate("appdata", "fonts/Dustismo_Roman.ttf")))
TDEProcess *proc = new TDEProcess;
for (int i = 0; i < argc; i++) *proc << argv[i];
if (app.isRestored())
// no session.. just start up normally
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
/// @todo do something with the command line args here
mainWin = new KHangMan();
app.setMainWidget( mainWin );
// mainWin has WDestructiveClose flag by default, so it will delete itself.
return app.exec();