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

List:       kde-commits
Subject:    KDE/kdebase/workspace/ksplash/ksplashx
From:       Luboš Luňák <l.lunak () kde ! org>
Date:       2008-03-24 15:00:07
Message-ID: 1206370807.646034.24200.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 789547 by lunakl:

Actually recognize state "ready", even though it's only used as the last WAIT_STATE
and splash never really reaches it.



 M  +4 -4      splash.cpp  


--- trunk/KDE/kdebase/workspace/ksplash/ksplashx/splash.cpp #789546:789547
@@ -26,7 +26,7 @@
 // for converting from startup states to (internal) numbers
 // these are also in the simple splash and in krunner
 const char states[][ 12 ] =
-    { "initial", "kded", "confupdate", "kcminit", "ksmserver", "wm", "desktop" };
+    { "initial", "kded", "confupdate", "kcminit", "ksmserver", "wm", "desktop", "ready" };
 // State "ready" isn't used, make splash go away as soon as desktop is ready.
 const int LAST_STATE = 6;
 
@@ -599,7 +599,7 @@
 #endif
                 int new_state = 0;
                 for( int i = 1;
-                     i <= LAST_STATE;
+                     i < sizeof( states ) / sizeof( states[ 0 ] );
                      ++i )
                     {
                     if( strcmp( s, states[ i ] ) == 0 )
@@ -617,7 +617,7 @@
                 else if( new_state > state )
                     {
                     state = new_state;
-                    if( state == LAST_STATE )
+                    if( state >= LAST_STATE )
                         final_time = time( NULL ) + 1; // quit after short time
                     }
                 }
@@ -1102,7 +1102,7 @@
             handled = true;
             int new_state = 0;
             for( int i = 1;
-                 i <= LAST_STATE;
+                 i < sizeof( states ) / sizeof( states[ 0 ] );
                  ++i )
                 {
                 if( strcmp( buf, states[ i ] ) == 0 )
[prev in list] [next in list] [prev in thread] [next in thread] 

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