diff options
Diffstat (limited to 'ksmserver')
-rw-r--r-- | ksmserver/KSMServerInterface.h | 9 | ||||
-rw-r--r-- | ksmserver/main.cpp | 8 | ||||
-rw-r--r-- | ksmserver/server.cpp | 65 | ||||
-rw-r--r-- | ksmserver/server.h | 26 | ||||
-rw-r--r-- | ksmserver/shutdown.cpp | 128 | ||||
-rw-r--r-- | ksmserver/shutdowndlg.cpp | 142 | ||||
-rw-r--r-- | ksmserver/shutdowndlg.h | 14 | ||||
-rwxr-xr-x[-rw-r--r--] | ksmserver/shutdownkonq.png | bin | 62689 -> 81087 bytes | |||
-rw-r--r-- | ksmserver/startup.cpp | 20 | ||||
-rw-r--r-- | ksmserver/startupdlg.cpp | 4 |
10 files changed, 248 insertions, 168 deletions
diff --git a/ksmserver/KSMServerInterface.h b/ksmserver/KSMServerInterface.h index a628b92ba..3645eb84a 100644 --- a/ksmserver/KSMServerInterface.h +++ b/ksmserver/KSMServerInterface.h @@ -10,6 +10,11 @@ class KSMServerInterface : virtual public DCOPObject k_dcop: virtual void logout(int, int, int ) = 0; + virtual void logoutTimed( int, int, TQString ) = 0; + virtual bool suspend(int) = 0; + + virtual TQStringList suspendOptions() = 0; + virtual void restoreSessionInternal() = 0; virtual void restoreSessionDoneInternal() = 0; virtual TQStringList sessionList() = 0; @@ -19,11 +24,11 @@ k_dcop: virtual void saveCurrentSessionAs( TQString ) = 0; virtual void autoStart2() = 0; - + virtual void suspendStartup( TQCString ) = 0; virtual void resumeStartup( TQCString ) = 0; - virtual void logoutTimed( int, int, TQString ) = 0; + virtual void reconfigure() = 0; }; #endif diff --git a/ksmserver/main.cpp b/ksmserver/main.cpp index 977ba02e0..d095b1df7 100644 --- a/ksmserver/main.cpp +++ b/ksmserver/main.cpp @@ -172,7 +172,7 @@ void sanity_check( int argc, char* argv[] ) } } -extern "C" KDE_EXPORT int kdemain( int argc, char* argv[] ) +extern "C" TDE_EXPORT int kdemain( int argc, char* argv[] ) { sanity_check(argc, argv); @@ -192,8 +192,8 @@ extern "C" KDE_EXPORT int kdemain( int argc, char* argv[] ) TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - kapp->dcopClient()->registerAs("ksmserver", false); - if (!kapp->dcopClient()->isRegistered()) + tdeApp->dcopClient()->registerAs("ksmserver", false); + if (!tdeApp->dcopClient()->isRegistered()) { tqWarning("[KSMServer] Could not register with DCOPServer. Aborting."); return 1; @@ -217,7 +217,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char* argv[] ) #endif KSMServer *server = new KSMServer( TQString::fromLatin1(wm), TQString::fromLatin1(wmaddargs), only_local); - kapp->dcopClient()->setDefaultObject( server->objId() ); + tdeApp->dcopClient()->setDefaultObject( server->objId() ); IceSetIOErrorHandler( IoErrorHandler ); diff --git a/ksmserver/server.cpp b/ksmserver/server.cpp index aee40fcaa..b41adc551 100644 --- a/ksmserver/server.cpp +++ b/ksmserver/server.cpp @@ -69,12 +69,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tdelocale.h> #include <tdeglobal.h> #include <tdeconfig.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <unistd.h> #include <tdeapplication.h> #include <kstaticdeleter.h> #include <tdetempfile.h> -#include <kprocess.h> +#include <tdeprocess.h> #include <dcopclient.h> #include <dcopref.h> @@ -514,8 +514,8 @@ static void sighandler(int sig) delete server; } - if (kapp) { - kapp->quit(); + if (tdeApp) { + tdeApp->quit(); } //::exit(0); } @@ -603,9 +603,9 @@ KSMServer::KSMServer( const TQString& windowManager, const TQString& windowManag hwDevices = TDEGlobal::hardwareDevices(); #endif - connect( &knotifyTimeoutTimer, TQT_SIGNAL( timeout()), TQT_SLOT( knotifyTimeout())); - connect( &startupSuspendTimeoutTimer, TQT_SIGNAL( timeout()), TQT_SLOT( startupSuspendTimeout())); - connect( &pendingShutdown, TQT_SIGNAL( timeout()), TQT_SLOT( pendingShutdownTimeout())); + connect( &knotifyTimeoutTimer, TQ_SIGNAL( timeout()), TQ_SLOT( knotifyTimeout())); + connect( &startupSuspendTimeoutTimer, TQ_SIGNAL( timeout()), TQ_SLOT( startupSuspendTimeout())); + connect( &pendingShutdown, TQ_SIGNAL( timeout()), TQ_SLOT( pendingShutdownTimeout())); only_local = _only_local; #ifdef HAVE__ICETRANSNOLISTEN @@ -676,7 +676,7 @@ KSMServer::KSMServer( const TQString& windowManager, const TQString& windowManag for ( int i = 0; i < numTransports; i++) { con = new KSMListener( listenObjs[i] ); listener.append( con ); - connect( con, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( newConnection(int) ) ); + connect( con, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( newConnection(int) ) ); } signal(SIGHUP, sighandler); @@ -684,11 +684,13 @@ KSMServer::KSMServer( const TQString& windowManager, const TQString& windowManag signal(SIGINT, sighandler); signal(SIGPIPE, SIG_IGN); - connect( ¬ificationTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( notificationTimeout() ) ); - connect( &protectionTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( protectionTimerTick() ) ); - connect( &restoreTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( tryRestoreNext() ) ); - connect( &shutdownTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( timeoutQuit() ) ); - connect( kapp, TQT_SIGNAL( shutDown() ), this, TQT_SLOT( cleanUp() ) ); + connect( ¬ificationTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( notificationTimeout() ) ); + connect( &protectionTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( protectionTimerTick() ) ); + connect( &restoreTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( tryRestoreNext() ) ); + connect( &shutdownTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( timeoutQuit() ) ); + connect( tdeApp, TQ_SIGNAL( shutDown() ), this, TQ_SLOT( cleanUp() ) ); + + reconfigure(); } KSMServer::~KSMServer() @@ -697,6 +699,16 @@ KSMServer::~KSMServer() cleanUp(); } +void KSMServer::reconfigure() +{ + // respect lock on resume & disable suspend/hibernate settings + // from power-manager + TDEConfig cfg("power-managerrc"); + m_disableSuspend = cfg.readBoolEntry("disableSuspend", false); + m_disableHibernate = cfg.readBoolEntry("disableHibernate", false); + m_lockOnResume = cfg.readBoolEntry("lockOnResume", true); +} + void KSMServer::cleanUp() { if (clean) return; @@ -742,7 +754,7 @@ void KSMServer::cleanUp() void* KSMServer::watchConnection( IceConn iceConn ) { KSMConnection* conn = new KSMConnection( iceConn ); - connect( conn, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( processData(int) ) ); + connect( conn, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( processData(int) ) ); return (void*) conn; } @@ -919,6 +931,29 @@ void KSMServer::storeSession() config->sync(); } +TQStringList KSMServer::suspendOptions() +{ + reconfigure(); + + TQStringList sopt; + +#ifdef WITH_TDEHWLIB + TDERootSystemDevice* rootDevice = hwDevices->rootSystemDevice(); + if (rootDevice->canFreeze() && !m_disableSuspend) + sopt << "freeze"; + + if (rootDevice->canSuspend() && !m_disableSuspend) + sopt << "suspend"; + + if (rootDevice->canHibernate() && !m_disableHibernate) + sopt << "hibernate"; + + if (rootDevice->canHybridSuspend() && !m_disableSuspend && !m_disableHibernate) + sopt << "hybridSuspend"; +#endif + + return sopt; +} TQStringList KSMServer::sessionList() { @@ -995,4 +1030,4 @@ bool KSMServer::defaultSession() const bool KSMServer::startupCompleted() { return m_startupCompleted; -} +}
\ No newline at end of file diff --git a/ksmserver/server.h b/ksmserver/server.h index fdf08cded..511013dc7 100644 --- a/ksmserver/server.h +++ b/ksmserver/server.h @@ -37,6 +37,17 @@ class KSMListener; class KSMConnection; class KSMClient; +namespace SuspendType { + enum SuspendType { + NotSpecified = 0, + Freeze, + Standby, // not implemented + Suspend, + Hibernate, + HybridSuspend + }; +}; + enum SMType { SM_ERROR, SM_WMCOMMAND, SM_WMSAVEYOURSELF }; struct SMData { @@ -103,6 +114,7 @@ public: public slots: void cleanUp(); + void reconfigure(); private slots: void newConnection( int socket ); @@ -172,6 +184,8 @@ private: TDEApplication::ShutdownMode sdmode, TQString bootOption = TQString::null ); + void suspendInternal(int state); + void performLegacySessionSave(); void storeLegacySession( TDEConfig* config ); void restoreLegacySession( TDEConfig* config ); @@ -186,12 +200,14 @@ private: void resumeStartupInternal(); // public dcop interface - void logout( int, int, int ); - virtual void logoutTimed( int, int, TQString ); + void logout(int, int, int); + virtual void logoutTimed(int, int, TQString); + bool suspend(int); + TQStringList suspendOptions(); TQStringList sessionList(); TQString currentSession(); void saveCurrentSession(); - void saveCurrentSessionAs( TQString ); + void saveCurrentSessionAs(TQString); TQWidget* startupNotifierIPDlg; TQWidget* shutdownNotifierIPDlg; @@ -240,6 +256,10 @@ private: TDEApplication::ShutdownType pendingShutdown_sdtype; TDEApplication::ShutdownMode pendingShutdown_sdmode; + bool m_disableSuspend; + bool m_disableHibernate; + bool m_lockOnResume; + // ksplash interface void upAndRunning( const TQString& msg ); void publishProgress( int progress, bool max = false ); diff --git a/ksmserver/shutdown.cpp b/ksmserver/shutdown.cpp index ec27f7768..4b30d5cf4 100644 --- a/ksmserver/shutdown.cpp +++ b/ksmserver/shutdown.cpp @@ -69,12 +69,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tdelocale.h> #include <tdeglobal.h> #include <tdeconfig.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <unistd.h> #include <tdeapplication.h> #include <kstaticdeleter.h> #include <tdetempfile.h> -#include <kprocess.h> +#include <tdeprocess.h> #include <dcopclient.h> #include <dcopref.h> #include <dmctl.h> @@ -222,45 +222,13 @@ void KSMServer::shutdownInternal( TDEApplication::ShutdownConfirm confirm, if ( !logoutConfirmed ) { int selection; KSMShutdownFeedback::start(); // make the screen gray - logoutConfirmed = - KSMShutdownDlg::confirmShutdown( maysd, mayrb, sdtype, bopt, &selection ); + logoutConfirmed = KSMShutdownDlg::confirmShutdown( maysd, mayrb, sdtype, bopt, &selection ); // ###### We can't make the screen remain gray while talking to the apps, // because this prevents interaction ("do you want to save", etc.) // TODO: turn the feedback widget into a list of apps to be closed, // with an indicator of the current status for each. KSMShutdownFeedback::stop(); // make the screen become normal again - if (selection != SuspendType::NotSpecified) { - // respect lock on resume & disable suspend/hibernate settings - // from power-manager - TDEConfig config("power-managerrc"); - bool lockOnResume = config.readBoolEntry("lockOnResume", true); - if (lockOnResume) { - TQCString replyType; - TQByteArray replyData; - // Block here until lock is complete - // If this is not done the desktop of the locked session will be shown after suspend/hibernate until the lock fully engages! - kapp->dcopClient()->call("kdesktop", "KScreensaverIface", "lock()", TQCString(""), replyType, replyData); - } -#ifdef WITH_TDEHWLIB - TDERootSystemDevice* rootDevice = hwDevices->rootSystemDevice(); - if (rootDevice) { - switch (selection) { - case SuspendType::Freeze: - rootDevice->setPowerState(TDESystemPowerState::Freeze); - break; - case SuspendType::Suspend: - rootDevice->setPowerState(TDESystemPowerState::Suspend); - break; - case SuspendType::Hibernate: - rootDevice->setPowerState(TDESystemPowerState::Hibernate); - break; - case SuspendType::HybridSuspend: - rootDevice->setPowerState(TDESystemPowerState::HybridSuspend); - break; - } - } -#endif - } + suspend(selection); } if ( logoutConfirmed ) { @@ -272,8 +240,8 @@ void KSMServer::shutdownInternal( TDEApplication::ShutdownConfirm confirm, if (showLogoutStatusDlg) { shutdownNotifierIPDlg = KSMShutdownIPDlg::showShutdownIP(); if (shutdownNotifierIPDlg) { - connect(shutdownNotifierIPDlg, SIGNAL(abortLogoutClicked()), this, SLOT(cancelShutdown())); - connect(shutdownNotifierIPDlg, SIGNAL(skipNotificationClicked()), this, SLOT(forceSkipSaveYourself())); + connect(shutdownNotifierIPDlg, TQ_SIGNAL(abortLogoutClicked()), this, TQ_SLOT(cancelShutdown())); + connect(shutdownNotifierIPDlg, TQ_SIGNAL(skipNotificationClicked()), this, TQ_SLOT(forceSkipSaveYourself())); static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg)->setStatusMessage(i18n("Notifying applications of logout request...")); notificationTimer.start( KSMSERVER_NOTIFICATION_MANUAL_OPTIONS_TIMEOUT, true ); } @@ -289,7 +257,7 @@ void KSMServer::shutdownInternal( TDEApplication::ShutdownConfirm confirm, // Set the real desktop background to black so that exit looks // clean regardless of what was on "our" desktop. if (!showLogoutStatusDlg) { - kapp->desktop()->setBackgroundColor( TQt::black ); + tdeApp->desktop()->setBackgroundColor( TQt::black ); } state = Shutdown; wmPhase1WaitingCount = 0; @@ -343,6 +311,70 @@ void KSMServer::shutdown( TDEApplication::ShutdownConfirm confirm, shutdownInternal( confirm, sdtype, sdmode ); } +void KSMServer::suspendInternal(int state) +{ + if (m_lockOnResume) { + TQCString replyType; + TQByteArray replyData; + // Block here until lock is complete + // If this is not done the desktop of the locked session will be shown after suspend/hibernate until the lock fully engages! + tdeApp->dcopClient()->call("kdesktop", "KScreensaverIface", "lock()", TQCString(""), replyType, replyData); + } + +#ifdef WITH_TDEHWLIB + TDERootSystemDevice* rootDevice = hwDevices->rootSystemDevice(); + rootDevice->setPowerState((TDESystemPowerState::TDESystemPowerState)state); +#endif +} + +bool KSMServer::suspend(int stype) +{ + if (stype == SuspendType::NotSpecified) + return false; + + reconfigure(); + +#ifdef WITH_TDEHWLIB + TDERootSystemDevice* rootDevice = hwDevices->rootSystemDevice(); + if (rootDevice) { + switch (stype) { + case SuspendType::Freeze: + if (rootDevice->canFreeze() && !m_disableSuspend) + { + suspendInternal(TDESystemPowerState::Freeze); + return true; + } + break; + + case SuspendType::Suspend: + if (rootDevice->canSuspend() && !m_disableSuspend) + { + suspendInternal(TDESystemPowerState::Suspend); + return true; + } + break; + + case SuspendType::Hibernate: + if (rootDevice->canHibernate() && !m_disableHibernate) + { + suspendInternal(TDESystemPowerState::Hibernate); + return true; + } + break; + + case SuspendType::HybridSuspend: + if (rootDevice->canHybridSuspend() && !m_disableSuspend && !m_disableHibernate) + { + suspendInternal(TDESystemPowerState::HybridSuspend); + return true; + } + break; + } + } +#endif + return false; +} + #include <tdemessagebox.h> void KSMServer::logoutTimed( int sdtype, int sdmode, TQString bootOption ) @@ -764,8 +796,8 @@ void KSMServer::completeShutdownOrCheckpoint() if (!shutdownNotifierIPDlg) { shutdownNotifierIPDlg = KSMShutdownIPDlg::showShutdownIP(); if (shutdownNotifierIPDlg) { - connect(shutdownNotifierIPDlg, SIGNAL(abortLogoutClicked()), this, SLOT(cancelShutdown())); - connect(shutdownNotifierIPDlg, SIGNAL(skipNotificationClicked()), this, SLOT(forceSkipSaveYourself())); + connect(shutdownNotifierIPDlg, TQ_SIGNAL(abortLogoutClicked()), this, TQ_SLOT(cancelShutdown())); + connect(shutdownNotifierIPDlg, TQ_SIGNAL(skipNotificationClicked()), this, TQ_SLOT(forceSkipSaveYourself())); } } while (!KSMShutdownIPFeedback::ispainted()) { @@ -801,12 +833,12 @@ void KSMServer::completeShutdownOrCheckpoint() if ( state == Shutdown ) { bool waitForKNotify = true; - if( !kapp->dcopClient()->connectDCOPSignal( "knotify", "", + if( !tdeApp->dcopClient()->connectDCOPSignal( "knotify", "", "notifySignal(TQString,TQString,TQString,TQString,TQString,int,int,int,int)", "ksmserver", "notifySlot(TQString,TQString,TQString,TQString,TQString,int,int,int,int)", false )) { waitForKNotify = false; } - if( !kapp->dcopClient()->connectDCOPSignal( "knotify", "", + if( !tdeApp->dcopClient()->connectDCOPSignal( "knotify", "", "playingFinished(int,int)", "ksmserver", "logoutSoundFinished(int,int)", false )) { waitForKNotify = false; @@ -876,14 +908,14 @@ void KSMServer::startKilling() kdDebug( 1218 ) << " We killed all clients. We have now clients.count()=" << clients.count() << endl; completeKilling(); - shutdownTimer.start( KSMSERVER_SHUTDOWN_CLIENT_UNRESPONSIVE_TIMEOUT, TRUE ); + shutdownTimer.start( KSMSERVER_SHUTDOWN_CLIENT_UNRESPONSIVE_TIMEOUT, true ); } void KSMServer::completeKilling() { // Activity detected; reset forcible shutdown timer... if (shutdownTimer.isActive()) { - shutdownTimer.start( KSMSERVER_SHUTDOWN_CLIENT_UNRESPONSIVE_TIMEOUT, TRUE ); + shutdownTimer.start( KSMSERVER_SHUTDOWN_CLIENT_UNRESPONSIVE_TIMEOUT, true ); } SHUTDOWN_MARKER("completeKilling"); kdDebug( 1218 ) << "KSMServer::completeKilling clients.count()=" << clients.count() << endl; @@ -963,7 +995,7 @@ void KSMServer::killWM() } if( iswm ) { completeKillingWM(); - TQTimer::singleShot( 5000, this, TQT_SLOT( timeoutWMQuit() ) ); + TQTimer::singleShot( 5000, this, TQ_SLOT( timeoutWMQuit() ) ); } else { killingCompleted(); @@ -992,7 +1024,7 @@ void KSMServer::killingCompleted() pid_t child; child = fork(); if (child != 0) { - kapp->quit(); + tdeApp->quit(); } else if (child == 0) { // If any remaining client(s) do not exit quickly (e.g. drkonqui) terminate so that they can be seen and interacted with @@ -1001,7 +1033,7 @@ void KSMServer::killingCompleted() } } else { - kapp->quit(); + tdeApp->quit(); } } diff --git a/ksmserver/shutdowndlg.cpp b/ksmserver/shutdowndlg.cpp index 0d1cbd4ef..b8a91d3f4 100644 --- a/ksmserver/shutdowndlg.cpp +++ b/ksmserver/shutdowndlg.cpp @@ -11,6 +11,7 @@ Copyright (C) 2000 Matthias Ettrich <ettrich@kde.org> #endif #include "shutdowndlg.h" +#include "server.h" #include <tqapplication.h> #include <tqlayout.h> @@ -77,15 +78,15 @@ KSMShutdownFeedback::KSMShutdownFeedback() m_currentY( 0 ), m_grayOpacity( 0.0f ), m_compensation( 0.0f ), - m_fadeBackwards( FALSE ), + m_fadeBackwards( false ), m_unfadedImage(), m_grayImage(), m_fadeTime(), m_pmio(), - m_greyImageCreated( FALSE ) + m_greyImageCreated( false ) { - if (kapp->isX11CompositionAvailable()) { + if (tdeApp->isX11CompositionAvailable()) { m_grayImage = TQImage( TQApplication::desktop()->width(), TQApplication::desktop()->height(), 32 ); m_grayImage = m_grayImage.convertDepth(32); m_grayImage.setAlphaBuffer(false); @@ -105,14 +106,14 @@ KSMShutdownFeedback::KSMShutdownFeedback() m_unfadedImage = m_grayImage; resize(0, 0); setShown(true); - TQTimer::singleShot( 500, this, TQT_SLOT( slotPaintEffect() ) ); + TQTimer::singleShot( 500, this, TQ_SLOT( slotPaintEffect() ) ); } // called after stopping shutdown-feedback -> smooth fade-back to color-mode void KSMShutdownFeedback::fadeBack( void ) { m_fadeTime.restart(); - m_fadeBackwards = TRUE; + m_fadeBackwards = true; // its possible that we have to fade back, before all is completely gray, so we cannot start // with completely gray when fading back... m_compensation = 1.0f - m_grayOpacity; @@ -131,12 +132,12 @@ void KSMShutdownFeedback::slotPaintEffect() float doFancyLogoutFadeTime = (float)TDEConfigGroup(TDEGlobal::config(), "Logout").readDoubleNumEntry("doFancyLogoutFadeTime", 4000); float doFancyLogoutFadeBackTime = (float)TDEConfigGroup(TDEGlobal::config(), "Logout").readDoubleNumEntry("doFancyLogoutFadeBackTime", 1000); - if (kapp->isX11CompositionAvailable()) { + if (tdeApp->isX11CompositionAvailable()) { // We can do this in a different (simpler) manner because we have compositing support! // if slotPaintEffect() is called first time, we have to initialize the gray image // we also could do that in the constructor, but then the displaying of the // logout-UI would be too much delayed... - if ( m_greyImageCreated == false ) + if ( !m_greyImageCreated ) { m_greyImageCreated = true; @@ -169,11 +170,11 @@ void KSMShutdownFeedback::slotPaintEffect() } // return if fading is completely done... - if ( ( m_grayOpacity >= 1.0f && m_fadeBackwards == FALSE ) || ( m_grayOpacity <= 0.0f && m_fadeBackwards == TRUE ) ) + if ( ( m_grayOpacity >= 1.0f && !m_fadeBackwards ) || ( m_grayOpacity <= 0.0f && m_fadeBackwards ) ) return; - if ( m_fadeBackwards == FALSE ) + if ( !m_fadeBackwards ) { m_grayOpacity = m_fadeTime.elapsed() / doFancyLogoutFadeTime; if ( m_grayOpacity > 1.0f ) @@ -200,7 +201,7 @@ void KSMShutdownFeedback::slotPaintEffect() if( y2 > imgHeight ) y2 = imgHeight; - if( m_fadeBackwards == FALSE ) + if( !m_fadeBackwards ) { if( y1 > 0 && y1 < imgHeight && y1-m_rowsDone > 0 && m_rowsDone < imgHeight ) { @@ -243,13 +244,13 @@ void KSMShutdownFeedback::slotPaintEffect() bitBlt( this, 0, start_y1, &img ); } - TQTimer::singleShot( 5, this, TQT_SLOT( slotPaintEffect() ) ); + TQTimer::singleShot( 5, this, TQ_SLOT( slotPaintEffect() ) ); } else { // if slotPaintEffect() is called first time, we have to initialize the gray image // we also could do that in the constructor, but then the displaying of the // logout-UI would be too much delayed... - if ( m_greyImageCreated == false ) + if ( !m_greyImageCreated ) { m_greyImageCreated = true; @@ -277,11 +278,11 @@ void KSMShutdownFeedback::slotPaintEffect() } // return if fading is completely done... - if ( ( m_grayOpacity >= 1.0f && m_fadeBackwards == FALSE ) || ( m_grayOpacity <= 0.0f && m_fadeBackwards == TRUE ) ) + if ( ( m_grayOpacity >= 1.0f && !m_fadeBackwards ) || ( m_grayOpacity <= 0.0f && m_fadeBackwards ) ) return; - if ( m_fadeBackwards == FALSE ) + if ( !m_fadeBackwards ) { m_grayOpacity = m_fadeTime.elapsed() / doFancyLogoutFadeTime; if ( m_grayOpacity > 1.0f ) @@ -308,7 +309,7 @@ void KSMShutdownFeedback::slotPaintEffect() if( y2 > imgHeight ) y2 = imgHeight; - if( m_fadeBackwards == FALSE ) + if( !m_fadeBackwards ) { if( y1 > 0 && y1 < imgHeight && y1-m_rowsDone > 0 && m_rowsDone < imgHeight ) { @@ -370,18 +371,18 @@ void KSMShutdownFeedback::slotPaintEffect() bitBlt( this, 0, start_y1, &img ); } - TQTimer::singleShot( 5, this, TQT_SLOT( slotPaintEffect() ) ); + TQTimer::singleShot( 5, this, TQ_SLOT( slotPaintEffect() ) ); } } else { if (TDEConfigGroup(TDEGlobal::config(), "Logout").readBoolEntry("doFadeaway", true)) { // standard logout fade - if (kapp->isX11CompositionAvailable()) { + if (tdeApp->isX11CompositionAvailable()) { // We can do this in a different (simpler) manner because we have compositing support! // The end effect will be very similar to the old style logout float doFancyLogoutFadeTime = 1000; float doFancyLogoutFadeBackTime = 0; - if ( m_greyImageCreated == false ) { + if ( !m_greyImageCreated ) { m_greyImageCreated = true; // eliminate nasty flicker on first show @@ -413,11 +414,11 @@ void KSMShutdownFeedback::slotPaintEffect() } // return if fading is completely done... - if ( ( m_grayOpacity >= 1.0f && m_fadeBackwards == FALSE ) || ( m_grayOpacity <= 0.0f && m_fadeBackwards == TRUE ) ) { + if ( ( m_grayOpacity >= 1.0f && !m_fadeBackwards ) || ( m_grayOpacity <= 0.0f && m_fadeBackwards ) ) { return; } - if ( m_fadeBackwards == FALSE ) { + if ( !m_fadeBackwards ) { m_grayOpacity = m_fadeTime.elapsed() / doFancyLogoutFadeTime; if ( m_grayOpacity > 1.0f ) m_grayOpacity = 1.0f; @@ -444,7 +445,7 @@ void KSMShutdownFeedback::slotPaintEffect() y2 = imgHeight; } - if( m_fadeBackwards == FALSE ) + if( !m_fadeBackwards ) { if( y1 > 0 && y1 < imgHeight && y1-m_rowsDone > 0 && m_rowsDone < imgHeight ) { @@ -486,7 +487,7 @@ void KSMShutdownFeedback::slotPaintEffect() bitBlt( this, 0, start_y1, &img ); } - TQTimer::singleShot( 1, this, TQT_SLOT( slotPaintEffect() ) ); + TQTimer::singleShot( 1, this, TQ_SLOT( slotPaintEffect() ) ); } else { if ( m_currentY >= height() ) { @@ -517,7 +518,7 @@ void KSMShutdownFeedback::slotPaintEffect() bitBlt( this, 0, m_currentY, &pixmap ); bitBlt( &m_root, 0, m_currentY, &pixmap ); m_currentY += 10; - TQTimer::singleShot( 1, this, TQT_SLOT( slotPaintEffect() ) ); + TQTimer::singleShot( 1, this, TQ_SLOT( slotPaintEffect() ) ); } } } @@ -539,7 +540,7 @@ KSMShutdownIPFeedback::KSMShutdownIPFeedback() m_sharedRootPixmap = new KRootPixmap(this); m_sharedRootPixmap->setCustomPainting(true); - connect(m_sharedRootPixmap, TQT_SIGNAL(backgroundUpdated(const TQPixmap &)), this, TQT_SLOT(slotSetBackgroundPixmap(const TQPixmap &))); + connect(m_sharedRootPixmap, TQ_SIGNAL(backgroundUpdated(const TQPixmap &)), this, TQ_SLOT(slotSetBackgroundPixmap(const TQPixmap &))); if (TQPaintDevice::x11AppDepth() == 32) { // The shared pixmap is 24 bits, but we are 32 bits @@ -571,15 +572,15 @@ void KSMShutdownIPFeedback::showNow() if (!m_isPainted) { setGeometry( TQApplication::desktop()->geometry() ); - TQTimer::singleShot( 0, this, SLOT(slotPaintEffect()) ); + TQTimer::singleShot( 0, this, TQ_SLOT(slotPaintEffect()) ); } } void KSMShutdownIPFeedback::enableExports() { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 kdDebug(270) << k_lineinfo << "activating background exports.\n"; - DCOPClient *client = kapp->dcopClient(); + DCOPClient *client = tdeApp->dcopClient(); if (!client->isAttached()) { client->attach(); } @@ -632,7 +633,7 @@ void KSMShutdownIPFeedback::slotPaintEffect() m_sharedRootPixmap->start(); } - TQTimer::singleShot( 100, this, SLOT(slotPaintEffect()) ); + TQTimer::singleShot( 100, this, TQ_SLOT(slotPaintEffect()) ); mPixmapTimeout++; return; } @@ -645,14 +646,14 @@ void KSMShutdownIPFeedback::slotPaintEffect() pm = TQPixmap(); } } - if ((pm.isNull()) || (pm.width() != kapp->desktop()->width()) || (pm.height() != kapp->desktop()->height())) { + if ((pm.isNull()) || (pm.width() != tdeApp->desktop()->width()) || (pm.height() != tdeApp->desktop()->height())) { if (mPixmapTimeout < 10) { - TQTimer::singleShot( 100, this, SLOT(slotPaintEffect()) ); + TQTimer::singleShot( 100, this, TQ_SLOT(slotPaintEffect()) ); mPixmapTimeout++; return; } else { - pm = TQPixmap(kapp->desktop()->width(), kapp->desktop()->height()); + pm = TQPixmap(tdeApp->desktop()->width(), tdeApp->desktop()->height()); pm.fill(TQt::black); m_paintedFromSharedRootPixmap = false; } @@ -703,7 +704,7 @@ void KSMShutdownIPFeedback::slotPaintEffect() KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, bool maysd, bool mayrb, TDEApplication::ShutdownType sdtype, int* selection ) - : TQDialog( parent, 0, TRUE, (WFlags)WType_Popup ), targets(0), m_selection(selection) + : TQDialog( parent, 0, true, (WFlags)WType_Popup ), targets(0), m_selection(selection) // this is a WType_Popup on purpose. Do not change that! Not // having a popup here has severe side effects. @@ -766,7 +767,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, int i = btnLogout->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 btnLogout->setAccel( "ALT+" + btnLogout->textLabel().lower()[i+1] ) ; hbuttonbox->addWidget ( btnLogout ); - connect(btnLogout, TQT_SIGNAL(clicked()), TQT_SLOT(slotLogout())); + connect(btnLogout, TQ_SIGNAL(clicked()), TQ_SLOT(slotLogout())); } else { @@ -794,7 +795,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, TQToolTip::add( btnLogout, i18n( "<qt><p>Log out of the current session to login as a different user.</p></qt>" ) ); btnFont = btnLogout->font(); buttonlay->addWidget( btnLogout ); - connect(btnLogout, TQT_SIGNAL(clicked()), TQT_SLOT(slotLogout())); + connect(btnLogout, TQ_SIGNAL(clicked()), TQ_SLOT(slotLogout())); } if ((maysd) || (mayrb)) { @@ -804,7 +805,6 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, TDEConfig config("power-managerrc"); bool disableSuspend = config.readBoolEntry("disableSuspend", false); bool disableHibernate = config.readBoolEntry("disableHibernate", false); - m_lockOnResume = config.readBoolEntry("lockOnResume", true); bool canFreeze = false; bool canSuspend = false; @@ -841,7 +841,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, int i = btnFreeze->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 btnFreeze->setAccel( "ALT+" + btnFreeze->textLabel().lower()[i+1] ) ; hbuttonbox->addWidget ( btnFreeze ); - connect(btnFreeze, TQT_SIGNAL(clicked()), TQT_SLOT(slotFreeze())); + connect(btnFreeze, TQ_SIGNAL(clicked()), TQ_SLOT(slotFreeze())); } if (canSuspend && !disableSuspend) @@ -857,7 +857,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, int i = btnSuspend->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 btnSuspend->setAccel( "ALT+" + btnSuspend->textLabel().lower()[i+1] ) ; hbuttonbox->addWidget ( btnSuspend ); - connect(btnSuspend, TQT_SIGNAL(clicked()), TQT_SLOT(slotSuspend())); + connect(btnSuspend, TQ_SIGNAL(clicked()), TQ_SLOT(slotSuspend())); } if (canHibernate && !disableHibernate) @@ -872,7 +872,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, int i = btnHibernate->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 btnHibernate->setAccel( "ALT+" + btnHibernate->textLabel().lower()[i+1] ) ; hbuttonbox->addWidget ( btnHibernate ); - connect(btnHibernate, TQT_SIGNAL(clicked()), TQT_SLOT(slotHibernate())); + connect(btnHibernate, TQ_SIGNAL(clicked()), TQ_SLOT(slotHibernate())); } if (canHybridSuspend && !disableSuspend && !disableHibernate) @@ -890,9 +890,9 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, int i = btnHybridSuspend->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 btnHybridSuspend->setAccel( "ALT+" + btnHybridSuspend->textLabel().lower()[i+1] ) ; hbuttonbox->addWidget ( btnHybridSuspend ); - connect(btnHybridSuspend, TQT_SIGNAL(clicked()), TQT_SLOT(slotHybridSuspend())); + connect(btnHybridSuspend, TQ_SIGNAL(clicked()), TQ_SLOT(slotHybridSuspend())); } - + // Separator (within buttonlay) vbox->addWidget( new KSeparator( frame ) ); @@ -909,7 +909,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, int i = btnReboot->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 btnReboot->setAccel( "ALT+" + btnReboot->textLabel().lower()[i+1] ) ; hbuttonbox2->addWidget ( btnReboot); - connect(btnReboot, TQT_SIGNAL(clicked()), TQT_SLOT(slotReboot())); + connect(btnReboot, TQ_SIGNAL(clicked()), TQ_SLOT(slotReboot())); if ( sdtype == TDEApplication::ShutdownTypeReboot ) { btnReboot->setFocus(); } @@ -936,7 +936,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, } btnReboot->setPopup(targets); - connect( targets, TQT_SIGNAL(activated(int)), TQT_SLOT(slotReboot(int)) ); + connect( targets, TQ_SIGNAL(activated(int)), TQ_SLOT(slotReboot(int)) ); } // BAD KARMA .. this code is copied line by line from standard konqy dialog [EOF] } @@ -950,7 +950,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, int i = btnHalt->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 btnHalt->setAccel( "ALT+" + btnHalt->textLabel().lower()[i+1] ) ; hbuttonbox2->addWidget ( btnHalt ); - connect(btnHalt, TQT_SIGNAL(clicked()), TQT_SLOT(slotHalt())); + connect(btnHalt, TQ_SIGNAL(clicked()), TQ_SLOT(slotHalt())); if ( sdtype == TDEApplication::ShutdownTypeHalt ) { btnHalt->setFocus(); } @@ -963,7 +963,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, // Back to Desktop KSMPushButton* btnBack = new KSMPushButton( KStdGuiItem::cancel(), frame ); hbuttonbox3->addWidget( btnBack ); - connect(btnBack, TQT_SIGNAL(clicked()), TQT_SLOT(reject())); + connect(btnBack, TQ_SIGNAL(clicked()), TQ_SLOT(reject())); } else @@ -975,7 +975,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, TQToolTip::add( btnHalt, i18n( "<qt><p>Log out of the current session and turn off the computer.</p></qt>" ) ); btnHalt->setFont( btnFont ); buttonlay->addWidget( btnHalt ); - connect(btnHalt, TQT_SIGNAL(clicked()), TQT_SLOT(slotHalt())); + connect(btnHalt, TQ_SIGNAL(clicked()), TQ_SLOT(slotHalt())); if ( sdtype == TDEApplication::ShutdownTypeHalt || getenv("TDM_AUTOLOGIN") ) { btnHalt->setFocus(); } @@ -988,7 +988,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, btnReboot->setFont( btnFont ); buttonlay->addWidget( btnReboot ); - connect(btnReboot, TQT_SIGNAL(clicked()), TQT_SLOT(slotReboot())); + connect(btnReboot, TQ_SIGNAL(clicked()), TQ_SLOT(slotReboot())); if ( sdtype == TDEApplication::ShutdownTypeReboot ) { btnReboot->setFocus(); } @@ -1014,7 +1014,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, } btnReboot->setPopup(targets); - connect( targets, TQT_SIGNAL(activated(int)), TQT_SLOT(slotReboot(int)) ); + connect( targets, TQ_SIGNAL(activated(int)), TQ_SLOT(slotReboot(int)) ); } } @@ -1026,7 +1026,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, " almost instantly.</p><p>This correspond to ACPI S0 mode.</p></qt>")); btnFreeze->setFont( btnFont ); buttonlay->addWidget( btnFreeze ); - connect(btnFreeze, TQT_SIGNAL(clicked()), TQT_SLOT(slotFreeze())); + connect(btnFreeze, TQ_SIGNAL(clicked()), TQ_SLOT(slotFreeze())); } if (canSuspend && !disableSuspend) @@ -1038,7 +1038,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, "<p>Also known as Suspend-to-RAM mode.</p></qt>")); btnSuspend->setFont( btnFont ); buttonlay->addWidget( btnSuspend ); - connect(btnSuspend, TQT_SIGNAL(clicked()), TQT_SLOT(slotSuspend())); + connect(btnSuspend, TQ_SIGNAL(clicked()), TQ_SLOT(slotSuspend())); } if (canHibernate && !disableHibernate) @@ -1049,7 +1049,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, " considerable time is required to reactivate the system again.</p><p>This correspond to ACPI S4 mode.</p><p>Also known as Suspend-to-Disk mode.</p></qt>")); btnHibernate->setFont( btnFont ); buttonlay->addWidget( btnHibernate ); - connect(btnHibernate, TQT_SIGNAL(clicked()), TQT_SLOT(slotHibernate())); + connect(btnHibernate, TQ_SIGNAL(clicked()), TQ_SLOT(slotHibernate())); } if (canHybridSuspend && !disableSuspend && !disableHibernate) @@ -1063,9 +1063,9 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, "<p>Also known as Suspend-to-RAM + Suspend-to-Disk mode.</p></qt>")); btnHybridSuspend->setFont( btnFont ); buttonlay->addWidget( btnHybridSuspend ); - connect(btnHybridSuspend, TQT_SIGNAL(clicked()), TQT_SLOT(slotHybridSuspend())); + connect(btnHybridSuspend, TQ_SIGNAL(clicked()), TQ_SLOT(slotHybridSuspend())); } - + buttonlay->addStretch( 1 ); // Separator @@ -1074,7 +1074,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, // Back to Desktop KPushButton* btnBack = new KPushButton( KStdGuiItem::cancel(), frame ); buttonlay->addWidget( btnBack ); - connect(btnBack, TQT_SIGNAL(clicked()), TQT_SLOT(reject())); + connect(btnBack, TQ_SIGNAL(clicked()), TQ_SLOT(reject())); } } else { @@ -1089,7 +1089,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, KSMPushButton* btnBack = new KSMPushButton( KStdGuiItem::cancel(), frame ); hbuttonbox3->addWidget( btnBack ); - connect(btnBack, TQT_SIGNAL(clicked()), TQT_SLOT(reject())); + connect(btnBack, TQ_SIGNAL(clicked()), TQ_SLOT(reject())); } else { @@ -1100,7 +1100,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, KPushButton* btnBack = new KPushButton( KStdGuiItem::cancel(), frame ); buttonlay->addWidget( btnBack ); - connect(btnBack, TQT_SIGNAL(clicked()), TQT_SLOT(reject())); + connect(btnBack, TQ_SIGNAL(clicked()), TQ_SLOT(reject())); } } } @@ -1168,7 +1168,7 @@ void KSMShutdownDlg::slotHybridSuspend() bool KSMShutdownDlg::confirmShutdown( bool maysd, bool mayrb, TDEApplication::ShutdownType& sdtype, TQString& bootOption, int* selection ) { - kapp->enableStyles(); + tdeApp->enableStyles(); KSMShutdownDlg* l = new KSMShutdownDlg( 0 /*KSMShutdownFeedback::self()*/, maysd, mayrb, sdtype, selection ); // Show dialog (will save the background in showEvent) @@ -1182,16 +1182,16 @@ bool KSMShutdownDlg::confirmShutdown( bool maysd, bool mayrb, TDEApplication::Sh delete l; - kapp->disableStyles(); + tdeApp->disableStyles(); return result; } TQWidget* KSMShutdownIPDlg::showShutdownIP() { - kapp->enableStyles(); + tdeApp->enableStyles(); KSMShutdownIPDlg* l = new KSMShutdownIPDlg( 0 ); - kapp->disableStyles(); + tdeApp->disableStyles(); return l; } @@ -1246,8 +1246,8 @@ KSMShutdownIPDlg::KSMShutdownIPDlg(TQWidget* parent) setNotificationActionButtonsSkipText(i18n("Skip Notification")); m_button2->setText(i18n("Abort Logout")); - connect(m_button1, SIGNAL(clicked()), this, SIGNAL(skipNotificationClicked())); - connect(m_button2, SIGNAL(clicked()), this, SIGNAL(abortLogoutClicked())); + connect(m_button1, TQ_SIGNAL(clicked()), this, TQ_SIGNAL(skipNotificationClicked())); + connect(m_button2, TQ_SIGNAL(clicked()), this, TQ_SIGNAL(abortLogoutClicked())); show(); setActiveWindow(); @@ -1264,10 +1264,10 @@ KSMDelayedPushButton::KSMDelayedPushButton( const KGuiItem &item, const char *name) : KPushButton( item, parent, name), pop(0), popt(0) { - connect(this, TQT_SIGNAL(pressed()), TQT_SLOT(slotPressed())); - connect(this, TQT_SIGNAL(released()), TQT_SLOT(slotReleased())); + connect(this, TQ_SIGNAL(pressed()), TQ_SLOT(slotPressed())); + connect(this, TQ_SIGNAL(released()), TQ_SLOT(slotReleased())); popt = new TQTimer(this); - connect(popt, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout())); + connect(popt, TQ_SIGNAL(timeout()), TQ_SLOT(slotTimeout())); } void KSMDelayedPushButton::setPopup(TQPopupMenu *p) @@ -1329,7 +1329,7 @@ KSMDelayedMessageBox::KSMDelayedMessageBox( TDEApplication::ShutdownType sdtype, } TQTimer *timer = new TQTimer( this ); timer->start( 1000 ); - connect( timer, TQT_SIGNAL( timeout() ), TQT_SLOT( updateText() ) ); + connect( timer, TQ_SIGNAL( timeout() ), TQ_SLOT( updateText() ) ); KDialog::centerOnScreen(this); } @@ -1346,7 +1346,7 @@ void KSMDelayedMessageBox::updateText() bool KSMDelayedMessageBox::showTicker( TDEApplication::ShutdownType sdtype, const TQString &bootOption, int confirmDelay ) { - kapp->enableStyles(); + tdeApp->enableStyles(); KSMDelayedMessageBox msg( sdtype, bootOption, confirmDelay ); TQSize sh = msg.sizeHint(); TQRect rect = TDEGlobalSettings::desktopGeometry(TQCursor::pos()); @@ -1355,7 +1355,7 @@ bool KSMDelayedMessageBox::showTicker( TDEApplication::ShutdownType sdtype, cons rect.y() + (rect.height() - sh.height())/2); bool result = msg.exec(); - kapp->disableStyles(); + tdeApp->disableStyles(); return result; } @@ -1377,7 +1377,7 @@ switch ( e->key() ) case Key_Enter: case Key_Return: case Key_Space: - m_pressed = TRUE; + m_pressed = true; setDown(true); emit pressed(); break; @@ -1402,7 +1402,7 @@ void KSMPushButton::keyReleaseEvent( TQKeyEvent* e ) if ( m_pressed ) { setDown(false); - m_pressed = FALSE; + m_pressed = false; emit released(); emit clicked(); } @@ -1447,7 +1447,7 @@ void FlatButton::keyPressEvent( TQKeyEvent* e ) case Key_Enter: case Key_Return: case Key_Space: - m_pressed = TRUE; + m_pressed = true; setDown(true); emit pressed(); break; @@ -1472,7 +1472,7 @@ void FlatButton::keyReleaseEvent( TQKeyEvent* e ) if ( m_pressed ) { setDown(false); - m_pressed = FALSE; + m_pressed = false; emit released(); emit clicked(); } diff --git a/ksmserver/shutdowndlg.h b/ksmserver/shutdowndlg.h index 7539fd75b..5a9d652f2 100644 --- a/ksmserver/shutdowndlg.h +++ b/ksmserver/shutdowndlg.h @@ -18,7 +18,7 @@ Copyright (C) 2000 Matthias Ettrich <ettrich@kde.org> #include <kguiitem.h> #include <tqtoolbutton.h> #include <krootpixmap.h> -#include <ntqprogressbar.h> +#include <tqprogressbar.h> class TQPushButton; class TQVButtonGroup; @@ -34,17 +34,6 @@ class TDEAction; #include <config.h> -namespace SuspendType { -enum SuspendType { - NotSpecified = 0, - Freeze, - Standby, - Suspend, - Hibernate, - HybridSuspend -}; -}; - // The (singleton) widget that makes/fades the desktop gray. class KSMShutdownFeedback : public TQWidget { @@ -149,7 +138,6 @@ private: TQString m_bootOption; TQPopupMenu *targets; TQStringList rebootOptions; - bool m_lockOnResume; int* m_selection; }; diff --git a/ksmserver/shutdownkonq.png b/ksmserver/shutdownkonq.png Binary files differindex aab647bee..fddefc63c 100644..100755 --- a/ksmserver/shutdownkonq.png +++ b/ksmserver/shutdownkonq.png diff --git a/ksmserver/startup.cpp b/ksmserver/startup.cpp index fb9e696ec..8e02643eb 100644 --- a/ksmserver/startup.cpp +++ b/ksmserver/startup.cpp @@ -68,12 +68,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tdelocale.h> #include <tdeglobal.h> #include <tdeconfig.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <unistd.h> #include <tdeapplication.h> #include <kstaticdeleter.h> #include <tdetempfile.h> -#include <kprocess.h> +#include <tdeprocess.h> #include <dcopclient.h> #include <dcopref.h> #include <twinmodule.h> @@ -87,8 +87,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <kdebug.h> // shall we show a nice fancy login screen? -bool showFancyLogin = FALSE; -bool trinity_startup_main_sequence_done = FALSE; +bool showFancyLogin = false; +bool trinity_startup_main_sequence_done = false; /*! Restores the previous session. Ensures the window manager is running (if specified). @@ -145,7 +145,7 @@ void KSMServer::restoreSession( TQString sessionName ) if ((showFancyLogin) && (!startupNotifierIPDlg)) { startupNotifierIPDlg = KSMStartupIPDlg::showStartupIP(); } - TQTimer::singleShot( 4000, this, TQT_SLOT( autoStart0() ) ); + TQTimer::singleShot( 4000, this, TQ_SLOT( autoStart0() ) ); } else { if ((showFancyLogin) && (!startupNotifierIPDlg)) { startupNotifierIPDlg = KSMStartupIPDlg::showStartupIP(); @@ -192,7 +192,7 @@ void KSMServer::startDefaultSession() if ((showFancyLogin) && (!startupNotifierIPDlg)) { startupNotifierIPDlg = KSMStartupIPDlg::showStartupIP(); } - TQTimer::singleShot( 4000, this, TQT_SLOT( autoStart0() ) ); + TQTimer::singleShot( 4000, this, TQ_SLOT( autoStart0() ) ); } @@ -226,7 +226,7 @@ void KSMServer::autoStart0Done() connectDCOPSignal( "kcminit", "kcminit", "phase1Done()", "kcmPhase1Done()", true); state = KcmInitPhase1; - TQTimer::singleShot( 10000, this, TQT_SLOT( kcmPhase1Timeout())); // protection + TQTimer::singleShot( 10000, this, TQ_SLOT( kcmPhase1Timeout())); // protection DCOPRef( "kcminit", "kcminit" ).send( "runPhase1" ); } @@ -307,7 +307,7 @@ void KSMServer::tryRestoreNext() config->readEntry( TQString("userId")+n )); lastIdStarted = config->readEntry( TQString("clientId")+n ); if ( !lastIdStarted.isEmpty() ) { - restoreTimer.start( 2000, TRUE ); + restoreTimer.start( 2000, true ); return; // we get called again from the clientRegistered handler } } @@ -333,7 +333,7 @@ void KSMServer::autoStart2() DCOPRef( "kdesktop", "KDesktopIface" ).send( "runAutoStart" ); connectDCOPSignal( "kcminit", "kcminit", "phase2Done()", "kcmPhase2Done()", true); - TQTimer::singleShot( 10000, this, TQT_SLOT( kcmPhase2Timeout())); // protection + TQTimer::singleShot( 10000, this, TQ_SLOT( kcmPhase2Timeout())); // protection DCOPRef( "kcminit", "kcminit" ).send( "runPhase2" ); if( !defaultSession()) restoreLegacySession( TDEGlobal::config()); @@ -462,7 +462,7 @@ void KSMServer::upAndRunning( const TQString& msg ) if (startupNotifierIPDlg) { static_cast<KSMStartupIPDlg*>(startupNotifierIPDlg)->setStartupPhase(msg); if (msg == TQString("session ready")) { - trinity_startup_main_sequence_done = TRUE; + trinity_startup_main_sequence_done = true; } } DCOPRef( "ksplash" ).send( "upAndRunning", msg ); diff --git a/ksmserver/startupdlg.cpp b/ksmserver/startupdlg.cpp index e236ddfee..8bd196ab0 100644 --- a/ksmserver/startupdlg.cpp +++ b/ksmserver/startupdlg.cpp @@ -63,10 +63,10 @@ Copyright (C) 2000 Matthias Ettrich <ettrich@kde.org> TQWidget* KSMStartupIPDlg::showStartupIP() { - kapp->enableStyles(); + tdeApp->enableStyles(); KSMStartupIPDlg* l = new KSMStartupIPDlg( 0 ); - kapp->disableStyles(); + tdeApp->disableStyles(); return l; } |