Author: shadzik
Date: Thu Mar 19 17:07:04 2009
New Revision: 10220

Modified:
   toys/kernelupdatenotifier/kernelupdatenotifier.cpp
   toys/kernelupdatenotifier/main.cpp
Log:
- let the reboot button be our next milestone, for now the notification is good 
enough


Modified: toys/kernelupdatenotifier/kernelupdatenotifier.cpp
==============================================================================
--- toys/kernelupdatenotifier/kernelupdatenotifier.cpp  (original)
+++ toys/kernelupdatenotifier/kernelupdatenotifier.cpp  Thu Mar 19 17:07:04 2009
@@ -21,19 +21,19 @@
 
 void KernelUpdateNotifier::handleRebootAction(uint action){
        KNotification *notify = (KNotification *) sender();
+       notify->close();
         qDebug()<<"Reboot"<<action;
        switch(action) {
                case 1:
                        KWorkSpace::ShutdownConfirm confirm = 
KWorkSpace::ShutdownConfirmYes;
                        KWorkSpace::ShutdownType type = 
KWorkSpace::ShutdownTypeReboot;
-                       qDebug()<<confirm<<type;
-                       KWorkSpace::requestShutDown(confirm, type);
+                       KWorkSpace::ShutdownMode mode = 
KWorkSpace::ShutdownModeInteractive;
+                       KWorkSpace::requestShutDown(confirm, type, mode);
                        break;
        }
        qDebug()<<"Seems to be done";
        //QProcess *reboot = new QProcess;
        //reboot->start("sudo reboot");
-       notify->close();
 }
 
 void KernelUpdateNotifier::handleRebootActionClosed(){
@@ -53,7 +53,7 @@
 
     QStringList actions;
     actions << i18n("Reboot Now!");
-    notify->setActions(actions);
+    //notify->setActions(actions);
     connect(notify, SIGNAL(activated(uint)),
             this, SLOT(handleRebootAction(uint)));
     connect(notify, SIGNAL(closed()),

Modified: toys/kernelupdatenotifier/main.cpp
==============================================================================
--- toys/kernelupdatenotifier/main.cpp  (original)
+++ toys/kernelupdatenotifier/main.cpp  Thu Mar 19 17:07:04 2009
@@ -17,7 +17,7 @@
        QCoreApplication app(argc, argv);
        KernelUpdateNotifier *aps = new KernelUpdateNotifier();
        aps->sendNotify(argv[1]);
-       return app.exec();
-       //return 0;
+       //return app.exec();
+       return 0;
 }
 
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to