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
|
/***************************************************************************
main.cpp - initialization
-------------------
copyright : (C) 2004 Michal Rudolf <mrudolf@tdewebdev.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. *
* *
***************************************************************************/
// KDE includes
#include <kaboutdata.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
#include <tdeconfig.h>
#include <kiconloader.h>
#include <klocale.h>
#include <ksplashscreen.h>
// Other includes
#include "mainwindow.h"
#include "kommanderwidget.h"
#include "kommanderversion.h"
static const char *description =
I18N_NOOP("Kommander is a graphical editor of scripted dialogs.");
static const char *text =
I18N_NOOP("Based on TQt Designer, (C) 2000 Trolltech AS.");
static TDECmdLineOptions options[] =
{
{ "+file", I18N_NOOP("Dialog to open"), 0 },
{ 0, 0, 0 }
};
int main( int argc, char *argv[] )
{
TDEAboutData aboutData( "kommander", I18N_NOOP("Kommander"),
KOMMANDER_VERSION, description, TDEAboutData::License_GPL,
"(C) 2002-2005 Kommander authors", text);
aboutData.addAuthor("Eric Laffoon", I18N_NOOP("Project manager"), "eric@tdewebdev.org");
aboutData.addAuthor("Andras Mantia", I18N_NOOP("Current maintainer"), "amantia@tdewebdev.org");
aboutData.addAuthor("Michal Rudolf", I18N_NOOP("Previous maintainer"), "mrudolf@tdewebdev.org");
aboutData.addAuthor("Marc Britton", I18N_NOOP("Original author"), "consume@optusnet.com.au");
aboutData.setTranslator (I18N_NOOP("_: NAME OF TRANSLATORS\nYour names"),
I18N_NOOP("_: EMAIL OF TRANSLATORS\nYour emails"));
TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions(options);
KommanderWidget::inEditor = true;
TDELocale::setMainCatalogue("kommander");
TDEApplication a(true, true);
TDEConfig *config = kapp->config();
config->setGroup("General");
bool splashScreen = config->readBoolEntry("SplashScreen", true);
KSplashScreen* splash = 0;
if (splashScreen) {
splash = new KSplashScreen(UserIcon("kommandersplash"));
splash->show();
}
MainWindow *mw = new MainWindow(false);
a.setMainWidget(mw);
mw->setCaption(i18n("Kommander Dialog Editor"));
mw->show();
if (splashScreen) {
splash->finish(mw);
delete splash;
}
return a.exec();
}
|