1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
/*
* The TaskJuggler Project Management Software
*
* Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007
* by Chris Schlaeger <cs@kde.org>
*
* 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.
*
* As a special exception, you have permission to link this program with
* the Qt3 library and distribute executables, as long as you follow the
* requirements of the GNU GPL version 2 in regard to all of the software
* in the executable aside from Qt3.
*
* $Id$
*/
#include "taskjuggler.h"
#include <dcopclient.h>
#include <kaboutdata.h>
#include <kcmdlineargs.h>
#include <klocale.h>
static const char description[] =
I18N_NOOP("A Project Management Software for Linux");
static const char version[] = VERSION;
static KCmdLineOptions options[] =
{
{ "+[URL]", I18N_NOOP("Project (TJP File) to open"), 0 },
KCmdLineLastOption
};
int main(int argc, char **argv)
{
KAboutData about("taskjuggler", I18N_NOOP("TaskJuggler"), version,
description,
KAboutData::License_GPL,
"(c) 2002, 2003, 2004, 2005, 2006, 2007 Chris Schlaeger",
I18N_NOOP("TaskJuggler is a project management tool for "
"Linux and UNIX-like operating systems. Its \n"
"new approach to project planning and tracking "
"is superior to the commonly used Gantt chart \n"
"editing tools. It has already been "
"successfully used in many projects and \n"
"scales easily to projects with hundreds of "
"resources and thousands of tasks."),
"http://www.taskjuggler.org",
"bugs@taskjuggler.org");
about.addAuthor("Chris Schlaeger", 0, "cs@kde.org" );
KCmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions(options);
KApplication app;
// register ourselves as a dcop client
app.dcopClient()->registerAs(app.name(), false);
// see if we are starting with session management
if (app.isRestored())
{
for (int i = 1; KMainWindow::canBeRestored(i); ++i)
{
TaskJuggler* widget = new TaskJuggler;
widget->restore(i);
if (i == 1)
widget->loadLastProject();
}
}
else
{
// no session.. just start up normally
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TaskJuggler* widget = new TaskJuggler;
app.setMainWidget(widget);
widget->show();
if (args->count() > 0)
widget->load(args->url(0));
else
widget->loadLastProject();
args->clear();
}
return app.exec();
}
|