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.
61 lines
1.3 KiB
61 lines
1.3 KiB
15 years ago
|
%{CPP_TEMPLATE}
|
||
|
|
||
|
#include <kurl.h>
|
||
|
#include <kapplication.h>
|
||
|
#include <kaboutdata.h>
|
||
|
#include <kcmdlineargs.h>
|
||
|
#include <klocale.h>
|
||
|
|
||
12 years ago
|
#include "%{APPNAMELC}tdemdi.h"
|
||
15 years ago
|
|
||
|
static const char description[] =
|
||
12 years ago
|
I18N_NOOP("A simple tdemdi app");
|
||
15 years ago
|
|
||
|
static const char version[] = "0.0.1";
|
||
|
|
||
|
static KCmdLineOptions options[] =
|
||
|
{
|
||
|
{ "+[URL]", I18N_NOOP( "Document to open" ), 0 },
|
||
|
KCmdLineLastOption
|
||
|
};
|
||
|
|
||
|
int main(int argc, char **argv)
|
||
|
{
|
||
12 years ago
|
TDEAboutData about("%{APPNAMELC}", I18N_NOOP("%{APPNAME}"), version, description,
|
||
|
TDEAboutData::License_%{LICENSE}, "(C) %{YEAR} %{AUTHOR}", 0, 0, "%{EMAIL}" );
|
||
15 years ago
|
about.addAuthor( "%{AUTHOR}", 0, "%{EMAIL}" );
|
||
|
|
||
|
// warning, utf-8 char
|
||
|
//about.addCredit( "bksys authors", "Thomas Nagy, Julien Antille" );
|
||
|
|
||
12 years ago
|
TDECmdLineArgs::init(argc, argv, &about);
|
||
|
TDECmdLineArgs::addCmdLineOptions(options);
|
||
15 years ago
|
|
||
12 years ago
|
TDEApplication app;
|
||
15 years ago
|
|
||
|
// see if we are starting with session management
|
||
|
/*if (app.isRestored())
|
||
|
{
|
||
|
RESTORE((%{APPNAME});
|
||
|
} else */
|
||
|
{
|
||
|
// no session.. just start up normally
|
||
12 years ago
|
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
|
||
15 years ago
|
|
||
12 years ago
|
%{APPNAMELC}tdemdi *widget = new %{APPNAMELC}tdemdi( KMdi::IDEAlMode );
|
||
15 years ago
|
|
||
|
if (args->count() != 0)
|
||
|
{
|
||
|
for (int i=0; i < args->count(); i++)
|
||
|
{
|
||
|
widget->openURL( args->url( i ) );
|
||
|
}
|
||
|
}
|
||
|
widget->show();
|
||
|
args->clear();
|
||
|
}
|
||
|
|
||
|
return app.exec();
|
||
|
}
|
||
|
|