summaryrefslogtreecommitdiffstats
path: root/ksmserver
diff options
context:
space:
mode:
Diffstat (limited to 'ksmserver')
-rw-r--r--ksmserver/README4
-rw-r--r--ksmserver/client.cpp2
-rw-r--r--ksmserver/main.cpp2
-rw-r--r--ksmserver/server.cpp12
-rw-r--r--ksmserver/server.h28
-rw-r--r--ksmserver/shutdown.cpp54
-rw-r--r--ksmserver/shutdowndlg.cpp28
-rw-r--r--ksmserver/shutdowndlg.h10
-rw-r--r--ksmserver/test.cpp4
9 files changed, 72 insertions, 72 deletions
diff --git a/ksmserver/README b/ksmserver/README
index 452bf75f4..29202255b 100644
--- a/ksmserver/README
+++ b/ksmserver/README
@@ -123,7 +123,7 @@ bogus value.
In addition, ksmserver propagates both its network address and its
process id in ~/.trinity/socket-$HOSTNAME/KSMserver-$DISPLAY. A
-utility function KApplication::propagateSessionManager() reads this
+utility function TDEApplication::propagateSessionManager() reads this
setting and sets SESSION_MANAGER accordingly, so that child processes
can pick it up. The function is called by clients that are started
outside the session ( i.e. before ksmserver is started), but want to
@@ -146,7 +146,7 @@ Requesting a shutdown
If an application wants to request a shutdown (i.e. a logout), it does
this via an SmcRequestSaveYourself message to the server. In TDE, a
-utility function KApplication::requestShutDown() does exactly
+utility function TDEApplication::requestShutDown() does exactly
this. It's for example called by TDE's panel or by the context menu of
the desktop.
diff --git a/ksmserver/client.cpp b/ksmserver/client.cpp
index 1dbe2e245..c47877543 100644
--- a/ksmserver/client.cpp
+++ b/ksmserver/client.cpp
@@ -99,7 +99,7 @@ static char * safeSmsGenerateClientID( SmsConn /*c*/ )
(1 would be IP, 2 would be DEC-NET format) */
char hostname[ 256 ];
if( gethostname( hostname, 255 ) != 0 )
- my_addr->sprintf("0%.8x", KApplication::random());
+ my_addr->sprintf("0%.8x", TDEApplication::random());
else {
// create some kind of hash for the hostname
int addr[ 4 ] = { 0, 0, 0, 0 };
diff --git a/ksmserver/main.cpp b/ksmserver/main.cpp
index 65c43253a..443a978e2 100644
--- a/ksmserver/main.cpp
+++ b/ksmserver/main.cpp
@@ -190,7 +190,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char* argv[] )
TDECmdLineArgs::addCmdLineOptions( options );
putenv((char*)"SESSION_MANAGER=");
- KApplication a(KApplication::openX11RGBADisplay(), false); // Disable styles until we need them.
+ TDEApplication a(TDEApplication::openX11RGBADisplay(), false); // Disable styles until we need them.
fcntl(ConnectionNumber(tqt_xdisplay()), F_SETFD, 1);
diff --git a/ksmserver/server.cpp b/ksmserver/server.cpp
index 2b6c406a0..cdf3f98c5 100644
--- a/ksmserver/server.cpp
+++ b/ksmserver/server.cpp
@@ -195,10 +195,10 @@ void KSMSaveYourselfRequestProc (
{
if ( shutdown ) {
the_server->shutdown( fast ?
- KApplication::ShutdownConfirmNo :
- KApplication::ShutdownConfirmDefault,
- KApplication::ShutdownTypeDefault,
- KApplication::ShutdownModeDefault );
+ TDEApplication::ShutdownConfirmNo :
+ TDEApplication::ShutdownConfirmDefault,
+ TDEApplication::ShutdownTypeDefault,
+ TDEApplication::ShutdownModeDefault );
} else if ( !global ) {
SmsSaveYourself( smsConn, saveType, false, interactStyle, fast );
SmsSaveComplete( smsConn );
@@ -586,7 +586,7 @@ KSMServer::KSMServer( const TQString& windowManager, const TQString& windowManag
wm = windowManager;
wmAddArgs = windowManagerAddArgs;
- shutdownType = KApplication::ShutdownTypeNone;
+ shutdownType = TDEApplication::ShutdownTypeNone;
state = Idle;
dialogActive = false;
@@ -609,7 +609,7 @@ KSMServer::KSMServer( const TQString& windowManager, const TQString& windowManag
only_local = false;
#endif
- launcher = KApplication::launcher();
+ launcher = TDEApplication::launcher();
char errormsg[256];
if (!SmsInitialize ( (char*) KSMVendorString, (char*) KSMReleaseString,
diff --git a/ksmserver/server.h b/ksmserver/server.h
index ca73c3a86..79c1629bd 100644
--- a/ksmserver/server.h
+++ b/ksmserver/server.h
@@ -86,17 +86,17 @@ public:
void restoreSession( TQString sessionName );
void startDefaultSession();
- void shutdown( KApplication::ShutdownConfirm confirm,
- KApplication::ShutdownType sdtype,
- KApplication::ShutdownMode sdmode );
+ void shutdown( TDEApplication::ShutdownConfirm confirm,
+ TDEApplication::ShutdownType sdtype,
+ TDEApplication::ShutdownMode sdmode );
virtual void suspendStartup( TQCString app );
virtual void resumeStartup( TQCString app );
bool checkStatus( bool &logoutConfirmed, bool &maysd,
- KApplication::ShutdownConfirm confirm,
- KApplication::ShutdownType sdtype,
- KApplication::ShutdownMode sdmode );
+ TDEApplication::ShutdownConfirm confirm,
+ TDEApplication::ShutdownType sdtype,
+ TDEApplication::ShutdownMode sdmode );
public slots:
void cleanUp();
@@ -150,9 +150,9 @@ private:
bool defaultSession() const; // empty session
void setupXIOErrorHandler();
- void shutdownInternal( KApplication::ShutdownConfirm confirm,
- KApplication::ShutdownType sdtype,
- KApplication::ShutdownMode sdmode,
+ void shutdownInternal( TDEApplication::ShutdownConfirm confirm,
+ TDEApplication::ShutdownType sdtype,
+ TDEApplication::ShutdownMode sdmode,
TQString bootOption = TQString::null );
void performLegacySessionSave();
@@ -196,8 +196,8 @@ private:
int saveType;
TQMap< TQCString, int > startupSuspendCount;
- KApplication::ShutdownType shutdownType;
- KApplication::ShutdownMode shutdownMode;
+ TDEApplication::ShutdownType shutdownType;
+ TDEApplication::ShutdownMode shutdownMode;
TQString bootOption;
bool clean;
@@ -216,9 +216,9 @@ private:
bool waitAutoStart2;
bool waitKcmInit2;
TQTimer pendingShutdown;
- KApplication::ShutdownConfirm pendingShutdown_confirm;
- KApplication::ShutdownType pendingShutdown_sdtype;
- KApplication::ShutdownMode pendingShutdown_sdmode;
+ TDEApplication::ShutdownConfirm pendingShutdown_confirm;
+ TDEApplication::ShutdownType pendingShutdown_sdtype;
+ TDEApplication::ShutdownMode pendingShutdown_sdmode;
// ksplash interface
void upAndRunning( const TQString& msg );
diff --git a/ksmserver/shutdown.cpp b/ksmserver/shutdown.cpp
index fc55c5d7a..d7440e92c 100644
--- a/ksmserver/shutdown.cpp
+++ b/ksmserver/shutdown.cpp
@@ -97,15 +97,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
void KSMServer::logout( int confirm, int sdtype, int sdmode )
{
- shutdown( (KApplication::ShutdownConfirm)confirm,
- (KApplication::ShutdownType)sdtype,
- (KApplication::ShutdownMode)sdmode );
+ shutdown( (TDEApplication::ShutdownConfirm)confirm,
+ (TDEApplication::ShutdownType)sdtype,
+ (TDEApplication::ShutdownMode)sdmode );
}
bool KSMServer::checkStatus( bool &logoutConfirmed, bool &maysd,
- KApplication::ShutdownConfirm confirm,
- KApplication::ShutdownType sdtype,
- KApplication::ShutdownMode sdmode )
+ TDEApplication::ShutdownConfirm confirm,
+ TDEApplication::ShutdownType sdtype,
+ TDEApplication::ShutdownMode sdmode )
{
pendingShutdown.stop();
if( dialogActive )
@@ -130,15 +130,15 @@ bool KSMServer::checkStatus( bool &logoutConfirmed, bool &maysd,
config->setGroup("General" );
logoutConfirmed =
- (confirm == KApplication::ShutdownConfirmYes) ? false :
- (confirm == KApplication::ShutdownConfirmNo) ? true :
+ (confirm == TDEApplication::ShutdownConfirmYes) ? false :
+ (confirm == TDEApplication::ShutdownConfirmNo) ? true :
!config->readBoolEntry( "confirmLogout", true );
maysd = false;
if (config->readBoolEntry( "offerShutdown", true ) && DM().canShutdown())
maysd = true;
if (!maysd) {
- if (sdtype != KApplication::ShutdownTypeNone &&
- sdtype != KApplication::ShutdownTypeDefault &&
+ if (sdtype != TDEApplication::ShutdownTypeNone &&
+ sdtype != TDEApplication::ShutdownTypeDefault &&
logoutConfirmed)
return false; /* unsupported fast shutdown */
}
@@ -146,9 +146,9 @@ bool KSMServer::checkStatus( bool &logoutConfirmed, bool &maysd,
return true;
}
-void KSMServer::shutdownInternal( KApplication::ShutdownConfirm confirm,
- KApplication::ShutdownType sdtype,
- KApplication::ShutdownMode sdmode,
+void KSMServer::shutdownInternal( TDEApplication::ShutdownConfirm confirm,
+ TDEApplication::ShutdownType sdtype,
+ TDEApplication::ShutdownMode sdmode,
TQString bopt )
{
bool maysd = false;
@@ -160,12 +160,12 @@ void KSMServer::shutdownInternal( KApplication::ShutdownConfirm confirm,
config->setGroup("General" );
if (!maysd) {
- sdtype = KApplication::ShutdownTypeNone;
- } else if (sdtype == KApplication::ShutdownTypeDefault)
- sdtype = (KApplication::ShutdownType)
- config->readNumEntry( "shutdownType", (int)KApplication::ShutdownTypeNone );
- if (sdmode == KApplication::ShutdownModeDefault)
- sdmode = KApplication::ShutdownModeInteractive;
+ sdtype = TDEApplication::ShutdownTypeNone;
+ } else if (sdtype == TDEApplication::ShutdownTypeDefault)
+ sdtype = (TDEApplication::ShutdownType)
+ config->readNumEntry( "shutdownType", (int)TDEApplication::ShutdownTypeNone );
+ if (sdmode == TDEApplication::ShutdownModeDefault)
+ sdmode = TDEApplication::ShutdownModeInteractive;
// shall we show a logout status dialog box?
bool showLogoutStatusDlg = KConfigGroup(KGlobal::config(), "Logout").readBoolEntry("showLogoutStatusDlg", true);
@@ -282,8 +282,8 @@ void KSMServer::shutdownInternal( KApplication::ShutdownConfirm confirm,
dialogActive = false;
}
-void KSMServer::shutdown( KApplication::ShutdownConfirm confirm,
- KApplication::ShutdownType sdtype, KApplication::ShutdownMode sdmode )
+void KSMServer::shutdown( TDEApplication::ShutdownConfirm confirm,
+ TDEApplication::ShutdownType sdtype, TDEApplication::ShutdownMode sdmode )
{
shutdownInternal( confirm, sdtype, sdmode );
}
@@ -297,9 +297,9 @@ void KSMServer::logoutTimed( int sdtype, int sdmode, TQString bootOption )
KConfig* config = KGlobal::config();
config->setGroup( "General" );
- if ( sdtype == KApplication::ShutdownTypeHalt )
+ if ( sdtype == TDEApplication::ShutdownTypeHalt )
confirmDelay = config->readNumEntry( "confirmShutdownDelay", 31 );
- else if ( sdtype == KApplication::ShutdownTypeReboot )
+ else if ( sdtype == TDEApplication::ShutdownTypeReboot )
confirmDelay = config->readNumEntry( "confirmRebootDelay", 31 );
else
confirmDelay = config->readNumEntry( "confirmLogoutDelay", 31 );
@@ -307,14 +307,14 @@ void KSMServer::logoutTimed( int sdtype, int sdmode, TQString bootOption )
bool result = true;
if (confirmDelay) {
KSMShutdownFeedback::start(); // make the screen gray
- result = KSMDelayedMessageBox::showTicker( (KApplication::ShutdownType)sdtype, bootOption, confirmDelay );
+ result = KSMDelayedMessageBox::showTicker( (TDEApplication::ShutdownType)sdtype, bootOption, confirmDelay );
KSMShutdownFeedback::stop(); // make the screen become normal again
}
if ( result )
- shutdownInternal( KApplication::ShutdownConfirmNo,
- (KApplication::ShutdownType)sdtype,
- (KApplication::ShutdownMode)sdmode,
+ shutdownInternal( TDEApplication::ShutdownConfirmNo,
+ (TDEApplication::ShutdownType)sdtype,
+ (TDEApplication::ShutdownMode)sdmode,
bootOption );
}
diff --git a/ksmserver/shutdowndlg.cpp b/ksmserver/shutdowndlg.cpp
index 5be3f70a2..bd705675b 100644
--- a/ksmserver/shutdowndlg.cpp
+++ b/ksmserver/shutdowndlg.cpp
@@ -674,7 +674,7 @@ void KSMShutdownIPFeedback::slotPaintEffect()
//////
KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
- bool maysd, KApplication::ShutdownType sdtype, int* selection )
+ bool maysd, TDEApplication::ShutdownType sdtype, int* 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.
@@ -903,7 +903,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
btnReboot->setAccel( "ALT+" + btnReboot->textLabel().lower()[i+1] ) ;
hbuttonbox2->addWidget ( btnReboot);
connect(btnReboot, TQT_SIGNAL(clicked()), TQT_SLOT(slotReboot()));
- if ( sdtype == KApplication::ShutdownTypeReboot )
+ if ( sdtype == TDEApplication::ShutdownTypeReboot )
btnReboot->setFocus();
// BAD CARMA .. this code is copied line by line from standard konqy dialog
@@ -938,7 +938,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
btnHalt->setAccel( "ALT+" + btnHalt->textLabel().lower()[i+1] ) ;
hbuttonbox2->addWidget ( btnHalt );
connect(btnHalt, TQT_SIGNAL(clicked()), TQT_SLOT(slotHalt()));
- if ( sdtype == KApplication::ShutdownTypeHalt )
+ if ( sdtype == TDEApplication::ShutdownTypeHalt )
btnHalt->setFocus();
// cancel buttonbox
@@ -959,7 +959,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
btnHalt->setFont( btnFont );
buttonlay->addWidget( btnHalt );
connect(btnHalt, TQT_SIGNAL(clicked()), TQT_SLOT(slotHalt()));
- if ( sdtype == KApplication::ShutdownTypeHalt || getenv("TDM_AUTOLOGIN") )
+ if ( sdtype == TDEApplication::ShutdownTypeHalt || getenv("TDM_AUTOLOGIN") )
btnHalt->setFocus();
// Reboot
@@ -969,7 +969,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
buttonlay->addWidget( btnReboot );
connect(btnReboot, TQT_SIGNAL(clicked()), TQT_SLOT(slotReboot()));
- if ( sdtype == KApplication::ShutdownTypeReboot )
+ if ( sdtype == TDEApplication::ShutdownTypeReboot )
btnReboot->setFocus();
// this section is copied as-is into ubuntulogout as well
@@ -1078,7 +1078,7 @@ KSMShutdownDlg::~KSMShutdownDlg()
void KSMShutdownDlg::slotLogout()
{
- m_shutdownType = KApplication::ShutdownTypeNone;
+ m_shutdownType = TDEApplication::ShutdownTypeNone;
accept();
}
@@ -1087,7 +1087,7 @@ void KSMShutdownDlg::slotReboot()
{
// no boot option selected -> current
m_bootOption = TQString::null;
- m_shutdownType = KApplication::ShutdownTypeReboot;
+ m_shutdownType = TDEApplication::ShutdownTypeReboot;
accept();
}
@@ -1095,7 +1095,7 @@ void KSMShutdownDlg::slotReboot(int opt)
{
if (int(rebootOptions.size()) > opt)
m_bootOption = rebootOptions[opt];
- m_shutdownType = KApplication::ShutdownTypeReboot;
+ m_shutdownType = TDEApplication::ShutdownTypeReboot;
accept();
}
@@ -1103,7 +1103,7 @@ void KSMShutdownDlg::slotReboot(int opt)
void KSMShutdownDlg::slotHalt()
{
m_bootOption = TQString::null;
- m_shutdownType = KApplication::ShutdownTypeHalt;
+ m_shutdownType = TDEApplication::ShutdownTypeHalt;
accept();
}
@@ -1160,7 +1160,7 @@ void KSMShutdownDlg::slotHibernate()
reject(); // continue on resume
}
-bool KSMShutdownDlg::confirmShutdown( bool maysd, KApplication::ShutdownType& sdtype, TQString& bootOption, int* selection )
+bool KSMShutdownDlg::confirmShutdown( bool maysd, TDEApplication::ShutdownType& sdtype, TQString& bootOption, int* selection )
{
kapp->enableStyles();
KSMShutdownDlg* l = new KSMShutdownDlg( 0,
@@ -1245,16 +1245,16 @@ void KSMDelayedPushButton::slotTimeout()
setDown(false);
}
-KSMDelayedMessageBox::KSMDelayedMessageBox( KApplication::ShutdownType sdtype, const TQString &bootOption, int confirmDelay )
+KSMDelayedMessageBox::KSMDelayedMessageBox( TDEApplication::ShutdownType sdtype, const TQString &bootOption, int confirmDelay )
: TimedLogoutDlg( 0, 0, true, (WFlags)WType_Popup ), m_remaining(confirmDelay)
{
- if ( sdtype == KApplication::ShutdownTypeHalt )
+ if ( sdtype == TDEApplication::ShutdownTypeHalt )
{
m_title->setText( i18n( "Would you like to turn off your computer?" ) );
m_template = i18n( "This computer will turn off automatically\n"
"after %1 seconds." );
m_logo->setPixmap( BarIcon( "exit", 48 ) );
- } else if ( sdtype == KApplication::ShutdownTypeReboot )
+ } else if ( sdtype == TDEApplication::ShutdownTypeReboot )
{
if (bootOption.isEmpty())
m_title->setText( i18n( "Would you like to reboot your computer?" ) );
@@ -1294,7 +1294,7 @@ void KSMDelayedMessageBox::updateText()
m_text->setText( m_template.arg( m_remaining ) );
}
-bool KSMDelayedMessageBox::showTicker( KApplication::ShutdownType sdtype, const TQString &bootOption, int confirmDelay )
+bool KSMDelayedMessageBox::showTicker( TDEApplication::ShutdownType sdtype, const TQString &bootOption, int confirmDelay )
{
kapp->enableStyles();
KSMDelayedMessageBox msg( sdtype, bootOption, confirmDelay );
diff --git a/ksmserver/shutdowndlg.h b/ksmserver/shutdowndlg.h
index eab4570e1..bf636c16d 100644
--- a/ksmserver/shutdowndlg.h
+++ b/ksmserver/shutdowndlg.h
@@ -129,7 +129,7 @@ class KSMShutdownDlg : public TQDialog
Q_OBJECT
public:
- static bool confirmShutdown( bool maysd, KApplication::ShutdownType& sdtype, TQString& bopt, int* selection=0 );
+ static bool confirmShutdown( bool maysd, TDEApplication::ShutdownType& sdtype, TQString& bopt, int* selection=0 );
public slots:
void slotLogout();
@@ -143,8 +143,8 @@ protected:
~KSMShutdownDlg();
private:
- KSMShutdownDlg( TQWidget* parent, bool maysd, KApplication::ShutdownType sdtype, int* selection=0 );
- KApplication::ShutdownType m_shutdownType;
+ KSMShutdownDlg( TQWidget* parent, bool maysd, TDEApplication::ShutdownType sdtype, int* selection=0 );
+ TDEApplication::ShutdownType m_shutdownType;
TQString m_bootOption;
TQPopupMenu *targets;
TQStringList rebootOptions;
@@ -248,8 +248,8 @@ class KSMDelayedMessageBox : public TimedLogoutDlg
Q_OBJECT
public:
- KSMDelayedMessageBox( KApplication::ShutdownType sdtype, const TQString &bootOption, int confirmDelay );
- static bool showTicker( KApplication::ShutdownType sdtype, const TQString &bootOption, int confirmDelay );
+ KSMDelayedMessageBox( TDEApplication::ShutdownType sdtype, const TQString &bootOption, int confirmDelay );
+ static bool showTicker( TDEApplication::ShutdownType sdtype, const TQString &bootOption, int confirmDelay );
protected slots:
void updateText();
diff --git a/ksmserver/test.cpp b/ksmserver/test.cpp
index 5a5e114c4..5ccb4243a 100644
--- a/ksmserver/test.cpp
+++ b/ksmserver/test.cpp
@@ -10,14 +10,14 @@ main(int argc, char *argv[])
KAboutData about("kapptest", "kapptest", "version");
TDECmdLineArgs::init(argc, argv, &about);
- KApplication a;
+ TDEApplication a;
a.iconLoader()->addAppDir("ksmserver");
KSMShutdownFeedback::start();
// ShutdownTypeNone == Logout == 0
// ShutdownTypeReboot == 1
// ShutdownTypeHalt == 2
- KApplication::ShutdownType sdtype = KApplication::ShutdownTypeNone;
+ TDEApplication::ShutdownType sdtype = TDEApplication::ShutdownTypeNone;
TQString bopt;
KSMDelayedMessageBox::showTicker( sdtype );
/*