GetIcon() returns wxIconLocation, not wxIcon, now

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-06-23 13:49:24 +00:00
parent 80185c6ceb
commit da0766ab2a
10 changed files with 39 additions and 99 deletions

View File

@@ -1172,12 +1172,9 @@ wxString wxFileTypeImpl::GetExpandedCommand(const wxString & verb, const wxFileT
return wxFileType::ExpandCommand(sTmp, params);
}
bool wxFileTypeImpl::GetIcon(wxIcon *icon,
wxString *iconFile /*= NULL */,
int *iconIndex /*= NULL*/) const
bool wxFileTypeImpl::GetIcon(wxIconLocation *iconLoc) const
{
#if wxUSE_GUI
wxString sTmp;
size_t i = 0;
while ( (i < m_index.GetCount() ) && sTmp.empty() )
@@ -1185,25 +1182,15 @@ bool wxFileTypeImpl::GetIcon(wxIcon *icon,
sTmp = m_manager->m_aIcons[m_index[i]];
i ++;
}
if ( sTmp.empty () ) return FALSE;
if ( sTmp.empty () )
return FALSE;
wxIcon icn;
if (sTmp.Right(4).MakeUpper() == _T(".XPM"))
icn = wxIcon(sTmp);
else
icn = wxIcon(sTmp, wxBITMAP_TYPE_ANY);
if ( icn.Ok() )
if ( iconLoc )
{
*icon = icn;
if (iconFile) *iconFile = sTmp;
if (iconIndex) *iconIndex = 0;
return TRUE;
iconLoc->SetIconFile(sTmp);
}
#endif // wxUSE_GUI
return FALSE;
return TRUE;
}