]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed 'url' field extraction to be done for wxHtmlWindow only (bug #1741900)
authorVáclav Slavík <vslavik@fastmail.fm>
Mon, 25 Jun 2007 12:16:20 +0000 (12:16 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Mon, 25 Jun 2007 12:16:20 +0000 (12:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

utils/wxrc/wxrc.cpp

index c07224810ed12f9c5f87afaa2cca229b8467a8d6..9d740b494726de79f5d14118e39ac7dff7aa15e6 100644 (file)
@@ -441,10 +441,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 &&
@@ -464,6 +460,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;
 }