]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxrc/wxrc.cpp
Don't compile with < GTK 2.4
[wxWidgets.git] / utils / wxrc / wxrc.cpp
index c07224810ed12f9c5f87afaa2cca229b8467a8d6..aa5e0476a17a96eca0594c9b3729be55f7d8a755 100644 (file)
@@ -65,8 +65,8 @@ private:
         while (node)
         {
             if (node->GetName() == _T("object")
-                && node->GetPropVal(_T("class"),&classValue)
-                && node->GetPropVal(_T("name"),&nameValue))
+                && node->GetAttribute(_T("class"),&classValue)
+                && node->GetAttribute(_T("name"),&nameValue))
             {
                 m_wdata.Add(XRCWidgetData(nameValue,classValue));
             }
@@ -257,7 +257,7 @@ int XmlResApp::OnRun()
               wxCMD_LINE_VAL_STRING,
               wxCMD_LINE_PARAM_MULTIPLE | wxCMD_LINE_OPTION_MANDATORY },
 
-        { wxCMD_LINE_NONE, NULL, NULL, NULL, (wxCmdLineParamType)0, 0 }
+        wxCMD_LINE_DESC_END 
     };
 
     wxCmdLineParser parser(cmdLineDesc, argc, argv);
@@ -409,8 +409,8 @@ wxArrayString XmlResApp::PrepareTempFiles()
                 wxString classValue,nameValue;
                 while(node){
                     if(node->GetName() == _T("object")
-                     && node->GetPropVal(_T("class"),&classValue)
-                     && node->GetPropVal(_T("name"),&nameValue)){
+                     && node->GetAttribute(_T("class"),&classValue)
+                     && node->GetAttribute(_T("name"),&nameValue)){
 
                       aXRCWndClassData.Add(
                         XRCWndClassData(nameValue,classValue,node)
@@ -441,29 +441,35 @@ 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 &&
-       parent->GetPropVal(_T("class"), _T("")) == _T("wxBitmapButton") &&
+       parent->GetAttribute(_T("class"), _T("")) == _T("wxBitmapButton") &&
        (name == _T("focus") ||
         name == _T("disabled") ||
+        name == _T("hover") ||
         name == _T("selected")))
        return true;
 
    // wxBitmap or wxIcon toplevel resources:
    if ( name == _T("object") )
    {
-       wxString klass = node->GetPropVal(_T("class"), wxEmptyString);
+       wxString klass = node->GetAttribute(_T("class"), wxEmptyString);
        if (klass == _T("wxBitmap") ||
                klass == _T("wxIcon") ||
                 klass == _T("data") )
            return true;
    }
 
+   // URLs in wxHtmlWindow:
+   if ( name == _T("url") &&
+        parent != NULL &&
+        parent->GetAttribute(_T("class"), _T("")) == _T("wxHtmlWindow") )
+   {
+       // FIXME: this is wrong for e.g. http:// URLs
+       return true;
+   }
+
    return false;
 }
 
@@ -912,7 +918,7 @@ wxArrayString XmlResApp::FindStrings(wxXmlNode *node)
             // ...and known to contain translatable string
         {
             if (!flagGettext ||
-                node->GetPropVal(_T("translate"), _T("1")) != _T("0"))
+                node->GetAttribute(_T("translate"), _T("1")) != _T("0"))
             {
                 arr.Add(ConvertText(n->GetContent()));
             }