]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/mimetype.cpp
otherwise all runloop dependent callbacks cannot work outside of the main thread
[wxWidgets.git] / src / unix / mimetype.cpp
index 367879ce18cf50508bf393e97f2a5d9cdeb4bc4f..e677ef3d4d5cb514d1baf6d31e402920619314ab 100644 (file)
@@ -2275,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);
                 }
             }
@@ -2552,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);
                         }
@@ -2618,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(),
@@ -2659,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;
@@ -2713,9 +2707,10 @@ bool wxMimeTypesManagerImpl::ReadMailcap(const wxString& strFileName,
             // have we seen this one before?
             int nIndex = m_aTypes.Index(data.type);
 
-            // and if we have, was it in this file?
+            // and if we have, was it in this file? if not, we should
+            // overwrite the previously seen one
             overwrite = nIndex == wxNOT_FOUND ||
-                            aIndicesSeenHere.Index(nIndex) != wxNOT_FOUND;
+                            aIndicesSeenHere.Index(nIndex) == wxNOT_FOUND;
         }
 
         wxLogTrace(TRACE_MIME, _T("mailcap %s: %s [%s]"),