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:
parent
2b813b73cd
commit
a06c1b9b72
@ -33,7 +33,7 @@ public:
|
|||||||
~wxMimeTypesManagerImpl();
|
~wxMimeTypesManagerImpl();
|
||||||
|
|
||||||
// load all data into memory - done when it is needed for the first time
|
// 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);
|
const wxString& extraDir = wxEmptyString);
|
||||||
|
|
||||||
// and delete the data here
|
// and delete the data here
|
||||||
|
@ -294,8 +294,8 @@ static bool IsKnownUnimportantField(const wxString& field);
|
|||||||
// a) for "brief" format:
|
// a) for "brief" format:
|
||||||
// <mime type> <space separated list of extensions>
|
// <mime type> <space separated list of extensions>
|
||||||
// b) for "expanded" format:
|
// b) for "expanded" format:
|
||||||
// type=<mime type> \
|
// type=<mime type> \
|
||||||
// desc="<description>" \
|
// desc="<description>" \
|
||||||
// exts="<comma separated list of extensions>"
|
// exts="<comma separated list of extensions>"
|
||||||
//
|
//
|
||||||
// We try to autodetect the format of mime.types: if a non-comment line starts
|
// 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)
|
const wxString& sExtraDir)
|
||||||
{
|
{
|
||||||
// read mimecap amd mime.types
|
// read mimecap amd mime.types
|
||||||
if ( (mailcapStyles & wxMAILCAP_NETSCAPE) || (mailcapStyles & wxMAILCAP_BASE) )
|
if ( (mailcapStyles & wxMAILCAP_NETSCAPE) ||
|
||||||
|
(mailcapStyles & wxMAILCAP_STANDARD) )
|
||||||
GetMimeInfo(sExtraDir);
|
GetMimeInfo(sExtraDir);
|
||||||
|
|
||||||
// read GNOME tables
|
// read GNOME tables
|
||||||
@ -1375,7 +1376,7 @@ void wxMimeTypesManagerImpl::GetMimeInfo (const wxString& sExtraDir)
|
|||||||
bool wxMimeTypesManagerImpl::WriteToMimeTypes (int index, bool delete_index)
|
bool wxMimeTypesManagerImpl::WriteToMimeTypes (int index, bool delete_index)
|
||||||
{
|
{
|
||||||
// check we have the right manager
|
// check we have the right manager
|
||||||
if (! ( m_mailcapStylesInited & wxMAILCAP_BASE) )
|
if (! ( m_mailcapStylesInited & wxMAILCAP_STANDARD) )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
bool bTemp;
|
bool bTemp;
|
||||||
@ -1517,7 +1518,7 @@ bool wxMimeTypesManagerImpl::WriteToMailCap (int index, bool delete_index)
|
|||||||
{
|
{
|
||||||
//check we have the right managers
|
//check we have the right managers
|
||||||
if ( !( ( m_mailcapStylesInited & wxMAILCAP_NETSCAPE) ||
|
if ( !( ( m_mailcapStylesInited & wxMAILCAP_NETSCAPE) ||
|
||||||
( m_mailcapStylesInited & wxMAILCAP_BASE) ) )
|
( m_mailcapStylesInited & wxMAILCAP_STANDARD) ) )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
bool bTemp;
|
bool bTemp;
|
||||||
@ -1568,7 +1569,7 @@ bool wxMimeTypesManagerImpl::WriteToMailCap (int index, bool delete_index)
|
|||||||
sTmp = sTmp + wxT(";") + sCmd ; //includes wxT(" %s ");
|
sTmp = sTmp + wxT(";") + sCmd ; //includes wxT(" %s ");
|
||||||
|
|
||||||
// write it in the format that Netscape uses (default)
|
// 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);
|
if (! delete_index) file.InsertLine (sTmp, nIndex);
|
||||||
nIndex ++;
|
nIndex ++;
|
||||||
@ -1712,7 +1713,7 @@ bool wxMimeTypesManagerImpl::WriteMimeInfo(int nIndex, bool delete_mime )
|
|||||||
{
|
{
|
||||||
bool ok = TRUE;
|
bool ok = TRUE;
|
||||||
|
|
||||||
if ( m_mailcapStylesInited & wxMAILCAP_BASE )
|
if ( m_mailcapStylesInited & wxMAILCAP_STANDARD )
|
||||||
{
|
{
|
||||||
// write in metamail format;
|
// write in metamail format;
|
||||||
if (WriteToMimeTypes (nIndex, delete_mime) )
|
if (WriteToMimeTypes (nIndex, delete_mime) )
|
||||||
|
Loading…
Reference in New Issue
Block a user