KSharedConfig::Ptr config = KGlobal::config();
config->reparseConfiguration(); // config may have changed in the KControl module
- KConfigGroup cg( config, "General");
+ KConfigGroup cg( config, "General");
bool logoutConfirmed =
(confirm == KWorkSpace::ShutdownConfirmYes) ? false :
if ( clients.isEmpty() )
completeShutdownOrCheckpoint();
} else {
- KSMShutdownFeedback::logoutCanceled(); // make the screen become normal again
+ KSMShutdownFeedback::stop(); // make the screen become normal again
}
dialogActive = false;
}
} else {
Solid::PowerManagement::stopSuppressingSleep(inhibitCookie);
kDebug( 1218 ) << "Client " << c->program() << " (" << c->clientId() << ") canceled shutdown.";
- KSMShutdownFeedback::logoutCanceled(); // make the screen become normal again
+ KSMShutdownFeedback::stop(); // make the screen become normal again
KNotification::event( "cancellogout" , i18n( "Logout canceled by '%1'", c->program()),
QPixmap() , 0l , KNotification::DefaultEvent );
foreach( KSMClient* c, clients ) {
void KSMShutdownFeedback::stop()
{
-}
-
-void KSMShutdownFeedback::logoutCanceled()
-{
if( KWindowSystem::compositingActive()) {
// We are no longer logging out, announce (Intended for the compositor)
Display* dpy = QX11Info::display();
public:
static void start();
static void stop();
- static void logoutCanceled();
};
// The confirmation dialog
#include <kiconloader.h>
#include <kworkspace/kworkspace.h>
#include <Plasma/Theme>
-int
-main(int argc, char *argv[])
+
+int main(int argc, char *argv[])
{
KAboutData about("kapptest", 0, ki18n("kapptest"), "version");
KCmdLineArgs::init(argc, argv, &about);
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
KApplication a;
+ KApplication::quitOnSignal();
KIconLoader::global()->addAppDir("ksmserver");
+ qAddPostRoutine(KSMShutdownFeedback::stop);
KSMShutdownFeedback::start();
QString sdtypeOption = args->getOption("type").toLower();
(void)KSMShutdownDlg::confirmShutdown( true, true, sdtype, "default" );
/* (void)KSMShutdownDlg::confirmShutdown( false, false, sdtype ); */
- KSMShutdownFeedback::stop();
+ return a.exec();
}