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.cpp53
1 files changed, 31 insertions, 22 deletions
diff --git a/tdm/kfrontend/kgapp.cpp b/tdm/kfrontend/kgapp.cpp
index 6c77b444b..731cb33b5 100644
--- a/tdm/kfrontend/kgapp.cpp
+++ b/tdm/kfrontend/kgapp.cpp
@@ -35,11 +35,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "sakdlg.h"
#include <kuser.h>
-#include <kprocess.h>
+#include <tdeprocess.h>
#include <tdecmdlineargs.h>
-#include <kcrash.h>
-#include <kstandarddirs.h>
-#include <ksimpleconfig.h>
+#include <tdecrash.h>
+#include <tdestandarddirs.h>
+#include <tdesimpleconfig.h>
#include <tdelocale.h>
#include <kdebug.h>
#ifdef WITH_XRANDR
@@ -70,9 +70,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
bool argb_visual_available = false;
bool has_twin = false;
bool is_themed = false;
-bool trinity_desktop_lock_use_sak = TRUE;
-bool trinity_desktop_synchronize_keyboard_lights = TRUE;
-bool trinity_desktop_watch_cryptographic_cards = TRUE;
+bool trinity_desktop_lock_use_sak = true;
+bool trinity_desktop_synchronize_keyboard_lights = true;
+bool trinity_desktop_watch_cryptographic_cards = true;
TQPoint primaryScreenPosition;
static int
@@ -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();
}
@@ -126,7 +126,7 @@ void GreeterApp::init()
#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
}
@@ -193,15 +193,13 @@ xIOErr( Display * )
exit( EX_RESERVER_DPY );
}
-//KSimpleConfig *iccconfig;
-
void
checkSAK(GreeterApp* app)
{
app->restoreOverrideCursor();
SAKDlg sak(0);
sak.exec();
- app->setOverrideCursor( Qt::WaitCursor );
+ app->setOverrideCursor( TQt::WaitCursor );
}
void
@@ -284,7 +282,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;
@@ -306,13 +304,24 @@ kg_main( const char *argv0 )
// Load up the systemwide ICC profile
TQString iccConfigFile = TQString(KDE_CONFDIR);
iccConfigFile += "/kicc/kiccconfigrc";
- KSimpleConfig iccconfig(iccConfigFile, true);
+ TDESimpleConfig 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());
+ }
}
}
@@ -335,7 +344,7 @@ kg_main( const char *argv0 )
_colorScheme = locate( "data", "tdedisplay/color-schemes/" + _colorScheme + ".kcsrc" );
if (!_colorScheme.isEmpty()) {
- KSimpleConfig config( _colorScheme, true );
+ TDESimpleConfig config( _colorScheme, true );
config.setGroup( "Color Scheme" );
app->setPalette( app->createApplicationPalette( &config, 7 ) );
}
@@ -400,14 +409,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) {