|
|
|
@ -24,6 +24,7 @@
|
|
|
|
|
#include <tdeaboutdata.h>
|
|
|
|
|
#include <tdeconfig.h>
|
|
|
|
|
#include <tdeglobal.h>
|
|
|
|
|
#include <kcrash.h>
|
|
|
|
|
#include <kstandarddirs.h>
|
|
|
|
|
|
|
|
|
|
#undef signals
|
|
|
|
@ -99,6 +100,7 @@ int isPolyester;
|
|
|
|
|
int eclipseFix;
|
|
|
|
|
int openOfficeFix;
|
|
|
|
|
int mozillaFix;
|
|
|
|
|
int chromiumFix;
|
|
|
|
|
int gtkQtDebug;
|
|
|
|
|
|
|
|
|
|
Atom kipcCommAtom;
|
|
|
|
@ -334,6 +336,7 @@ void createTQApp()
|
|
|
|
|
#endif // USE_SOLARIS
|
|
|
|
|
|
|
|
|
|
TQString cmdlineAppName = "unknown-gtk-tqt-application";
|
|
|
|
|
TQString cmdlineCrashHandler = "--crashhandler";
|
|
|
|
|
TQStringList cmdlineArgs = TQStringList::split(" ", cmdLine, false);
|
|
|
|
|
if (cmdlineArgs.count() > 0) {
|
|
|
|
|
TQFileInfo fi(cmdlineArgs[0]);
|
|
|
|
@ -342,20 +345,9 @@ void createTQApp()
|
|
|
|
|
}
|
|
|
|
|
int cmdlineAppNameLength = cmdlineAppName.length() + 1;
|
|
|
|
|
|
|
|
|
|
// Create a new TDEApplication and supply it with fake data to keep its constructor happy
|
|
|
|
|
argv_fake = (char**) malloc(sizeof(char*));
|
|
|
|
|
argv_fake[0] = (char*) malloc(sizeof(char) * cmdlineAppNameLength);
|
|
|
|
|
strncpy(argv_fake[0], cmdlineAppName.ascii(), cmdlineAppNameLength);
|
|
|
|
|
aboutData.setAppName(cmdlineAppName.ascii());
|
|
|
|
|
|
|
|
|
|
aboutData.addAuthor("Timothy Pearson", I18N_NOOP("Maintainer"), "kb9vqf@pearsoncomputing.net", 0);
|
|
|
|
|
aboutData.addAuthor("David Sansome", I18N_NOOP("Original Author"), "me@davidsansome.com", 0);
|
|
|
|
|
TDECmdLineArgs::init(argc_fake, argv_fake, &aboutData);
|
|
|
|
|
|
|
|
|
|
TDEApplication::disableAutoDcopRegistration();
|
|
|
|
|
|
|
|
|
|
// Process hacks
|
|
|
|
|
mozillaFix = (cmdLine.contains("mozilla") || cmdLine.contains("firefox") || cmdLine.contains("iceweasel") || cmdLine.contains("thunderbird") || cmdLine.contains("icedove"));
|
|
|
|
|
chromiumFix = (cmdLine.contains("chromium-browser") || cmdLine.contains("chrome-browser"));
|
|
|
|
|
|
|
|
|
|
openOfficeFix = (cmdLine.endsWith("soffice.bin"))
|
|
|
|
|
| (cmdLine.endsWith("swriter.bin"))
|
|
|
|
@ -366,10 +358,32 @@ void createTQApp()
|
|
|
|
|
|
|
|
|
|
eclipseFix = cmdLine.contains("eclipse");
|
|
|
|
|
|
|
|
|
|
if (mozillaFix || chromiumFix) {
|
|
|
|
|
// Without these lines Firefox WILL crash in EnterBaseline on first startup
|
|
|
|
|
// Does baseline internally generate SIGSEGVs as part of normal operation?
|
|
|
|
|
cmdlineCrashHandler = "--nocrashhandler";
|
|
|
|
|
}
|
|
|
|
|
int cmdlineCrashHandlerLength = cmdlineCrashHandler.length() + 1;
|
|
|
|
|
|
|
|
|
|
// Create a new TDEApplication and supply it with fake data to keep its constructor happy
|
|
|
|
|
argv_fake = (char**) malloc(sizeof(char*));
|
|
|
|
|
argv_fake[0] = (char*) malloc(sizeof(char) * cmdlineAppNameLength);
|
|
|
|
|
argv_fake[1] = (char*) malloc(sizeof(char) * cmdlineCrashHandlerLength);
|
|
|
|
|
strncpy(argv_fake[0], cmdlineAppName.ascii(), cmdlineAppNameLength);
|
|
|
|
|
strncpy(argv_fake[1], cmdlineCrashHandler.ascii(), cmdlineCrashHandlerLength);
|
|
|
|
|
aboutData.setAppName(cmdlineAppName.ascii());
|
|
|
|
|
|
|
|
|
|
aboutData.addAuthor("Timothy Pearson", I18N_NOOP("Maintainer"), "kb9vqf@pearsoncomputing.net", 0);
|
|
|
|
|
aboutData.addAuthor("David Sansome", I18N_NOOP("Original Author"), "me@davidsansome.com", 0);
|
|
|
|
|
TDECmdLineArgs::init(argc_fake, argv_fake, &aboutData);
|
|
|
|
|
|
|
|
|
|
TDEApplication::disableAutoDcopRegistration();
|
|
|
|
|
|
|
|
|
|
gtkQtDebug = (getenv("GTK_TQT_ENGINE_DEBUG") != NULL) ? 1 : 0;
|
|
|
|
|
|
|
|
|
|
if (gtkQtDebug)
|
|
|
|
|
if (gtkQtDebug) {
|
|
|
|
|
printf("createTQApp()\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
char* sessionEnv = getenv("SESSION_MANAGER");
|
|
|
|
|
if (TQString(sessionEnv).endsWith(TQString::number(getpid())) || cmdLine.contains("notification-daemon-tde") || cmdLine.contains("nspluginviewer") || cmdLine.contains("gnome-wm") || cmdLine.contains("metacity") || cmdLine.contains("xfwm4") || (getenv("GTK_TQT_ENGINE_DISABLE") != NULL))
|
|
|
|
@ -491,6 +505,7 @@ void destroyTQApp()
|
|
|
|
|
if (altBackGC != 0)
|
|
|
|
|
gtk_gc_release(altBackGC);
|
|
|
|
|
|
|
|
|
|
free(argv_fake[1]);
|
|
|
|
|
free(argv_fake[0]);
|
|
|
|
|
free(argv_fake);
|
|
|
|
|
}
|
|
|
|
|