/*************************************************************************** * * * begin : 07 May 2004 * * copyright : (C) 2003 by Samokhvalov Anton :) * * * ***************************************************************************/ /*************************************************************************** * * * 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 "chm.h" #include #include #include #include static const char description[] = I18N_NOOP("A KDE KPart Application"); static const char version[] = "0.3.1"; static KCmdLineOptions options[] = { { "+[URL]", I18N_NOOP( "Document to open." ), 0 }, KCmdLineLastOption }; int main( int argc, char **argv ) { KAboutData about( "kchm", I18N_NOOP("KChm"), version, description, KAboutData::License_GPL, "(C) 2003 Anton Samokhvalov", 0, 0, "red___hat@mail.ru" ); about.addAuthor( "Anton Samokhvalov", 0, "anton@sycore.org" ); KCmdLineArgs::init( argc, argv, &about ); KCmdLineArgs::addCmdLineOptions( options ); KApplication app; if ( app.isRestored() ) { RESTORE( Chm ) } else { KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); if ( args->count() == 0 ) { Chm *widget = new Chm; widget->show(); } else { int i = 0; for (; i < args->count(); i++ ) { Chm *widget = new Chm; widget->show(); widget->load( args->url( i ) ); } } args->clear(); } return app.exec(); }