Use tdeApp

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
master
Michele Calgaro 1 month ago
parent 7d033d1ca0
commit d05b646280
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -45,8 +45,8 @@ static void sighandler(int sig)
}
tqDebug("%s", i18n("Caught signal %1. Cleaning up.").arg(sig).local8Bit().data());
((TDEDocker*)TDEApplication::kApplication())->trayLabelMgr()->undockAll();
TDEApplication::kApplication()->quit();
((TDEDocker*)tdeApp)->trayLabelMgr()->undockAll();
tdeApp->quit();
}
static const TDECmdLineOptions options[] =

@ -50,9 +50,9 @@ TDEDocker::TDEDocker()
// Required so that the saved config is correctly loaded
// (see TrayLabelMgr::doRestoreSession() for usage)
if (TDEApplication::kApplication()->isRestored())
if (tdeApp->isRestored())
{
TDEApplication::kApplication()->sessionConfig();
tdeApp->sessionConfig();
}
}

@ -67,7 +67,7 @@ void TrayLabelMgr::startup(void)
* stdout is a tty) OR if we are getting restored, wait for WAIT_TIME until
* the system tray shows up (before informing the user)
*/
static bool do_wait = !isatty(fileno(stdout)) || TDEApplication::kApplication()->isRestored();
static bool do_wait = !isatty(fileno(stdout)) || tdeApp->isRestored();
SysTrayState state = sysTrayStatus(TQPaintDevice::x11AppDisplay());
@ -84,7 +84,7 @@ void TrayLabelMgr::startup(void)
state == SysTrayAbsent ? i18n("No system tray found") : i18n("System tray appears to be hidden"),
i18n("TDEDocker")) == KMessageBox::Cancel)
{
TDEApplication::kApplication()->quit();
tdeApp->quit();
return;
}
}
@ -92,7 +92,7 @@ void TrayLabelMgr::startup(void)
// Things are fine or user with OK with the state of system tray
mReady = true;
bool ok = false;
if (TDEApplication::kApplication()->isRestored())
if (tdeApp->isRestored())
{
restoreSession();
ok = true;
@ -110,7 +110,7 @@ void TrayLabelMgr::startup(void)
}
if (!ok)
{
TDEApplication::kApplication()->quit();
tdeApp->quit();
}
}
@ -426,7 +426,7 @@ TQTrayLabel *TrayLabelMgr::dockApplication(char *argv[])
{
tqDebug("%s", i18n("Failed to exec [%1]: %2").arg(argv[0]).arg(strerror(errno)).local8Bit().data());
// Exit the forked process only.
// Using TDEApplication::kApplication()->quit() crashes the parent application.
// Using tdeApp->quit() crashes the parent application.
exit(0);
return NULL;
}
@ -447,7 +447,7 @@ TQTrayLabel *TrayLabelMgr::dockApplication(char *argv[])
}
TQTrayLabel *label = new TQTrayLabel(cmd_line, pid);
TDEApplication::kApplication()->syncX();
tdeApp->syncX();
write(filedes[1], buf, sizeof(buf));
close(filedes[0]);
close(filedes[1]);
@ -479,7 +479,7 @@ void TrayLabelMgr::trayLabelDestroyed(TQObject *t)
mTrayLabels.removeRef((TQTrayLabel*)t);
if (mTrayLabels.isEmpty())
{
TDEApplication::kApplication()->quit();
tdeApp->quit();
}
else if (reconnect)
{
@ -526,7 +526,7 @@ void TrayLabelMgr::doRestoreSession()
{
TRACE("Restoring session");
TDEConfig *config = TDEApplication::kApplication()->sessionConfig();
TDEConfig *config = tdeApp->sessionConfig();
if (config->hasGroup("General"))
{
config->setGroup("General");
@ -554,7 +554,7 @@ void TrayLabelMgr::doRestoreSession()
// Exit if no application could be restored
if (mTrayLabels.isEmpty())
{
TDEApplication::kApplication()->quit();
tdeApp->quit();
}
}
@ -564,7 +564,7 @@ bool TrayLabelMgr::saveState(TQSessionManager &sm)
int i = 0;
TQTrayLabel *t;
TDEConfig *config = TDEApplication::kApplication()->sessionConfig();
TDEConfig *config = tdeApp->sessionConfig();
TQPtrListIterator<TQTrayLabel> it(mTrayLabels);
for (it.toFirst(); it.current(); ++it)
{

Loading…
Cancel
Save