recognize bitmap2 tag as containing a bitmap (used for disabled toolbar buttons)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-03-21 15:12:37 +00:00
parent 497a2d6d54
commit bc151e8486

View File

@@ -381,28 +381,30 @@ wxArrayString XmlResApp::PrepareTempFiles()
// Does 'node' contain filename information at all? // Does 'node' contain filename information at all?
static bool NodeContainsFilename(wxXmlNode *node) static bool NodeContainsFilename(wxXmlNode *node)
{ {
// Any bitmaps: const wxString name = node->GetName();
if (node->GetName() == _T("bitmap"))
// Any bitmaps (bitmap2 is used for disabled toolbar buttons):
if ( name == _T("bitmap") || name == _T("bitmap2") )
return true; return true;
if (node->GetName() == _T("icon")) if ( name == _T("icon") )
return true; return true;
// URLs in wxHtmlWindow: // URLs in wxHtmlWindow:
if (node->GetName() == _T("url")) if ( name == _T("url") )
return true; return true;
// wxBitmapButton: // wxBitmapButton:
wxXmlNode *parent = node->GetParent(); wxXmlNode *parent = node->GetParent();
if (parent != NULL && if (parent != NULL &&
parent->GetPropVal(_T("class"), _T("")) == _T("wxBitmapButton") && parent->GetPropVal(_T("class"), _T("")) == _T("wxBitmapButton") &&
(node->GetName() == _T("focus") || (name == _T("focus") ||
node->GetName() == _T("disabled") || name == _T("disabled") ||
node->GetName() == _T("selected"))) name == _T("selected")))
return true; return true;
// wxBitmap or wxIcon toplevel resources: // wxBitmap or wxIcon toplevel resources:
if (node->GetName() == _T("object")) if ( name == _T("object") )
{ {
wxString klass = node->GetPropVal(_T("class"), wxEmptyString); wxString klass = node->GetPropVal(_T("class"), wxEmptyString);
if (klass == _T("wxBitmap") || klass == _T("wxIcon")) if (klass == _T("wxBitmap") || klass == _T("wxIcon"))