X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b5f62a0b2db198609b45dec622a018dae37008e..5a2db5f1df5f0ac0a034366195c11047a416bf6a:/src/xrc/xmlres.cpp diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index 859a9eaa10..e47ea3e254 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -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; }