X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/717a57c2fabb054c8f00dc5dae70df1d03cfe532..96fa7876bf2cb12837b2eaf49a54f8a0547ef7c2:/src/common/resource.cpp?ds=sidebyside diff --git a/src/common/resource.cpp b/src/common/resource.cpp index 83def5dbb7..e600787ff3 100644 --- a/src/common/resource.cpp +++ b/src/common/resource.cpp @@ -119,10 +119,8 @@ void wxLogWarning(char *msg) wxMessageBox(msg, _("Warning"), wxOK); } -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxItemResource, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxResourceTable, wxHashTable) -#endif wxItemResource::wxItemResource() { @@ -214,7 +212,11 @@ bool wxResourceTable::ParseResourceFile(const wxString& filename) { wxExprDatabase db; +#ifdef __WXMAC__ + FILE *fd = fopen(wxUnix2MacFilename(filename.fn_str()), "r"); +#else FILE *fd = fopen(filename.fn_str(), "r"); +#endif if (!fd) return FALSE; bool eof = FALSE; @@ -641,7 +643,7 @@ wxItemResource *wxResourceInterpretDialog(wxResourceTable& table, wxExpr *expr, if (useDefaults != 0) dialogItem->SetResourceStyle(dialogItem->GetResourceStyle() | wxRESOURCE_USE_DEFAULTS); - long id = 0; + int id = 0; expr->GetAttributeValue(wxT("id"), id); dialogItem->SetId(id); @@ -2188,8 +2190,8 @@ wxBitmap wxResourceCreateBitmap(const wxString& resource, wxResourceTable *table return wxBitmap(item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3()) ; #else wxLogWarning(_("No XBM facility available!")); -#endif break; +#endif } case wxBITMAP_TYPE_XPM_DATA: { @@ -2204,13 +2206,12 @@ wxBitmap wxResourceCreateBitmap(const wxString& resource, wxResourceTable *table return wxBitmap((char **)item->GetValue1()); #else wxLogWarning(_("No XPM facility available!")); -#endif break; +#endif } default: { return wxBitmap(name, bitmapType); - break; } } return wxNullBitmap; @@ -2343,8 +2344,8 @@ wxIcon wxResourceCreateIcon(const wxString& resource, wxResourceTable *table) return wxIcon((const char **)item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3()); #else wxLogWarning(_("No XBM facility available!")); -#endif break; +#endif } case wxBITMAP_TYPE_XPM_DATA: {