]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/mimetype.cpp
addind nonowned window implementation
[wxWidgets.git] / src / unix / mimetype.cpp
index 1a249e06112c87b9fab0e40e0cc43d76ceb5aa6b..04110d67c22177ee4b63dfb9562c7173ce54efff 100644 (file)
@@ -495,6 +495,9 @@ void wxMimeTypesManagerImpl::LoadGnomeMimeFilesFromDir(
     wxString dirname = dirbase;
     dirname << wxT("/mime-info");
 
+    // Don't complain if we don't have permissions to read - it confuses users
+    wxLogNull logNull;
+
     if ( !wxDir::Exists(dirname) )
         return;
 
@@ -887,6 +890,10 @@ void wxMimeTypesManagerImpl::LoadKDELinksForMimeType(const wxString& dirbase,
 {
     wxFileName dirname(dirbase, wxEmptyString);
     dirname.AppendDir(subdir);
+
+    // Don't complain if we don't have permissions to read - it confuses users
+    wxLogNull logNull;
+
     wxDir dir(dirname.GetPath());
     if(! dir.IsOpened())
         return;
@@ -914,6 +921,9 @@ void wxMimeTypesManagerImpl::LoadKDELinksForMimeType(const wxString& dirbase,
 void wxMimeTypesManagerImpl::LoadKDELinkFilesFromDir(const wxString& dirname,
                                             const wxArrayString& icondirs)
 {
+    // Don't complain if we don't have permissions to read - it confuses users
+    wxLogNull logNull;
+
     if(! wxDir::Exists(dirname))
         return;
 
@@ -1003,7 +1013,7 @@ void wxMimeTypesManagerImpl::LoadKDEApp(const wxString& filename)
     wxStringTokenizer tokenizer(mimetypes, _T(";"));
     while(tokenizer.HasMoreTokens()) {
         wxString mimetype = tokenizer.GetNextToken().Lower();
-        int nIndex = m_aTypes.Index(mimetype);
+        nIndex = m_aTypes.Index(mimetype);
         if(nIndex != wxNOT_FOUND) { // is this a known MIME type?
             wxMimeTypeCommands* entry = m_aEntries[nIndex];
             entry->AddOrReplaceVerb(wxT("open"), sCmd);
@@ -1013,6 +1023,9 @@ void wxMimeTypesManagerImpl::LoadKDEApp(const wxString& filename)
 
 void wxMimeTypesManagerImpl::LoadKDEAppsFilesFromDir(const wxString& dirname)
 {
+    // Don't complain if we don't have permissions to read - it confuses users
+    wxLogNull logNull;
+
     if(! wxDir::Exists(dirname))
         return;
     wxDir dir(dirname);