}
}
+#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 )
{
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"),
dirs.Add(_T("/usr/share"));
dirs.Add(_T("/opt/kde/share"));
icondirs.Add(_T("/usr/share/icons/"));
+ icondirs.Add(_T("/usr/X11R6/share/icons/")); // Debian/Corel linux
icondirs.Add(_T("/opt/kde/share/icons/"));
}
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 )
{
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"),