From: Carl Hetherington Date: Thu, 11 Apr 2013 11:16:27 +0000 (+0100) Subject: Static / wx2.8 fixes. X-Git-Tag: v2.0.48~1337^2~452 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=9e8a216241509cdd0b72ea0a35a280a9f93a3ef1;p=dcpomatic.git Static / wx2.8 fixes. --- diff --git a/src/lib/wscript b/src/lib/wscript index 8f0e851e3..2a26c2bfe 100644 --- a/src/lib/wscript +++ b/src/lib/wscript @@ -75,6 +75,8 @@ def build(bld): """ if bld.env.TARGET_WINDOWS: obj.uselib += ' WINSOCK2' + if bld.env.STATIC: + obj.uselib += ' XML++' obj.source = sources + " version.cc" obj.target = 'dvdomatic' diff --git a/src/tools/dvdomatic.cc b/src/tools/dvdomatic.cc index 3fc19a91c..768819abc 100644 --- a/src/tools/dvdomatic.cc +++ b/src/tools/dvdomatic.cc @@ -554,7 +554,7 @@ class App : public wxApp bool OnCmdLineParsed (wxCmdLineParser& parser) { if (parser.GetParamCount() > 0) { - if (parser.FoundSwitch (wxT ("new"))) { + if (parser.Found (wxT ("new"))) { film_to_create = wx_to_std (parser.GetParam (0)); } else { film_to_load = wx_to_std (parser.GetParam(0)); diff --git a/src/wx/audio_mapping_view.cc b/src/wx/audio_mapping_view.cc index d62609d22..a5dacdfc2 100644 --- a/src/wx/audio_mapping_view.cc +++ b/src/wx/audio_mapping_view.cc @@ -62,7 +62,7 @@ public: wxRendererNative::Get().DrawCheckBox ( &grid, dc, rect, - grid.GetCellValue (row, col) == "1" ? static_cast(wxCONTROL_CHECKED) : 0 + grid.GetCellValue (row, col) == wxT("1") ? static_cast(wxCONTROL_CHECKED) : 0 ); } @@ -84,7 +84,11 @@ AudioMappingView::AudioMappingView (wxWindow* parent) _grid = new wxGrid (this, wxID_ANY); _grid->CreateGrid (0, 7); +#if wxMINOR_VERSION == 9 _grid->HideRowLabels (); +#else + _grid->SetRowLabelSize (0); +#endif _grid->DisableDragRowSize (); _grid->DisableDragColSize (); _grid->EnableEditing (false); @@ -115,10 +119,10 @@ AudioMappingView::left_click (wxGridEvent& ev) return; } - if (_grid->GetCellValue (ev.GetRow(), ev.GetCol()) == "1") { - _grid->SetCellValue (ev.GetRow(), ev.GetCol(), "0"); + if (_grid->GetCellValue (ev.GetRow(), ev.GetCol()) == wxT("1")) { + _grid->SetCellValue (ev.GetRow(), ev.GetCol(), wxT("0")); } else { - _grid->SetCellValue (ev.GetRow(), ev.GetCol(), "1"); + _grid->SetCellValue (ev.GetRow(), ev.GetCol(), wxT("1")); } } @@ -142,11 +146,11 @@ AudioMappingView::set_mapping (AudioMapping map) for (list::iterator i = content_channels.begin(); i != content_channels.end(); ++i) { shared_ptr ac = i->content.lock (); assert (ac); - _grid->SetCellValue (n, 0, wxString::Format ("%s %d", std_to_wx (ac->file().filename().string()), i->index + 1)); + _grid->SetCellValue (n, 0, wxString::Format (wxT("%s %d"), std_to_wx (ac->file().filename().string()).data(), i->index + 1)); list const d = map.content_to_dcp (*i); for (list::const_iterator j = d.begin(); j != d.end(); ++j) { - _grid->SetCellValue (n, static_cast (*j) + 1, "1"); + _grid->SetCellValue (n, static_cast (*j) + 1, wxT("1")); } ++n; } diff --git a/wscript b/wscript index 3f3ae2019..502f27fd1 100644 --- a/wscript +++ b/wscript @@ -75,6 +75,7 @@ def configure(conf): conf.env.LIB_DCP = ['glibmm-2.4', 'xml++-2.6', 'ssl', 'crypto', 'bz2'] conf.env.HAVE_CXML = 1 conf.env.STLIB_CXML = ['cxml'] + conf.check_cfg(package = 'libxml++-2.6', args = '--cflags --libs', uselib_store = 'XML++', mandatory = True) conf.env.HAVE_AVFORMAT = 1 conf.env.STLIB_AVFORMAT = ['avformat'] conf.env.HAVE_AVFILTER = 1