// headers
// ----------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma implementation "mimetype.h"
-#endif
-
// for compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
// add a new verb with the command or replace the old value
void AddOrReplaceVerb(const wxString& verb, const wxString& cmd)
{
- int n = m_verbs.Index(verb, FALSE /* ignore case */);
+ int n = m_verbs.Index(verb, false /* ignore case */);
if ( n == wxNOT_FOUND )
{
m_verbs.Add(verb);
wxMimeTextFile () : wxTextFile () {};
wxMimeTextFile (const wxString& strFile) : wxTextFile (strFile) { };
- int pIndexOf(const wxString & sSearch, bool bIncludeComments = FALSE, int iStart = 0)
+ int pIndexOf(const wxString & sSearch, bool bIncludeComments = false, int iStart = 0)
{
size_t i = iStart;
int nResult = wxNOT_FOUND;
bool CommentLine(int nIndex)
{
- if (nIndex <0) return FALSE;
- if (nIndex >= (int)GetLineCount() ) return FALSE;
+ if (nIndex <0) return false;
+ if (nIndex >= (int)GetLineCount() ) return false;
GetLine(nIndex) = GetLine(nIndex).Prepend(wxT("#"));
- return TRUE;
+ return true;
}
bool CommentLine(const wxString & sTest)
{
int nIndex = pIndexOf(sTest);
- if (nIndex <0) return FALSE;
- if (nIndex >= (int)GetLineCount() ) return FALSE;
+ if (nIndex <0) return false;
+ if (nIndex >= (int)GetLineCount() ) return false;
GetLine(nIndex) = GetLine(nIndex).Prepend(wxT("#"));
- return TRUE;
+ return true;
}
wxString GetVerb (size_t i)
if (!wxMkdir ( sTmp ))
{
wxLogError(_("Failed to create directory %s/.gnome."), sTmp.c_str());
- return FALSE;
+ return false;
}
}
sTmp = sTmp + wxT("/mime-info");
if (!wxMkdir ( sTmp ))
{
wxLogError(_("Failed to create directory %s/mime-info."), sTmp.c_str());
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
if (! outfile.Open () )
#endif
{
- if (delete_index) return FALSE;
- if (!CheckGnomeDirsExist() ) return FALSE;
+ if (delete_index) return false;
+ if (!CheckGnomeDirsExist() ) return false;
outfile.Create ();
}
wxMimeTypeCommands sOld;
size_t nOld = nIndex + 1;
- bool oldEntryEnd = FALSE;
- while ( (nOld < outfile.GetLineCount() )&& (oldEntryEnd == FALSE ))
+ bool oldEntryEnd = false;
+ while ( (nOld < outfile.GetLineCount() )&& (!oldEntryEnd))
{
sTmp = outfile.GetLine(nOld);
if ( (sTmp[0u] == wxT('\t')) || (sTmp[0u] == wxT('#')) )
}
// next mimetpye ??or blank line
else
- oldEntryEnd = TRUE;
+ oldEntryEnd = true;
}
// list of entries in our data; these should all be in sOld,
// though sOld may also contain other entries , eg flags
// create it anyway as a private mime store
if (! outfile.Open () )
{
- if (delete_index) return FALSE;
- if (!CheckGnomeDirsExist() ) return FALSE;
+ if (delete_index) return false;
+ if (!CheckGnomeDirsExist() ) return false;
outfile.Create ();
}
wxString strType = m_aTypes[index];
else if (sTmp.Contains( wxT("icon_filename=") ) )
{
curIconFile = sTmp.AfterFirst(wxT('='));
-
+
if (!wxFileExists(curIconFile))
{
size_t nDirs = dirs.GetCount();
// for now ignore lines with flags in...FIX
sTmp = sTmp.AfterLast(wxT(']'));
sTmp = sTmp.AfterLast(wxT('\t'));
- sTmp.Trim(FALSE).Trim();
+ sTmp.Trim(false).Trim();
if (0 == sTmp.Replace ( wxT("%f"), wxT("%s") )) sTmp = sTmp + wxT(" %s");
entry->Add(sTmp);
// ignore blank lines
nLine ++;
} // end of while, save any data
-
+
if (! curMimeType.empty())
AddToMimeData ( curMimeType, curIconFile, entry, strExtensions, strDesc);
}
const wxChar *pc;
size_t nLineCount = textfile.GetLineCount();
- for ( size_t nLine = 0;; nLine++ )
+ for ( size_t nLine = 0; /* nothing */; nLine++ )
{
if ( nLine < nLineCount )
{
if ( !pc || !*pc )
{
// end of the entry
- if ( !!curMimeType && !!curExtList )
+ if ( !curMimeType.empty() && !curExtList.empty() )
{
wxLogTrace(TRACE_MIME,
wxT("--- At end of Gnome file finding mimetype %s ---"),
curMimeType.c_str());
-
+
AddMimeTypeInfo(curMimeType, curExtList, wxEmptyString);
}
void wxMimeTypesManagerImpl::LoadGnomeMimeFilesFromDir(
const wxString& dirbase, const wxArrayString& dirs)
{
- wxASSERT_MSG( !!dirbase && !wxEndsWithPathSeparator(dirbase),
+ wxASSERT_MSG( !dirbase.empty() && !wxEndsWithPathSeparator(dirbase),
_T("base directory shouldn't end with a slash") );
wxString dirname = dirbase;
dirname << wxT("/mime-info");
-
+
if ( !wxDir::Exists(dirname) )
return;
// mime-type from the file name.
dirname = dirbase;
dirname << wxT("/pixmaps/document-icons");
-
+
// these are always empty in this file
wxArrayString strExtensions;
wxString strDesc;
-
+
if ( !wxDir::Exists(dirname) )
{
// Jst test for default GPE dir also
dirname = wxT("/usr/share/gpe/pixmaps/default/filemanager/document-icons");
-
+
if ( !wxDir::Exists(dirname) )
return;
}
wxString iconFile = dirname;
iconFile << wxT("/");
iconFile << filename;
- AddToMimeData ( mimeType, iconFile, NULL, strExtensions, strDesc, TRUE );
+ AddToMimeData ( mimeType, iconFile, NULL, strExtensions, strDesc, true );
}
cont = dir2.GetNext(&filename);
void wxMimeTypesManagerImpl::GetGnomeMimeInfo(const wxString& sExtraDir)
{
wxArrayString dirs;
-
- wxString gnomedir = wxGetenv( wxT("GNOMEDIR") );;
+
+ wxString gnomedir = wxGetenv( wxT("GNOMEDIR") );
if (!gnomedir.empty())
{
gnomedir << wxT("/share");
dirs.Add(wxT("/usr/share"));
dirs.Add(wxT("/usr/local/share"));
-
+
gnomedir = wxGetHomeDir();
gnomedir << wxT("/.gnome");
dirs.Add( gnomedir );
-
+
if (!sExtraDir.empty()) dirs.Add( sExtraDir );
size_t nDirs = dirs.GetCount();
if (sTest.empty())
{
if (wxDir::Exists(sOK))
- return TRUE;
+ return true;
else
- return FALSE;
+ return false;
}
else
{
{
bTemp = mimeoutfile.Create (sTmp);
// some unknown error eg out of disk space
- if (!bTemp) return FALSE;
+ if (!bTemp) return false;
}
sTmp = wxT(".kde/share/applnk/");
{
bTemp = appoutfile.Create (sTmp);
// some unknown error eg out of disk space
- if (!bTemp) return FALSE;
+ if (!bTemp) return false;
}
// fixed data; write if new file
//other actions as well as open
}
- bTemp = FALSE;
- if (mimeoutfile.Write ()) bTemp = TRUE;
+ bTemp = false;
+ if (mimeoutfile.Write ()) bTemp = true;
mimeoutfile.Close ();
- if (appoutfile.Write ()) bTemp = TRUE;
+ if (appoutfile.Write ()) bTemp = true;
appoutfile.Close ();
return bTemp;
wxLogTrace(TRACE_MIME, wxT("loading KDE file %s"),
(dirbase+filename).c_str());
-
+
wxMimeTypeCommands * entry = new wxMimeTypeCommands;
wxArrayString sExts;
wxString mimetype, mime_desc, strIcon;
nIndex = file.pIndexOf(_T("Patterns="));
if ( nIndex != wxNOT_FOUND )
{
- wxString exts = file.GetCmd (nIndex);;
+ wxString exts = file.GetCmd (nIndex);
wxStringTokenizer tokenizer(exts, _T(";"));
while ( tokenizer.HasMoreTokens() )
strIcon = file.GetCmd(nIndex);
wxLogTrace(TRACE_MIME, wxT(" icon %s"), strIcon.c_str());
//it could be the real path, but more often a short name
-
-
+
+
if (!wxFileExists(strIcon))
{
// icon is just the short name
wxLogTrace(TRACE_MIME, wxT("--- Loading from KDE directory %s ---"),
dirname.c_str());
-
+
dirname += _T('/');
wxString filename;
void wxMimeTypesManagerImpl::LoadKDELinkFilesFromDir(const wxString& dirbase,
const wxArrayString& icondirs)
{
- wxASSERT_MSG( !!dirbase && !wxEndsWithPathSeparator(dirbase),
+ wxASSERT_MSG( !dirbase.empty() && !wxEndsWithPathSeparator(dirbase),
_T("base directory shouldn't end with a slash") );
wxString dirname = dirbase;
// code should give up if KDEDIR(S) is not set and/or the icon
// theme cannot be determined, because it means that the user is
// not using KDE (and thus is not interested in KDE icons anyway)
-
+
// the variable $KDEDIR is set when KDE is running
wxString kdedir = wxGetenv( wxT("KDEDIR") );
-
+
if (!kdedir.empty())
{
// $(KDEDIR)/share/config/kdeglobals holds info
configFile.AppendDir( wxT("share") );
configFile.AppendDir( wxT("config") );
configFile.SetName( wxT("kdeglobals") );
-
+
wxTextFile config;
if (configFile.FileExists() && config.Open(configFile.GetFullPath()))
{
// $(KDEDIR)/share/icons -> $(KDEDIR)/share/icons/default.kde
configFile.AppendDir( wxT("default.kde") );
}
-
+
configFile.SetName( wxEmptyString );
configFile.AppendDir( wxT("32x32") );
configFile.AppendDir( wxT("mimetypes") );
-
+
// Just try a few likely icons theme names
-
+
int pos = configFile.GetDirCount()-3;
-
+
if (!wxDir::Exists(configFile.GetPath()))
{
configFile.RemoveDir( pos );
configFile.InsertDir( pos, wxT("default.kde") );
}
-
+
if (!wxDir::Exists(configFile.GetPath()))
{
configFile.RemoveDir( pos );
configFile.InsertDir( pos, wxT("default") );
}
-
+
if (!wxDir::Exists(configFile.GetPath()))
{
configFile.RemoveDir( pos );
configFile.InsertDir( pos, wxT("crystalsvg") );
}
-
+
if (!wxDir::Exists(configFile.GetPath()))
{
configFile.RemoveDir( pos );
configFile.InsertDir( pos, wxT("crystal") );
}
-
+
if (wxDir::Exists(configFile.GetPath()))
icondirs.Add( configFile.GetFullPath() );
}
i ++;
}
if ( sTmp.empty () )
- return FALSE;
+ return false;
if ( iconLoc )
{
iconLoc->SetFileName(sTmp);
}
- return TRUE;
+ return true;
}
mimeTypes.Clear();
for (size_t i = 0; i < m_index.GetCount(); i++)
mimeTypes.Add(m_manager->m_aTypes[m_index[i]]);
- return TRUE;
+ return true;
}
wxString strExtensions = m_manager->GetExtension(m_index[0]);
extensions.Empty();
- // one extension in the space or comma delimitid list
+ // one extension in the space or comma-delimited list
wxString strExt;
- for ( const wxChar *p = strExtensions;; p++ ) {
+ for ( const wxChar *p = strExtensions; /* nothing */; p++ ) {
if ( *p == wxT(' ') || *p == wxT(',') || *p == wxT('\0') ) {
if ( !strExt.empty() ) {
extensions.Add(strExt);
}
}
- return TRUE;
+ return true;
}
// set an arbitrary command,
// could adjust the code to ask confirmation if it already exists and
-// overwriteprompt is TRUE, but this is currently ignored as *Associate* has
+// overwriteprompt is true, but this is currently ignored as *Associate* has
// no overwrite prompt
-bool wxFileTypeImpl::SetCommand(const wxString& cmd, const wxString& verb, bool overwriteprompt /*= TRUE*/)
+bool
+wxFileTypeImpl::SetCommand(const wxString& cmd,
+ const wxString& verb,
+ bool WXUNUSED(overwriteprompt))
{
wxArrayString strExtensions;
wxString strDesc, strIcon;
wxArrayString strTypes;
GetMimeTypes (strTypes);
- if (strTypes.GetCount() < 1) return FALSE;
+ if (strTypes.GetCount() < 1) return false;
size_t i;
- bool Ok = TRUE;
+ bool Ok = true;
for (i = 0; i < strTypes.GetCount(); i++)
{
if (!m_manager->DoAssociation (strTypes[i], strIcon, entry, strExtensions, strDesc))
- Ok = FALSE;
+ Ok = false;
}
return Ok;
}
// ignore index on the grouds that we only have one icon in a Unix file
-bool wxFileTypeImpl::SetDefaultIcon(const wxString& strIcon /*= wxEmptyString*/, int /*index = 0*/)
+bool wxFileTypeImpl::SetDefaultIcon(const wxString& strIcon, int WXUNUSED(index))
{
- if (strIcon.empty()) return FALSE;
+ if (strIcon.empty()) return false;
wxArrayString strExtensions;
wxString strDesc;
wxArrayString strTypes;
GetMimeTypes (strTypes);
- if (strTypes.GetCount() < 1) return FALSE;
+ if (strTypes.GetCount() < 1) return false;
size_t i;
- bool Ok = TRUE;
+ bool Ok = true;
for (i = 0; i < strTypes.GetCount(); i++)
{
if (!m_manager->DoAssociation (strTypes[i], strIcon, entry, strExtensions, strDesc))
- Ok = FALSE;
+ Ok = false;
}
return Ok;
wxMimeTypesManagerImpl::wxMimeTypesManagerImpl()
{
- m_initialized = FALSE;
+ m_initialized = false;
m_mailcapStylesInited = 0;
}
if ( !m_initialized )
{
// set the flag first to prevent recursion
- m_initialized = TRUE;
-
+ m_initialized = true;
+
#if 0
wxString wm = wxGetenv( wxT("WINDOWMANAGER") );
-
+
if (wm.Find( wxT("kde") ) != wxNOT_FOUND)
Initialize( wxMAILCAP_KDE|wxMAILCAP_STANDARD );
else if (wm.Find( wxT("gnome") ) != wxNOT_FOUND)
{
// check we have the right manager
if (! ( m_mailcapStylesInited & wxMAILCAP_STANDARD) )
- return FALSE;
+ return false;
bool bTemp;
wxString strHome = wxGetenv(wxT("HOME"));
}
else
{
- if (delete_index) return FALSE;
+ if (delete_index) return false;
bTemp = file.Create(strUserMailcap);
}
if (bTemp)
{
int nIndex;
- // test for netscape's header and return FALSE if its found
+ // test for netscape's header and return false if its found
nIndex = file.pIndexOf (wxT("#--Netscape"));
if (nIndex != wxNOT_FOUND)
{
- wxASSERT_MSG(FALSE,wxT("Error in .mime.types \nTrying to mix Netscape and Metamail formats\nFile not modiifed"));
- return FALSE;
+ wxASSERT_MSG(false,wxT("Error in .mime.types \nTrying to mix Netscape and Metamail formats\nFile not modiifed"));
+ return false;
}
// write it in alternative format
// get rid of unwanted entries
{
//check we have the right managers
if (! ( m_mailcapStylesInited & wxMAILCAP_NETSCAPE) )
- return FALSE;
+ return false;
bool bTemp;
wxString strHome = wxGetenv(wxT("HOME"));
}
else
{
- if (delete_index) return FALSE;
+ if (delete_index) return false;
bTemp = file.Create(strUserMailcap);
}
if (bTemp)
// write it in the format that Netscape uses
int nIndex;
// test for netscape's header and insert if required...
- // this is a comment so use TRUE
- nIndex = file.pIndexOf (wxT("#--Netscape"), TRUE);
+ // this is a comment so use true
+ nIndex = file.pIndexOf (wxT("#--Netscape"), true);
if (nIndex == wxNOT_FOUND)
{
// either empty file or metamail format
// metamail entreies
if (file.GetLineCount () > 0)
{
- wxASSERT_MSG(FALSE, wxT(".mime.types File not in Netscape format\nNo entries written to\n.mime.types or to .mailcap"));
- return FALSE;
+ wxASSERT_MSG(false, wxT(".mime.types File not in Netscape format\nNo entries written to\n.mime.types or to .mailcap"));
+ return false;
}
file.InsertLine (wxT( "#--Netscape Communications Corporation MIME Information" ), 0);
nIndex = 0;
}
}
wxString sExts = m_aExtensions.Item(index);
- sTmp = wxT("exts=\"") + sExts.Trim(FALSE).Trim() + wxT("\"");
+ sTmp = wxT("exts=\"") + sExts.Trim(false).Trim() + wxT("\"");
if (!delete_index)
{
nIndex ++;
//check we have the right managers
if ( !( ( m_mailcapStylesInited & wxMAILCAP_NETSCAPE) ||
( m_mailcapStylesInited & wxMAILCAP_STANDARD) ) )
- return FALSE;
+ return false;
bool bTemp;
wxString strHome = wxGetenv(wxT("HOME"));
}
else
{
- if (delete_index) return FALSE;
+ if (delete_index) return false;
bTemp = file.Create(strUserMailcap);
}
if (bTemp)
s = sT.GetNextToken();
while ( ! s.empty() )
{
- bool bKnownToken = FALSE;
- if (s.Contains(wxT("description="))) bKnownToken = TRUE;
- if (s.Contains(wxT("x11-bitmap="))) bKnownToken = TRUE;
+ bool bKnownToken = false;
+ if (s.Contains(wxT("description="))) bKnownToken = true;
+ if (s.Contains(wxT("x11-bitmap="))) bKnownToken = true;
size_t i;
for (i=0; i < entries->GetCount(); i++)
{
- if (s.Contains(entries->GetVerb(i))) bKnownToken = TRUE;
+ if (s.Contains(entries->GetVerb(i))) bKnownToken = true;
}
if (!bKnownToken)
{
{
sExt = sA_Exts.Item(i);
//clean up to just a space before and after
- sExt.Trim().Trim(FALSE);
+ sExt.Trim().Trim(false);
sExt = wxT(' ') + sExt + wxT(' ');
for (nIndex = 0; nIndex < m_aExtensions.GetCount(); nIndex ++)
{
const wxArrayString& strExtensions,
const wxString& strDesc)
{
- int nIndex = AddToMimeData(strType, strIcon, entry, strExtensions, strDesc, TRUE);
+ int nIndex = AddToMimeData(strType, strIcon, entry, strExtensions, strDesc, true);
if ( nIndex == wxNOT_FOUND )
- return FALSE;
+ return false;
- return WriteMimeInfo (nIndex, FALSE);
+ return WriteMimeInfo (nIndex, false);
}
bool wxMimeTypesManagerImpl::WriteMimeInfo(int nIndex, bool delete_mime )
{
- bool ok = TRUE;
+ bool ok = true;
if ( m_mailcapStylesInited & wxMAILCAP_STANDARD )
{
// write in metamail format;
if (WriteToMimeTypes (nIndex, delete_mime) )
if ( WriteToMailCap (nIndex, delete_mime) )
- ok = FALSE;
+ ok = false;
}
if ( m_mailcapStylesInited & wxMAILCAP_NETSCAPE )
{
// write in netsacpe format;
if (WriteToNSMimeTypes (nIndex, delete_mime) )
if ( WriteToMailCap (nIndex, delete_mime) )
- ok = FALSE;
+ ok = false;
}
if (m_mailcapStylesInited & wxMAILCAP_GNOME)
{
// write in Gnome format;
if (WriteGnomeMimeFile (nIndex, delete_mime) )
if (WriteGnomeKeyFile (nIndex, delete_mime) )
- ok = FALSE;
+ ok = false;
}
if (m_mailcapStylesInited & wxMAILCAP_KDE)
{
// write in KDE format;
if (WriteKDEMimeFile (nIndex, delete_mime) )
- ok = FALSE;
+ ok = false;
}
return ok;
while ( tk.HasMoreTokens() )
{
// consider extensions as not being case-sensitive
- if ( tk.GetNextToken().IsSameAs(ext, FALSE /* no case */) )
+ if ( tk.GetNextToken().IsSameAs(ext, false /* no case */) )
{
// found
wxFileType *fileType = new wxFileType;
wxString sTmp = strExtensions;
wxArrayString sExts;
- sTmp.Trim().Trim(FALSE);
+ sTmp.Trim().Trim(false);
while (!sTmp.empty())
{
sTmp = sTmp.BeforeLast(wxT(' '));
}
- AddToMimeData (strMimeType, strIcon, NULL, sExts, strDesc, TRUE);
+ AddToMimeData (strMimeType, strIcon, NULL, sExts, strDesc, true);
}
void wxMimeTypesManagerImpl::AddMailcapInfo(const wxString& strType,
wxString strIcon;
wxArrayString strExtensions;
- AddToMimeData (strType, strIcon, entry, strExtensions, strDesc, TRUE);
+ AddToMimeData (strType, strIcon, entry, strExtensions, strDesc, true);
}
#else
if ( !file.Open() )
#endif
- return FALSE;
+ return false;
// the information we extract
wxString strMimeType, strDesc, strExtensions;
// if there is something left, it may be either a '\\' to continue
// the line or the next field of the same entry
bool entryEnded = *pc == wxT('\0'),
- nextFieldOnSameLine = FALSE;
+ nextFieldOnSameLine = false;
if ( !entryEnded ) {
nextFieldOnSameLine = ((*pc != wxT('\\')) || (pc[1] != wxT('\0')));
}
pc = NULL;
}
- return TRUE;
+ return true;
}
// ----------------------------------------------------------------------------
needsterminal,
copiousoutput;
- MailcapLineData() { testfailed = needsterminal = copiousoutput = FALSE; }
+ MailcapLineData() { testfailed = needsterminal = copiousoutput = false; }
};
// process a non-standard (i.e. not the first or second one) mailcap field
if ( curField.empty() )
{
// we don't care
- return TRUE;
+ return true;
}
// is this something of the form foo=bar?
wxString lhs = curField.BeforeFirst(wxT('=')),
rhs = curField.AfterFirst(wxT('='));
- lhs.Trim(TRUE); // from right
- rhs.Trim(FALSE); // from left
+ lhs.Trim(true); // from right
+ rhs.Trim(false); // from left
// it might be quoted
if ( !rhs.empty() && rhs[0u] == wxT('"') && rhs.Last() == wxT('"') )
wxT("Test '%s' for mime type '%s' failed, skipping."),
rhs.c_str(), data.type.c_str());
- data.testfailed = TRUE;
+ data.testfailed = true;
}
}
else if ( lhs == wxT("desc") )
// so it must be a simple flag
if ( curField == wxT("needsterminal") )
{
- data.needsterminal = TRUE;
+ data.needsterminal = true;
}
else if ( curField == wxT("copiousoutput"))
{
// copiousoutput impies that the viewer is a console program
data.needsterminal =
- data.copiousoutput = TRUE;
+ data.copiousoutput = true;
}
else if ( !IsKnownUnimportantField(curField) )
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
bool wxMimeTypesManagerImpl::ReadMailcap(const wxString& strFileName,
#else
if ( !file.Open() )
#endif
- return FALSE;
+ return false;
// indices of MIME types (in m_aTypes) we already found in this file
//
// the flags and field values on the current line
MailcapLineData data;
- bool cont = TRUE;
+ bool cont = true;
while ( cont )
{
switch ( *pc )
if ( nLine == nLineCount - 1 )
{
// something is wrong, bail out
- cont = FALSE;
+ cont = false;
wxLogDebug(wxT("Mailcap file %s, line %lu: '\\' on the end of the last line ignored."),
strFileName.c_str(),
break;
case wxT('\0'):
- cont = FALSE; // end of line reached, exit the loop
+ cont = false; // end of line reached, exit the loop
// fall through to still process this field
case wxT(';'):
// trim whitespaces from both sides
- curField.Trim(TRUE).Trim(FALSE);
+ curField.Trim(true).Trim(false);
switch ( currentToken )
{
else if ( data.testfailed )
{
// skip this entry entirely
- cont = FALSE;
+ cont = false;
}
// it already has this value
// the fall back entries have the lowest priority, by definition
if ( fallback )
{
- overwrite = FALSE;
+ overwrite = false;
}
else
{
}
}
- return TRUE;
+ return true;
}
size_t wxMimeTypesManagerImpl::EnumAllFileTypes(wxArrayString& mimetypes)
if ( nIndex == wxNOT_FOUND)
{
// error if we get here ??
- return FALSE;
+ return false;
}
else
{
- WriteMimeInfo(nIndex, TRUE );
+ WriteMimeInfo(nIndex, true );
m_aTypes.RemoveAt(nIndex);
m_aEntries.RemoveAt(nIndex);
m_aExtensions.RemoveAt(nIndex);
m_aTypes.Count() == m_aIcons.Count() &&
m_aTypes.Count() == m_aDescriptions.Count() );
- return TRUE;
+ return true;
}
// ----------------------------------------------------------------------------
for ( size_t n = 0; n < WXSIZEOF(knownFields); n++ )
{
if ( field.CmpNoCase(knownFields[n]) == 0 )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
#endif