X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1027433607909cbc53fa5c65660493d309d6a9ec..c1edc08df3301e5fc865a6f8d13b64153923162c:/src/unix/mimetype.cpp diff --git a/src/unix/mimetype.cpp b/src/unix/mimetype.cpp index 50b119f158..cae5717219 100644 --- a/src/unix/mimetype.cpp +++ b/src/unix/mimetype.cpp @@ -776,7 +776,13 @@ void wxMimeTypesManagerImpl::LoadGnomeMimeFilesFromDir( wxString strDesc; if ( !wxDir::Exists(dirname) ) - return; + { + // Jst test for default GPE dir also + dirname = wxT("/usr/share/gpe/pixmaps/default/filemanager/document-icons"); + + if ( !wxDir::Exists(dirname) ) + return; + } wxDir dir2( dirname ); @@ -1063,7 +1069,8 @@ void wxMimeTypesManagerImpl::LoadKDELinksForMimeSubtype(const wxString& dirbase, size_t nDir, nDirs = icondirs.GetCount(); for ( nDir = 0; nDir < nDirs; nDir++ ) { - wxFileName fname( icondirs[nDir], strIcon ); + wxFileName fnameIcon( strIcon ); + wxFileName fname( icondirs[nDir], fnameIcon.GetName() ); fname.SetExt( wxT("png") ); if (fname.FileExists()) { @@ -1204,39 +1211,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 @@ -2268,8 +2275,7 @@ bool wxMimeTypesManagerImpl::ReadMimeTypes(const wxString& strFileName) // the string is quoted and ends at the matching quote pEnd = wxStrchr(++pc, wxT('"')); if ( pEnd == NULL ) { - wxLogWarning(_("Mime.types file %s, line %d: unterminated " - "quoted string."), + wxLogWarning(_("Mime.types file %s, line %d: unterminated quoted string."), strFileName.c_str(), nLine + 1); } } @@ -2545,9 +2551,7 @@ bool wxMimeTypesManagerImpl::ReadMailcap(const wxString& strFileName, // something is wrong, bail out cont = FALSE; - wxLogDebug(wxT("Mailcap file %s, line %lu: " - "'\\' on the end of the last line " - "ignored."), + wxLogDebug(wxT("Mailcap file %s, line %lu: '\\' on the end of the last line ignored."), strFileName.c_str(), (unsigned long)nLine + 1); } @@ -2611,9 +2615,7 @@ bool wxMimeTypesManagerImpl::ReadMailcap(const wxString& strFileName, // this might be useful for the programmer wxLogDebug ( - wxT("Mailcap file %s, line %lu: " - "unknown field '%s' for the " - "MIME type '%s' ignored."), + wxT("Mailcap file %s, line %lu: unknown field '%s' for the MIME type '%s' ignored."), strFileName.c_str(), (unsigned long)nLine + 1, curField.c_str(), @@ -2652,8 +2654,7 @@ bool wxMimeTypesManagerImpl::ReadMailcap(const wxString& strFileName, // check that we really read something reasonable if ( currentToken < Field_Other ) { - wxLogWarning(_("Mailcap file %s, line %d: incomplete entry " - "ignored."), + wxLogWarning(_("Mailcap file %s, line %d: incomplete entry ignored."), strFileName.c_str(), nLine + 1); continue;