]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/mimetype.cpp
Implemented Enable for wxMenuBar to avoid assert
[wxWidgets.git] / src / unix / mimetype.cpp
index 6d031b36effed631755c2e9d407eb95ec999d09c..cae5717219fb55b23e545402fc0bad5eb3cdff17 100644 (file)
@@ -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())
                     {
@@ -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;