summaryrefslogtreecommitdiff
authorar <ar>2004-06-09 21:22:32 (UTC)
committer ar <ar>2004-06-09 21:22:32 (UTC)
commitebe42d8fd16f7e8f23e110650b3e1e2728e857d8 (patch) (side-by-side diff)
treef5de89bb47c46f7353f8c6fb58c4f5071aa393d9
parent044e457d601a2d38a0debe25f8babca5d0ca764f (diff)
downloadopie-ebe42d8fd16f7e8f23e110650b3e1e2728e857d8.zip
opie-ebe42d8fd16f7e8f23e110650b3e1e2728e857d8.tar.gz
opie-ebe42d8fd16f7e8f23e110650b3e1e2728e857d8.tar.bz2
- improve BigScreen on ShutDown
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/serverapp.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/core/launcher/serverapp.cpp b/core/launcher/serverapp.cpp
index 807942d..54cc313 100644
--- a/core/launcher/serverapp.cpp
+++ b/core/launcher/serverapp.cpp
@@ -660,98 +660,96 @@ bool ServerApplication::qwsEventFilter( QWSEvent *e )
ke-> simpleData.is_press,
ke-> simpleData.is_auto_repeat ) )
return true;
}
return QPEApplication::qwsEventFilter( e );
}
#endif
/* ### FIXME libqtopia Plugin Safe Mode */
void ServerApplication::showSafeMode()
{
#if 0
if ( QMessageBox::warning(0, tr("Safe Mode"), tr("<P>A system startup error occurred, "
"and the system is now in Safe Mode. "
"Plugins are not loaded in Safe Mode. "
"You can use the Plugin Manager to "
"disable plugins that cause system error."), tr("OK"), tr("Plugin Manager..."), 0) == 1 ) {
Global::execute( "pluginmanager" );
}
#endif
}
void ServerApplication::clearSafeMode()
{
#if 0
// If we've been running OK for a while then we won't bother going into
// safe mode immediately on the next crash.
Config cfg( "PluginLoader" );
cfg.setGroup( "Global" );
QString mode = cfg.readEntry( "Mode", "Normal" );
if ( mode == "MaybeSafe" ) {
cfg.writeEntry( "Mode", "Normal" );
}
#endif
}
void ServerApplication::shutdown()
{
if ( type() != GuiServer )
return;
ShutdownImpl *sd = new ShutdownImpl( 0, 0, WDestructiveClose );
connect( sd, SIGNAL(shutdown(ShutdownImpl::Type)),
this, SLOT(shutdown(ShutdownImpl::Type)) );
QPEApplication::showWidget( sd );
- sd->move(0,0);
-
}
void ServerApplication::shutdown( ShutdownImpl::Type t )
{
char *opt = 0;
switch ( t ) {
case ShutdownImpl::ShutdownSystem:
opt = "-h";
// fall through
case ShutdownImpl::RebootSystem:
if ( opt == 0 )
opt = "-r";
if ( execl( "/sbin/shutdown", "shutdown", opt, "now", ( void* ) 0) < 0 )
perror("shutdown");
// ::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 ServerApplication::restart()
{
if ( allowRestart ) {
/*
* Applets and restart is a problem. Some applets delete
* their widgets even if ownership gets transfered to the
* parent (Systray ) but deleting the applet may be unsafe
* as well ( double deletion ). Some have topLevel widgets
* and when we dlclose and then delete the widget we will
* crash and an crash during restart is not nice
*/
#ifdef ALL_APPLETS_ON_THIS_WORLD_ARE_FIXED