]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/mimetype.cpp
Build fix after wxColourBase introduction.
[wxWidgets.git] / src / unix / mimetype.cpp
index 0bf6dd4ef6da239efd391f6b2e503872e0102f0b..aa2d4f3d6303fd187ab151d81c7db369c97c6ccb 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        unix/mimetype.cpp
+// Name:        src/unix/mimetype.cpp
 // Purpose:     classes and functions to manage MIME types
 // Author:      Vadim Zeitlin
 // Modified by:
 #include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
-  #pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-  #include "wx/defs.h"
+    #pragma hdrstop
 #endif
 
 #if wxUSE_MIMETYPE && wxUSE_FILE && wxUSE_TEXTFILE
 
 #ifndef WX_PRECOMP
-  #include "wx/string.h"
+    #include "wx/dynarray.h"
+    #include "wx/string.h"
 #endif
 
 #include "wx/log.h"
 #include "wx/file.h"
 #include "wx/intl.h"
-#include "wx/dynarray.h"
 #include "wx/confbase.h"
 
 #include "wx/ffile.h"
 
 #include "wx/unix/mimetype.h"
 
-// Not GUI dependent
-#include "wx/gtk/gnome/gvfs.h"
+#if wxUSE_LIBGNOMEVFS
+    // Not GUI dependent
+    #include "wx/gtk/gnome/gvfs.h"
+#endif
 
 // other standard headers
 #include <ctype.h>
 
-#ifdef __VMS
-/* silence warnings for comparing unsigned int's <0 */
-# pragma message disable unscomzer
-#endif
-
 // this class extends wxTextFile
 //
 // VZ: ???
@@ -316,7 +309,7 @@ void wxMimeTypesManagerImpl::LoadGnomeDataFromKeyFile(const wxString& filename,
 
             wxLogTrace(TRACE_MIME, wxT("--- Reading from Gnome file %s '%s' ---"),
                     filename.c_str(), pc);
-            
+
             // trim trailing space and tab
             while ((*pc == wxT(' ')) || (*pc == wxT('\t')))
                 pc++;
@@ -327,18 +320,18 @@ void wxMimeTypesManagerImpl::LoadGnomeDataFromKeyFile(const wxString& filename,
             {
                 wxString left_of_equal = sTmp.Left( equal_pos );
                 const wxChar *right_of_equal = pc;
-                right_of_equal += equal_pos+1; 
-                
+                right_of_equal += equal_pos+1;
+
                 if (left_of_equal == wxT("icon_filename"))
                 {
                     // GNOME 2:
                     curIconFile = right_of_equal;
-                    
+
                     wxFileName newFile( curIconFile );
                     if (newFile.IsRelative() || newFile.FileExists())
                     {
                         size_t nDirs = search_dirs.GetCount();
-                        
+
                         for (size_t nDir = 0; nDir < nDirs; nDir++)
                         {
                             newFile.SetPath( search_dirs[nDir] );
@@ -1314,7 +1307,7 @@ void wxMimeTypesManagerImpl::InitIfNeeded()
     {
         // set the flag first to prevent recursion
         m_initialized = true;
-    
+
     wxString wm = wxGetenv( wxT("WINDOWMANAGER") );
 
     if (wm.Find( wxT("kde") ) != wxNOT_FOUND)
@@ -1769,7 +1762,7 @@ bool wxMimeTypesManagerImpl::DoAssociation(const wxString& strType,
                                            const wxString& strDesc)
 {
     int nIndex = AddToMimeData(strType, strIcon, entry, strExtensions, strDesc, true);
-    
+
     if ( nIndex == wxNOT_FOUND )
         return false;
 
@@ -2708,4 +2701,3 @@ static bool IsKnownUnimportantField(const wxString& fieldAll)
 
 #endif
   // wxUSE_MIMETYPE && wxUSE_FILE && wxUSE_TEXTFILE
-