]> git.saurik.com Git - wxWidgets.git/commitdiff
This should work on SuSE and Mandrake icon themes.
authorRobert Roebling <robert@roebling.de>
Sun, 15 Feb 2004 13:15:50 +0000 (13:15 +0000)
committerRobert Roebling <robert@roebling.de>
Sun, 15 Feb 2004 13:15:50 +0000 (13:15 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/unix/mimetype.cpp

index 50b119f15846a254d089d6c848c05d482fc73859..6d031b36effed631755c2e9d407eb95ec999d09c 100644 (file)
@@ -1204,39 +1204,39 @@ void wxMimeTypesManagerImpl::GetKDEMimeInfo(const wxString& sExtraDir)
         }
         
         configFile.SetName( wxEmptyString );
         }
         
         configFile.SetName( wxEmptyString );
+        configFile.AppendDir( wxT("32x32") );
+        configFile.AppendDir( wxT("mimetypes") );
         
         // Just try a few likely icons theme names
         
         // Just try a few likely icons theme names
-
+        
+        int pos = configFile.GetDirCount()-3;
+        
         if (!wxDir::Exists(configFile.GetPath()))
         {
         if (!wxDir::Exists(configFile.GetPath()))
         {
-            configFile.RemoveDir( configFile.GetDirCount()-1 );
-            configFile.AppendDir( wxT("default.kde") );
+            configFile.RemoveDir( pos );
+            configFile.InsertDir( pos, wxT("default.kde") );
         }
         
         if (!wxDir::Exists(configFile.GetPath()))
         {
         }
         
         if (!wxDir::Exists(configFile.GetPath()))
         {
-            configFile.RemoveDir( configFile.GetDirCount()-1 );
-            configFile.AppendDir( wxT("default") );
+            configFile.RemoveDir( pos );
+            configFile.InsertDir( pos, wxT("default") );
         }
         
         if (!wxDir::Exists(configFile.GetPath()))
         {
         }
         
         if (!wxDir::Exists(configFile.GetPath()))
         {
-            configFile.RemoveDir( configFile.GetDirCount()-1 );
-            configFile.AppendDir( wxT("crystalsvg") );
+            configFile.RemoveDir( pos );
+            configFile.InsertDir( pos, wxT("crystalsvg") );
         }
         
         if (!wxDir::Exists(configFile.GetPath()))
         {
         }
         
         if (!wxDir::Exists(configFile.GetPath()))
         {
-            configFile.RemoveDir( configFile.GetDirCount()-1 );
-            configFile.AppendDir( wxT("crystal") );
+            configFile.RemoveDir( pos );
+            configFile.InsertDir( pos, wxT("crystal") );
         }
         
         if (wxDir::Exists(configFile.GetPath()))
         }
         
         if (wxDir::Exists(configFile.GetPath()))
-        {
-            configFile.AppendDir( wxT("32x32") );
-            configFile.AppendDir( wxT("mimetypes") );
             icondirs.Add( configFile.GetFullPath() );
             icondirs.Add( configFile.GetFullPath() );
-        }
     }
 
     // settings in ~/.kde have maximal priority
     }
 
     // settings in ~/.kde have maximal priority