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

List:       kde-commits
Subject:    kdebase/kscreensaver
From:       Stephan Kulow <coolo () kde ! org>
Date:       2004-06-23 9:41:30
Message-ID: 20040623094130.910F29974 () office ! kde ! org
[Download RAW message or body]

CVS commit by coolo: 

* ignore screensavers that require fortune installed if it's not installed
* fixing nested loop variable (which basically made this whole Type= check
  pointless I guess)


  M +14 -5     random.cpp   1.29


--- kdebase/kscreensaver/random.cpp  #1.28:1.29
@@ -106,4 +106,5 @@ int main(int argc, char *argv[])
         bool opengl = type.readBoolEntry("OpenGL");
         bool manipulatescreen = type.readBoolEntry("ManipulateScreen"); 
+        bool fortune = !KStandardDirs::findExe("fortune").isEmpty();
 
         for (uint i = 0; i < tempSaverFileList.count(); i++)
@@ -122,8 +123,8 @@ int main(int argc, char *argv[])
                         {
                                 QStringList saverTypes = QStringList::split(";", \
                saverType);
-                                for (uint i = 0; i < saverTypes.count(); i++)
+                                for (QStringList::ConstIterator it =  \
saverTypes.begin(); it != saverTypes.end(); ++it )  {
-                                        kdDebug() << "saverTypes is "<< \
                saverTypes[i] << endl;
-                                        if (saverTypes[i] == "ManipulateScreen")
+                                        kdDebug() << "saverTypes is "<< *it << endl;
+                                        if (*it == "ManipulateScreen")
                                         {
                                                 if (manipulatescreen)
@@ -133,5 +134,5 @@ int main(int argc, char *argv[])
                                         }
                                         else
-                                        if (saverTypes[i] == "OpenGL")
+                                        if (*it == "OpenGL")
                                         {
                                                 if (opengl)
@@ -140,4 +141,12 @@ int main(int argc, char *argv[])
                                                 }
                                         }
+                                        if (*it == "Fortune")
+                                        {
+                                                if (fortune)
+                                                {
+                                                        \
saverFileList.append(tempSaverFileList[i]); +                                         \
} +                                        }
+
                                 }
                         }


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

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