From: Robert Roebling Date: Sun, 15 Feb 2004 13:15:50 +0000 (+0000) Subject: This should work on SuSE and Mandrake icon themes. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/16c587ca765d00a17eb4fe83f6d94901a08801a4 This should work on SuSE and Mandrake icon themes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/unix/mimetype.cpp b/src/unix/mimetype.cpp index 50b119f158..6d031b36ef 100644 --- a/src/unix/mimetype.cpp +++ b/src/unix/mimetype.cpp @@ -1204,39 +1204,39 @@ void wxMimeTypesManagerImpl::GetKDEMimeInfo(const wxString& sExtraDir) } configFile.SetName( wxEmptyString ); + configFile.AppendDir( wxT("32x32") ); + configFile.AppendDir( wxT("mimetypes") ); // Just try a few likely icons theme names - + + int pos = configFile.GetDirCount()-3; + 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())) { - configFile.RemoveDir( configFile.GetDirCount()-1 ); - configFile.AppendDir( wxT("default") ); + configFile.RemoveDir( pos ); + configFile.InsertDir( pos, wxT("default") ); } 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())) { - configFile.RemoveDir( configFile.GetDirCount()-1 ); - configFile.AppendDir( wxT("crystal") ); + configFile.RemoveDir( pos ); + configFile.InsertDir( pos, wxT("crystal") ); } if (wxDir::Exists(configFile.GetPath())) - { - configFile.AppendDir( wxT("32x32") ); - configFile.AppendDir( wxT("mimetypes") ); icondirs.Add( configFile.GetFullPath() ); - } } // settings in ~/.kde have maximal priority