X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..cffbfebc684e000e4fd859b05b2f6fabae633c8a:/src/common/resource.cpp diff --git a/src/common/resource.cpp b/src/common/resource.cpp index e80276a71e..ff8d62e2c9 100644 --- a/src/common/resource.cpp +++ b/src/common/resource.cpp @@ -227,7 +227,7 @@ bool wxResourceTable::ParseResourceFile(const wxString& filename) { wxExprDatabase db; -#ifdef __WXMAC__ +#if defined(__WXMAC__) && !defined(__UNIX__) FILE *fd = fopen(wxUnix2MacFilename(filename.fn_str()), "r"); #else FILE *fd = wxFopen(filename, _T("r")); @@ -1055,7 +1055,8 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr) { wxExpr *valueList = (wxExpr *) NULL; - if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList)) + valueList = expr->Nth(count); + if (valueList && (valueList->Type() == PrologList)) { wxStringList stringList; wxExpr *stringExpr = valueList->GetFirst(); @@ -1072,7 +1073,8 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr) /* controlItem->SetValue1(wxLB_SINGLE); */ - if ((mult = expr->Nth(count)) && ((mult->Type() == PrologString)||(mult->Type() == PrologWord))) + mult = expr->Nth(count); + if (mult && ((mult->Type() == PrologString)||(mult->Type() == PrologWord))) { /* wxString m(mult->StringValue()); @@ -1097,7 +1099,8 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr) { wxExpr *valueList = (wxExpr *) NULL; // Check for default value list - if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList)) + valueList = expr->Nth(count); + if (valueList && (valueList->Type() == PrologList)) { wxStringList stringList; wxExpr *stringExpr = valueList->GetFirst(); @@ -1132,7 +1135,8 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr) wxExpr *valueList = (wxExpr *) NULL; // Check for default value list - if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList)) + valueList = expr->Nth(count); + if (valueList && (valueList->Type() == PrologList)) { wxStringList stringList; wxExpr *stringExpr = valueList->GetFirst(); @@ -1161,7 +1165,8 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr) { wxExpr *valueList = (wxExpr *) NULL; // Check for default value list - if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList)) + valueList = expr->Nth(count); + if (valueList && (valueList->Type() == PrologList)) { wxStringList stringList; wxExpr *stringExpr = valueList->GetFirst(); @@ -2210,6 +2215,7 @@ static wxResourceBitListStruct wxResourceBitListTable[] = { wxT("wxTRANSPARENT_WINDOW"), wxTRANSPARENT_WINDOW}, { wxT("wxNO_BORDER"), wxNO_BORDER}, { wxT("wxCLIP_CHILDREN"), wxCLIP_CHILDREN}, + { wxT("wxCLIP_SIBLINGS"), wxCLIP_SIBLINGS}, { wxT("wxTAB_TRAVERSAL"), 0}, // Compatibility only { wxT("wxTINY_CAPTION_HORIZ"), wxTINY_CAPTION_HORIZ}, @@ -2482,7 +2488,7 @@ wxBitmap wxResourceCreateBitmap(const wxString& resource, wxResourceTable *table } default: { - return wxBitmap(name, bitmapType); + return wxBitmap(name, (wxBitmapType)bitmapType); } } #ifndef __WXGTK__ @@ -2645,10 +2651,10 @@ wxIcon wxResourceCreateIcon(const wxString& resource, wxResourceTable *table) { #ifdef __WXGTK__ wxLogWarning(_("Icon resource specification %s not found."), (const wxChar*) resource); + break; #else return wxIcon(name, bitmapType); #endif - break; } } return wxNullIcon;