Unix compilation fixes for new MIME code

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2001-04-24 00:07:04 +00:00
parent 2b813b73cd
commit a06c1b9b72
2 changed files with 9 additions and 8 deletions

View File

@ -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

View File

@ -294,8 +294,8 @@ static bool IsKnownUnimportantField(const wxString& field);
// a) for "brief" format:
// <mime type> <space separated list of extensions>
// b) for "expanded" format:
// type=<mime type> \
// desc="<description>" \
// type=<mime type> \
// desc="<description>" \
// exts="<comma separated list of extensions>"
//
// 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) )