From 5f8566b2a3d294b9d8f3447c085381dfe510a9a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 25 Jun 2007 12:16:51 +0000 Subject: [PATCH] fixed 'url' field extraction to be done for wxHtmlWindow only (bug #1741900) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- utils/wxrc/wxrc.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/utils/wxrc/wxrc.cpp b/utils/wxrc/wxrc.cpp index 4cfa9ff753..23d5c5126d 100644 --- a/utils/wxrc/wxrc.cpp +++ b/utils/wxrc/wxrc.cpp @@ -437,10 +437,6 @@ static bool NodeContainsFilename(wxXmlNode *node) if ( name == _T("icon") ) return true; - // URLs in wxHtmlWindow: - if ( name == _T("url") ) - return true; - // wxBitmapButton: wxXmlNode *parent = node->GetParent(); if (parent != NULL && @@ -458,6 +454,15 @@ static bool NodeContainsFilename(wxXmlNode *node) return true; } + // URLs in wxHtmlWindow: + if ( name == _T("url") && + parent != NULL && + parent->GetPropVal(_T("class"), _T("")) == _T("wxHtmlWindow") ) + { + // FIXME: this is wrong for e.g. http:// URLs + return true; + } + return false; }