X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f03fc89fff2d6e823e7d4d14fbe14822ad6777b1..76784eecd960198bc54429a6e16d5bd7af458fce:/src/common/resource.cpp diff --git a/src/common/resource.cpp b/src/common/resource.cpp index f5168e6796..f194ea4167 100644 --- a/src/common/resource.cpp +++ b/src/common/resource.cpp @@ -45,6 +45,7 @@ #include "wx/checkbox.h" #include "wx/settings.h" #include "wx/slider.h" +#include "wx/icon.h" #include "wx/statbox.h" #include "wx/statbmp.h" #if wxUSE_GAUGE @@ -651,6 +652,9 @@ wxItemResource *wxResourceInterpretDialog(wxResourceTable& table, wxExpr *expr, } dialogItem->SetStyle(windowStyle); dialogItem->SetValue1(isModal); + if (windowStyle & wxDIALOG_MODAL) // Uses style in wxWin 2 + dialogItem->SetValue1(TRUE); + dialogItem->SetName(name); dialogItem->SetTitle(title); dialogItem->SetSize(x, y, width, height); @@ -1617,9 +1621,9 @@ bool wxResourceReadOneResource(FILE *fd, wxExprDatabase& db, bool *eof, wxResour if (strcmp(wxResourceBuffer, "#define") == 0) { wxGetResourceToken(fd); - wxChar *name = copystring(wxConv_libc.cMB2WX(wxResourceBuffer)); + wxChar *name = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer)); wxGetResourceToken(fd); - wxChar *value = copystring(wxConv_libc.cMB2WX(wxResourceBuffer)); + wxChar *value = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer)); if (wxIsalpha(value[0])) { int val = (int)wxAtol(value); @@ -1640,7 +1644,7 @@ bool wxResourceReadOneResource(FILE *fd, wxExprDatabase& db, bool *eof, wxResour else if (strcmp(wxResourceBuffer, "#include") == 0) { wxGetResourceToken(fd); - wxChar *name = copystring(wxConv_libc.cMB2WX(wxResourceBuffer)); + wxChar *name = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer)); wxChar *actualName = name; if (name[0] == _T('"')) actualName = name + 1; @@ -1658,7 +1662,7 @@ bool wxResourceReadOneResource(FILE *fd, wxExprDatabase& db, bool *eof, wxResour { wxChar buf[300]; wxStrcpy(buf, _("Found ")); - wxStrncat(buf, wxConv_libc.cMB2WX(wxResourceBuffer), 30); + wxStrncat(buf, wxConvCurrent->cMB2WX(wxResourceBuffer), 30); wxStrcat(buf, _(", expected static, #include or #define\nwhilst parsing resource.")); wxLogWarning(buf); return FALSE; @@ -1893,6 +1897,9 @@ static wxResourceBitListStruct wxResourceBitListTable[] = { _T("wxTB_VERTICAL"), wxTB_VERTICAL}, { _T("wxTB_FLAT"), wxTB_FLAT}, + /* wxDialog */ + { _T("wxDIALOG_MODAL"), wxDIALOG_MODAL }, + /* Generic */ { _T("wxVSCROLL"), wxVSCROLL }, { _T("wxHSCROLL"), wxHSCROLL }, @@ -2518,9 +2525,9 @@ bool wxResourceParseIncludeFile(const wxString& f, wxResourceTable *table) if (strcmp(wxResourceBuffer, "#define") == 0) { wxGetResourceToken(fd); - wxChar *name = copystring(wxConv_libc.cMB2WX(wxResourceBuffer)); + wxChar *name = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer)); wxGetResourceToken(fd); - wxChar *value = copystring(wxConv_libc.cMB2WX(wxResourceBuffer)); + wxChar *value = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer)); if (wxIsdigit(value[0])) { int val = (int)wxAtol(value); @@ -2691,9 +2698,9 @@ bool wxResourceReadOneResourceString(char *s, wxExprDatabase& db, bool *eof, wxR if (strcmp(wxResourceBuffer, "#define") == 0) { wxGetResourceTokenString(s); - wxChar *name = copystring(wxConv_libc.cMB2WX(wxResourceBuffer)); + wxChar *name = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer)); wxGetResourceTokenString(s); - wxChar *value = copystring(wxConv_libc.cMB2WX(wxResourceBuffer)); + wxChar *value = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer)); if (wxIsalpha(value[0])) { int val = (int)wxAtol(value); @@ -2736,7 +2743,7 @@ bool wxResourceReadOneResourceString(char *s, wxExprDatabase& db, bool *eof, wxR { wxChar buf[300]; wxStrcpy(buf, _("Found ")); - wxStrncat(buf, wxConv_libc.cMB2WX(wxResourceBuffer), 30); + wxStrncat(buf, wxConvCurrent->cMB2WX(wxResourceBuffer), 30); wxStrcat(buf, _(", expected static, #include or #define\nwhilst parsing resource.")); wxLogWarning(buf); return FALSE;