[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/kdm/kfrontend
From:       Martin Koller <m.koller () surfeu ! at>
Date:       2005-01-12 21:19:53
Message-ID: 20050112211953.E49511BA78 () office ! kde ! org
[Download RAW message or body]

CVS commit by mkoller: 

Show the text of the action as title which shall be confirmed


  M +15 -6     kdmshutdown.cpp   1.56
  M +2 -2      kdmshutdown.h   1.26


--- kdebase/kdm/kfrontend/kdmshutdown.cpp  #1.55:1.56
@@ -534,5 +534,5 @@ void
 KDMSlimShutdown::slotHalt()
 {
-    if (checkShutdown())
+    if (checkShutdown( SHUT_HALT ))
         doShutdown( SHUT_HALT );
 }
@@ -541,5 +541,5 @@ void
 KDMSlimShutdown::slotReboot()
 {
-    if (checkShutdown()) {
+    if (checkShutdown( SHUT_REBOOT )) {
 #if defined(__linux__) && ( defined(__i386__) || defined(__amd64__) )
         if (_useLilo)
@@ -551,5 +551,5 @@ KDMSlimShutdown::slotReboot()
 
 bool
-KDMSlimShutdown::checkShutdown()
+KDMSlimShutdown::checkShutdown( int type )
 {
     reject();
@@ -557,5 +557,5 @@ KDMSlimShutdown::checkShutdown()
     if (!sess && _allowShutdown != SHUT_ROOT)
         return true;
-    int ret = KDMConfShutdown( -1, sess ).exec();
+    int ret = KDMConfShutdown( -1, sess, type ).exec();
     disposeSessions( sess );
     if (ret == Schedule) {
@@ -570,5 +570,5 @@ KDMSlimShutdown::externShutdown( int typ
 {
     dpySpec *sess = fetchSessions( 0 );
-    int ret = KDMConfShutdown( uid, sess ).exec();
+    int ret = KDMConfShutdown( uid, sess, type ).exec();
     disposeSessions( sess );
     if (ret == Schedule)
@@ -579,7 +579,16 @@ KDMSlimShutdown::externShutdown( int typ
 
 
-KDMConfShutdown::KDMConfShutdown( int _uid, dpySpec *sess, QWidget *_parent )
+KDMConfShutdown::KDMConfShutdown( int _uid, dpySpec *sess, int type, QWidget *_parent )
     : inherited( _uid, _parent )
 {
+    QLabel *title = new QLabel(
+                      QString("<qt><center><b><nobr>"
+                              "%1"
+                              "</nobr></b></center><br></qt>")
+                        .arg((type == SHUT_HALT) ?
+                             i18n("Turn Off Computer") :
+                             i18n("Restart Computer")), this );
+    box->addWidget( title );
+
     if (sess) {
         if (_scheduledSd != SHUT_NEVER)

--- kdebase/kdm/kfrontend/kdmshutdown.h  #1.25:1.26
@@ -161,5 +161,5 @@ private slots:
 
 private:
-    bool checkShutdown();
+    bool checkShutdown( int type );
 
 };
@@ -170,5 +170,5 @@ class KDMConfShutdown : public KDMShutdo
 
 public:
-    KDMConfShutdown( int _uid, struct dpySpec *sess, QWidget *_parent = 0 );
+    KDMConfShutdown( int _uid, struct dpySpec *sess, int type, QWidget *_parent = 0 );
 };
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic