]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xmlres.cpp
Committing in .
[wxWidgets.git] / src / xrc / xmlres.cpp
index 859a9eaa10335e113ce048886fcf2ed3a9adba82..e47ea3e254f621eae657ffe8fadd6414db64fd41 100644 (file)
@@ -103,7 +103,6 @@ bool wxXmlResource::Load(const wxString& filemask)
         if (filemask.Lower().Matches(wxT("*.zip")) ||
             filemask.Lower().Matches(wxT("*.xrs")))
         {
-            rt = rt && Load(fnd + wxT("#zip:*.xmlbin"));
             rt = rt && Load(fnd + wxT("#zip:*.xrc"));
         }
         else
@@ -1110,7 +1109,7 @@ void wxXmlResourceHandler::CreateChildren(wxObject *parent, bool this_hnd_only)
     while (n)
     {
         if (n->GetType() == wxXML_ELEMENT_NODE &&
-            n->GetName() == wxT("object"))
+           (n->GetName() == wxT("object") || n->GetName() == wxT("object_ref")))
         {
             if (this_hnd_only && CanHandle(n))
                 CreateResource(n, parent, NULL);
@@ -1182,10 +1181,21 @@ static XRCID_record *XRCID_Records[XRCID_TABLE_SIZE] = {NULL};
     XRCID_record **rec_var = (oldrec == NULL) ?
                               &XRCID_Records[index] : &oldrec->next;
     *rec_var = new XRCID_record;
-    (*rec_var)->id = ++XRCID_LastID;
     (*rec_var)->key = wxStrdup(str_id);
     (*rec_var)->next = NULL;
 
+    wxChar *end;
+    int asint = wxStrtol(str_id, &end, 10);
+    if (*str_id && *end == 0)
+    {
+        // if str_id was integer, keep it verbosely:
+        (*rec_var)->id = asint;
+    }
+    else
+    {
+        (*rec_var)->id = ++XRCID_LastID;
+    }
+
     return (*rec_var)->id;
 }