summaryrefslogtreecommitdiffstats
path: root/tdm/kfrontend/kgapp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdm/kfrontend/kgapp.cpp')
-rw-r--r--tdm/kfrontend/kgapp.cpp39
1 files changed, 25 insertions, 14 deletions
diff --git a/tdm/kfrontend/kgapp.cpp b/tdm/kfrontend/kgapp.cpp
index a48dcf93a..6e144600f 100644
--- a/tdm/kfrontend/kgapp.cpp
+++ b/tdm/kfrontend/kgapp.cpp
@@ -101,7 +101,7 @@ GreeterApp::GreeterApp(Display *dpy) : TDEApplication(dpy)
init();
}
-GreeterApp::GreeterApp(Display *dpy, Qt::HANDLE visual, Qt::HANDLE colormap) : TDEApplication(dpy, visual, colormap)
+GreeterApp::GreeterApp(Display *dpy, TQt::HANDLE visual, TQt::HANDLE colormap) : TDEApplication(dpy, visual, colormap)
{
init();
}
@@ -124,14 +124,14 @@ void GreeterApp::init()
startTimer( pingInterval * 60000 );
}
-#ifdef __TDE_HAVE_TDEHWLIB
+#ifdef WITH_TDEHWLIB
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
- connect(hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(deviceChanged(TDEGenericDevice*)));
+ connect(hwdevices, TQ_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQ_SLOT(deviceChanged(TDEGenericDevice*)));
#endif
}
void GreeterApp::deviceChanged(TDEGenericDevice* device) {
-#ifdef __TDE_HAVE_TDEHWLIB
+#ifdef WITH_TDEHWLIB
#ifdef WITH_XRANDR
if (device->type() == TDEGenericDeviceType::Monitor) {
KRandrSimpleAPI *randrsimple = new KRandrSimpleAPI();
@@ -139,7 +139,7 @@ void GreeterApp::deviceChanged(TDEGenericDevice* device) {
delete randrsimple;
}
#endif // WITH_XRANDR
-#endif // __TDE_HAVE_TDEHWLIB
+#endif // WITH_TDEHWLIB
}
void
@@ -201,7 +201,7 @@ checkSAK(GreeterApp* app)
app->restoreOverrideCursor();
SAKDlg sak(0);
sak.exec();
- app->setOverrideCursor( Qt::WaitCursor );
+ app->setOverrideCursor( TQt::WaitCursor );
}
void
@@ -284,7 +284,7 @@ kg_main( const char *argv0 )
GreeterApp *app;
if ((!_compositor.isEmpty()) && ( argb_visual_available == true )) {
- app = new GreeterApp(dpyi, Qt::HANDLE( visual ), Qt::HANDLE( colormap ));
+ app = new GreeterApp(dpyi, TQt::HANDLE( visual ), TQt::HANDLE( colormap ));
}
else {
argb_visual_available = false;
@@ -308,11 +308,22 @@ kg_main( const char *argv0 )
iccConfigFile += "/kicc/kiccconfigrc";
KSimpleConfig iccconfig(iccConfigFile, true);
if (iccconfig.readBoolEntry("EnableICC", false) == true) {
- TQString iccCommand = TQString("/usr/bin/xcalib ");
- iccCommand += iccconfig.readEntry("ICCFile");
- iccCommand += TQString(" &");
- if (system(iccCommand.ascii()) < 0) {
- printf("WARNING: Unable to execute command \"%s\"\n", iccCommand.ascii());
+ TQString iccCommand = TDEGlobal::dirs()->findExe("dispwin");
+ if (iccCommand.isEmpty())
+ {
+ iccCommand = TDEGlobal::dirs()->findExe("xcalib");
+ }
+ if (iccCommand.isEmpty())
+ {
+ printf("WARNING: Unable to find command to set ICC profile - dispwin or xcalib\n");
+ }
+ else
+ {
+ iccCommand += TQString(" %1 &").arg(iccconfig.readEntry("ICCFile"));
+ if (system(iccCommand.local8Bit()) < 0)
+ {
+ printf("WARNING: Unable to execute command \"%s\"\n", iccCommand.local8Bit().data());
+ }
}
}
@@ -400,14 +411,14 @@ kg_main( const char *argv0 )
}
if (cmd == G_ErrorGreet) {
- if (KGVerify::handleFailVerify( TQT_TQWIDGET(tqApp->desktop()->screen( _greeterScreen )) ))
+ if (KGVerify::handleFailVerify( tqApp->desktop()->screen( _greeterScreen ) ))
break;
_autoLoginDelay = 0;
cmd = G_Greet;
}
TDEProcess *proc2 = 0;
- app->setOverrideCursor( Qt::WaitCursor );
+ app->setOverrideCursor( TQt::WaitCursor );
FDialog *dialog = NULL;
#ifdef XDMCP
if (cmd == G_Choose) {