wxBase compilation fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5718 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-01-28 20:54:50 +00:00
parent a02dc3e3ff
commit 6dc6fda694
4 changed files with 43 additions and 20 deletions

View File

@@ -560,8 +560,14 @@ void wxGNOMEIconHandler::GetMimeInfoRecords(wxMimeTypesManagerImpl *manager)
}
}
#if wxUSE_GUI
#define WXUNUSED_UNLESS_GUI(p) p
#else
#define WXUNUSED_UNLESS_GUI(p)
#endif
bool wxGNOMEIconHandler::GetIcon(const wxString& mimetype, wxIcon *icon)
bool wxGNOMEIconHandler::GetIcon(const wxString& mimetype,
wxIcon * WXUNUSED_UNLESS_GUI(icon))
{
if ( !m_inited )
{
@@ -581,8 +587,11 @@ bool wxGNOMEIconHandler::GetIcon(const wxString& mimetype, wxIcon *icon)
icn = wxIcon(iconname);
else
icn = wxIcon(iconname, wxBITMAP_TYPE_ANY);
if (icn.Ok()) *icon = icn;
else return FALSE;
if ( !icn.Ok() )
return FALSE;
if ( icon )
*icon = icn;
#else
// helpful for testing in console mode
wxLogDebug(_T("Found GNOME icon for '%s': '%s'\n"),
@@ -801,7 +810,8 @@ void wxKDEIconHandler::Init()
m_inited = TRUE;
}
bool wxKDEIconHandler::GetIcon(const wxString& mimetype, wxIcon *icon)
bool wxKDEIconHandler::GetIcon(const wxString& mimetype,
wxIcon * WXUNUSED_UNLESS_GUI(icon))
{
if ( !m_inited )
{
@@ -821,8 +831,12 @@ bool wxKDEIconHandler::GetIcon(const wxString& mimetype, wxIcon *icon)
icn = wxIcon(iconname);
else
icn = wxIcon(iconname, wxBITMAP_TYPE_ANY);
if (icn.Ok()) *icon = icn;
else return FALSE;
if ( !icn.Ok() )
return FALSE;
if ( icon )
*icon = icn;
#else
// helpful for testing in console mode
wxLogDebug(_T("Found KDE icon for '%s': '%s'\n"),