summaryrefslogtreecommitdiff
authorkergoth <kergoth>2003-03-14 19:35:48 (UTC)
committer kergoth <kergoth>2003-03-14 19:35:48 (UTC)
commit2d20b81186bd9a4795af736710d0cb205ead9a77 (patch) (side-by-side diff)
treebc0560151016cccc0a6c4234d7af3e33eaac63c8
parent4f483f13e3c624a0ce6161e6ddd6923b4d101f0e (diff)
downloadopie-2d20b81186bd9a4795af736710d0cb205ead9a77.zip
opie-2d20b81186bd9a4795af736710d0cb205ead9a77.tar.gz
opie-2d20b81186bd9a4795af736710d0cb205ead9a77.tar.bz2
Syntax correction
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index 4c239a6..5ecc8bf 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -695,108 +695,108 @@ void Desktop::togglePower()
excllock = false;
}
void Desktop::toggleLight()
{
QCopEnvelope e( "QPE/System", "setBacklight(int)" );
e << -2; // toggle
}
void Desktop::toggleSymbolInput()
{
tb->toggleSymbolInput();
}
void Desktop::toggleNumLockState()
{
tb->toggleNumLockState();
}
void Desktop::toggleCapsLockState()
{
tb->toggleCapsLockState();
}
void Desktop::styleChange( QStyle &s )
{
QWidget::styleChange( s );
int displayw = qApp->desktop() ->width();
int displayh = qApp->desktop() ->height();
QSize sz = tb->sizeHint();
tb->setGeometry( 0, displayh - sz.height(), displayw, sz.height() );
}
void DesktopApplication::shutdown()
{
if ( type() != GuiServer )
return ;
ShutdownImpl *sd = new ShutdownImpl( 0, 0, WDestructiveClose );
connect( sd, SIGNAL( shutdown( ShutdownImpl::Type ) ),
this, SLOT( shutdown( ShutdownImpl::Type ) ) );
sd->showMaximized();
}
void DesktopApplication::shutdown( ShutdownImpl::Type t )
{
-
+ char *path[] = { "/sbin", "/usr/sbin", 0 };
char *opt = 0;
switch ( t ) {
case ShutdownImpl::ShutdownSystem:
opt = "-h";
// fall through
case ShutdownImpl::RebootSystem:
if ( opt == 0 )
opt = "-r";
- if ( execle( "shutdown", "shutdown", opt, "now", ( void* ) 0, "/sbin", "/usr/sbin", ( void* ) 0 ) < 0 )
+ if ( execle( "shutdown", "shutdown", opt, "now", ( void* ) 0, path ) < 0 )
::syslog ( LOG_ERR, "Erroring execing shutdown\n" );
break;
case ShutdownImpl::RestartDesktop:
restart();
break;
case ShutdownImpl::TerminateDesktop:
prepareForTermination( FALSE );
// This is a workaround for a Qt bug
// clipboard applet has to stop its poll timer, or Qt/E
// will hang on quit() right before it emits aboutToQuit()
emit aboutToQuit ( );
quit();
break;
}
}
void DesktopApplication::restart()
{
prepareForTermination( TRUE );
#ifdef Q_WS_QWS
for ( int fd = 3; fd < 100; fd++ )
close( fd );
#if defined(QT_DEMO_SINGLE_FLOPPY)
execl( "/sbin/init", "qpe", 0 );
#elif defined(QT_QWS_CASSIOPEIA)
execl( "/bin/sh", "sh", 0 );
#else
execl( ( qpeDir() + "/bin/qpe" ).latin1(), "qpe", 0 );
#endif
exit( 1 );
#endif
}
void Desktop::startTransferServer()
{
// start qcop bridge server
qcopBridge = new QCopBridge( 4243 );
if ( !qcopBridge->ok() ) {
delete qcopBridge;