23 #include <karambaapp.h> 26 #include <tdeaboutdata.h> 27 #include <tdecmdlineargs.h> 28 #include <tdelocale.h> 29 #include <tdeconfig.h> 30 #include <tdemainwindow.h> 31 #include <tqfileinfo.h> 32 #include <tqstringlist.h> 33 #include <tdeconfig.h> 34 #include <tdestandarddirs.h> 35 #include <tdeversion.h> 38 #include "karambasessionmanaged.h" 39 #include "karambainterface.h" 40 #include "karamba_python.h" 42 static const char *description =
43 I18N_NOOP(
"A TDE Eye-candy Application");
45 static const char *version =
"0.42";
47 static TDECmdLineOptions options[] =
51 {
"+file", I18N_NOOP(
"A required argument 'file'"), 0 },
61 void karambaMessageOutput(TQtMsgType type,
const char *msg)
63 FILE* fp = fopen(
"/tmp/karamba.log",
"a");
71 fprintf( fp,
"Debug (%d): %s\n", pid, msg );
74 if (strncmp(msg,
"X Error", 7) != 0)
75 fprintf( fp,
"Warning (%d): %s\n", pid, msg );
78 fprintf( fp,
"Fatal (%d): %s\n", pid, msg );
87 int main(
int argc,
char **argv)
90 qInstallMsgHandler(karambaMessageOutput);
92 TDEAboutData about(
"superkaramba", I18N_NOOP(
"SuperKaramba"),
94 TDEAboutData::License_GPL,
95 I18N_NOOP(
"(c) 2003-2006 The SuperKaramba developers"));
96 about.addAuthor(
"Adam Geitgey", 0,
"adam@rootnode.org");
97 about.addAuthor(
"Hans Karlsson", 0,
"karlsson.h@home.se");
98 about.addAuthor(
"Ryan Nickell", 0,
"p0z3r@earthlink.net");
99 about.addAuthor(
"Petri Damstén", 0,
"petri.damsten@iki.fi");
100 about.addAuthor(
"Alexander Wiedenbruch", 0,
"mail@wiedenbruch.de");
101 about.addAuthor(
"Luke Kenneth Casson Leighton", 0,
"lkcl@lkcl.net");
102 TDECmdLineArgs::init(argc, argv, &about);
103 TDECmdLineArgs::addCmdLineOptions(options);
104 KarambaSessionManaged ksm;
106 TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
111 KarambaApplication::checkSuperKarambaDir();
113 KarambaApplication::lockKaramba();
115 KarambaApplication app;
117 TQString mainAppId = app.getMainKaramba();
118 if(!mainAppId.isEmpty())
120 app.initDcopStub(mainAppId.ascii());
125 app.setUpSysTray(&about);
129 KarambaApplication::unlockKaramba();
131 app.connect(tqApp,TQ_SIGNAL(lastWindowClosed()),tqApp,TQ_SLOT(quit()));
134 app.checkPreviousSession(app, lst);
135 if( (lst.size() == 0) && !app.isRestored() )
138 app.checkCommandLine(args, lst);
144 app.globalShowThemeDialog();
150 KarambaPython::initPython();
152 if(app.startThemes(lst) || mainAppId.isEmpty())
154 KarambaPython::shutdownPython();