Dear maintainer and dear Olly, I've tried my best to contribue my two cents in migrating to wxwidgets3.0. The project just seemed at my hand reach.
Cheers David.
diff -Nru --from-file orig/chipw-2.0.6/ orig/chipw-2.0.6/debian/changelog chipw-2.0.6/debian/changelog --- orig/chipw-2.0.6/debian/changelog 2011-12-16 14:50:53.000000000 +0100 +++ chipw-2.0.6/debian/changelog 2014-06-03 01:27:10.890468373 +0200 @@ -1,3 +1,10 @@ +chipw (2.0.6-1.2) unstable; urgency=low + + * Non-maintainer upload + * Update to use wxWidgets3.0 + + -- David <deiv...@yahoo.es> Tue, 3 Jun 2014 01:27:10 +0200 + chipw (2.0.6-1.1) unstable; urgency=low * Non-maintainer upload at maintainer's request. diff -Nru --from-file orig/chipw-2.0.6/ orig/chipw-2.0.6/debian/control chipw-2.0.6/debian/control --- orig/chipw-2.0.6/debian/control 2011-12-16 14:47:25.000000000 +0100 +++ chipw-2.0.6/debian/control 2014-06-03 01:28:04.853789962 +0200 @@ -2,7 +2,7 @@ Section: games Priority: optional Maintainer: Luke Faraone <l...@faraone.cc> -Build-Depends: cdbs, debhelper (>= 7), libwxgtk2.8-dev +Build-Depends: cdbs, debhelper (>= 7), libwxgtk3.0-dev DM-Upload-Allowed: yes Standards-Version: 3.9.0 Homepage: http://www.microstupidity.com/chipw/ diff -Nru --from-file orig/chipw-2.0.6/ orig/chipw-2.0.6/src/leveleditview.cpp chipw-2.0.6/src/leveleditview.cpp --- orig/chipw-2.0.6/src/leveleditview.cpp 2011-12-15 16:40:24.000000000 +0100 +++ chipw-2.0.6/src/leveleditview.cpp 2014-06-03 01:03:59.311962884 +0200 @@ -210,10 +210,13 @@ void LevelEditView::OnChangeFilename() { if(GetDocument() != NULL && GetFrame() != NULL) { wxString name; - GetDocument()->GetPrintableName(name); + /*DVD GetDocument()->GetPrintableName(name);*/ + name=GetDocument()->GetUserReadableName(); wxString title = wxT("Chip's Workshop"); - if(name) - title += wxT(" - ") + name; + /* Not needed any more GURN returns default wxString unnamed + if(name) + */ + title += wxT(" - ") + name; if(level != NULL && !level->title.empty()) title += wxT(" (") + wxString(level->title.c_str(), wxConvISO8859_1) + wxT(")"); if(GetFrame()->IsKindOf(CLASSINFO(wxTopLevelWindow))) @@ -343,18 +346,18 @@ std::string title = level->title; { const wxWX2MBbuf str = dlg.title.mb_str(wxConvISO8859_1); - if(str != NULL) +/*DVD mb_str never returns NULL as of wx/string.h:AsChar if(str != NULL)*/ title = str; - else - wxLogError(wxT("Failed to set level title.")); +/*DVD mb_str never returns NULL as of wx/string.h:AsChar else + wxLogError(wxT("Failed to set level title."));*/ } std::string psw = level->psw; { const wxWX2MBbuf str = dlg.psw.mb_str(wxConvISO8859_1); - if(str != NULL) +/*DVD mb_str never returns NULL as of wx/string.h:AsChar if(str != NULL)*/ psw = str; - else - wxLogError(wxT("Failed to set level password.")); +/*DVD mb_str never returns NULL as of wx/string.h:AsChar else + wxLogError(wxT("Failed to set level password."));*/ } wxUint16 chips = level->chips; if(dlg.chips.ToULong(&ul) && ul < 65536) @@ -369,10 +372,10 @@ std::string hint = level->hint; { const wxWX2MBbuf str = dlg.hint.mb_str(wxConvISO8859_1); - if(str != NULL) +/*DVD mb_str never returns NULL as of wx/string.h:AsChar if(str != NULL)*/ hint = str; - else - wxLogError(wxT("Failed to set level hint.")); +/*DVD mb_str never returns NULL as of wx/string.h:AsChar else + wxLogError(wxT("Failed to set level hint."));*/ } wxUint16 levelnumber = level->levelnumber; if(dlg.levnum.ToULong(&ul) && ul < 65536) @@ -827,7 +830,7 @@ wxRegion region(x1, y1, selw * GetTileW(), selh * GetTileH()); region.Xor(x2, y2, w * GetTileW(), h * GetTileH()); wxDC* dc = NewClientDC(); - dc->SetClippingRegion(region); + dc->SetDeviceClippingRegion(region); DrawSelection(dc, 0, 0, 32, 32); delete dc; } @@ -896,7 +899,12 @@ void LevelEditView::DrawSelection(wxDC* dc, wxUint32 x, wxUint32 y, wxUint32 w, wxUint32 h) { if(x < 32 && y < 32 && w > 0 && h > 0) { - int origfunc = dc->GetLogicalFunction(); + /*DVDint origfunc = dc->GetLogicalFunction();*/ +#if wxCHECK_VERSION(2,9,0) + wxRasterOperationMode origfunc = dc->GetLogicalFunction(); +#else + int origfunc = dc->GetLogicalFunction(); +#endif dc->SetLogicalFunction(wxINVERT); dc->SetPen(*wxTRANSPARENT_PEN); dc->SetBrush(*wxBLACK_BRUSH); @@ -963,7 +971,12 @@ continue; } if(tilelist != NULL && tilelist->IsSelected(tileselgrid[x + TILESEL_WIDTH * y])) { - int origfunc = dc->GetLogicalFunction(); + /*DVDint origfunc = dc->GetLogicalFunction();*/ +#if wxCHECK_VERSION(2,9,0) + wxRasterOperationMode origfunc = dc->GetLogicalFunction(); +#else + int origfunc = dc->GetLogicalFunction(); +#endif dc->SetLogicalFunction(wxINVERT); dc->SetPen(*wxTRANSPARENT_PEN); dc->SetBrush(*wxBLACK_BRUSH); diff -Nru --from-file orig/chipw-2.0.6/ orig/chipw-2.0.6/src/listmenumgr.cpp chipw-2.0.6/src/listmenumgr.cpp --- orig/chipw-2.0.6/src/listmenumgr.cpp 2011-12-15 16:40:24.000000000 +0100 +++ chipw-2.0.6/src/listmenumgr.cpp 2014-06-03 01:12:11.109780148 +0200 @@ -81,7 +81,13 @@ wxMenuItem* item = *itemit; if(item == NULL) continue; - item->SetText(GetItemLabel(i, newitems, emptytext)); + +/*DVD item->SetText(GetItemLabel(i, newitems, emptytext));*/ +#if wxCHECK_VERSION(2,8,0) + item->SetItemLabel(GetItemLabel(i, newitems, emptytext)); +#else + item->SetText(GetItemLabel(i,newitems,emptytext)); +#endif item->Enable((unsigned int) i < newitems.size()); } // Add items if the length has increased. diff -Nru --from-file orig/chipw-2.0.6/ orig/chipw-2.0.6/src/tileset.cpp chipw-2.0.6/src/tileset.cpp --- orig/chipw-2.0.6/src/tileset.cpp 2011-12-15 16:40:24.000000000 +0100 +++ chipw-2.0.6/src/tileset.cpp 2014-06-03 00:46:18.469299483 +0200 @@ -210,11 +210,11 @@ if(!CheckMaxSize(size, size)) return false; // Avoiding alpha simplifies the code, and it doesn't seem to work well in wxWidgets anyway. - if(!img.ConvertAlphaToMask()) { + if(img.HasAlpha() && !img.ConvertAlphaToMask()) { wxLogError(wxT("Failed to generate image mask.")); return false; } - if(CheckOk(img2) && !img2.ConvertAlphaToMask()) { + if(CheckOk(img2) && img2.HasAlpha() && !img2.ConvertAlphaToMask()) { wxLogError(wxT("Failed to generate secondary image mask.")); return false; }