From a06c1b9b728842ecbf70d355add462e0fd57d4b9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 24 Apr 2001 00:07:04 +0000 Subject: [PATCH] Unix compilation fixes for new MIME code git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/unix/mimetype.h | 2 +- src/unix/mimetype.cpp | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/wx/unix/mimetype.h b/include/wx/unix/mimetype.h index 5da7269081..7377a5284a 100644 --- a/include/wx/unix/mimetype.h +++ b/include/wx/unix/mimetype.h @@ -33,7 +33,7 @@ public: ~wxMimeTypesManagerImpl(); // load all data into memory - done when it is needed for the first time - void Initialize(int mailcapStyles, + void Initialize(int mailcapStyles = wxMAILCAP_STANDARD, const wxString& extraDir = wxEmptyString); // and delete the data here diff --git a/src/unix/mimetype.cpp b/src/unix/mimetype.cpp index 62487d68ea..b2a2ee51f0 100644 --- a/src/unix/mimetype.cpp +++ b/src/unix/mimetype.cpp @@ -294,8 +294,8 @@ static bool IsKnownUnimportantField(const wxString& field); // a) for "brief" format: // // b) for "expanded" format: -// type= \ -// desc="" \ +// type= \ +// desc="" \ // exts="" // // We try to autodetect the format of mime.types: if a non-comment line starts @@ -1291,7 +1291,8 @@ void wxMimeTypesManagerImpl::Initialize(int mailcapStyles, const wxString& sExtraDir) { // read mimecap amd mime.types - if ( (mailcapStyles & wxMAILCAP_NETSCAPE) || (mailcapStyles & wxMAILCAP_BASE) ) + if ( (mailcapStyles & wxMAILCAP_NETSCAPE) || + (mailcapStyles & wxMAILCAP_STANDARD) ) GetMimeInfo(sExtraDir); // read GNOME tables @@ -1375,7 +1376,7 @@ void wxMimeTypesManagerImpl::GetMimeInfo (const wxString& sExtraDir) bool wxMimeTypesManagerImpl::WriteToMimeTypes (int index, bool delete_index) { // check we have the right manager - if (! ( m_mailcapStylesInited & wxMAILCAP_BASE) ) + if (! ( m_mailcapStylesInited & wxMAILCAP_STANDARD) ) return FALSE; bool bTemp; @@ -1517,7 +1518,7 @@ bool wxMimeTypesManagerImpl::WriteToMailCap (int index, bool delete_index) { //check we have the right managers if ( !( ( m_mailcapStylesInited & wxMAILCAP_NETSCAPE) || - ( m_mailcapStylesInited & wxMAILCAP_BASE) ) ) + ( m_mailcapStylesInited & wxMAILCAP_STANDARD) ) ) return FALSE; bool bTemp; @@ -1568,7 +1569,7 @@ bool wxMimeTypesManagerImpl::WriteToMailCap (int index, bool delete_index) sTmp = sTmp + wxT(";") + sCmd ; //includes wxT(" %s "); // write it in the format that Netscape uses (default) - if (! ( m_mailcapStylesInited & wxMAILCAP_BASE ) ) + if (! ( m_mailcapStylesInited & wxMAILCAP_STANDARD ) ) { if (! delete_index) file.InsertLine (sTmp, nIndex); nIndex ++; @@ -1712,7 +1713,7 @@ bool wxMimeTypesManagerImpl::WriteMimeInfo(int nIndex, bool delete_mime ) { bool ok = TRUE; - if ( m_mailcapStylesInited & wxMAILCAP_BASE ) + if ( m_mailcapStylesInited & wxMAILCAP_STANDARD ) { // write in metamail format; if (WriteToMimeTypes (nIndex, delete_mime) ) -- 2.45.2