Static / wx2.8 fixes.
authorCarl Hetherington <cth@carlh.net>
Thu, 11 Apr 2013 11:16:27 +0000 (12:16 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 11 Apr 2013 11:16:27 +0000 (12:16 +0100)
src/lib/wscript
src/tools/dvdomatic.cc
src/wx/audio_mapping_view.cc
wscript

index 8f0e851e39d6a6387f2cad7bc6945bd47f5bdf27..2a26c2bfe728b96093adf2953dddb70964ed7fd7 100644 (file)
@@ -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'
 
index 3fc19a91cfc0447170e8177a6f5fb47cdbf72074..768819abc2e701d034695061f46f3a296294e8f5 100644 (file)
@@ -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));
index d62609d22e514392631a1db83fa3705ea5c7eaa1..a5dacdfc258bda49aeeee8371ba240b1cceb96eb 100644 (file)
@@ -62,7 +62,7 @@ public:
                wxRendererNative::Get().DrawCheckBox (
                        &grid,
                        dc, rect,
-                       grid.GetCellValue (row, col) == "1" ? static_cast<int>(wxCONTROL_CHECKED) : 0
+                       grid.GetCellValue (row, col) == wxT("1") ? static_cast<int>(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<AudioMapping::Channel>::iterator i = content_channels.begin(); i != content_channels.end(); ++i) {
                shared_ptr<const AudioContent> 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<libdcp::Channel> const d = map.content_to_dcp (*i);
                for (list<libdcp::Channel>::const_iterator j = d.begin(); j != d.end(); ++j) {
-                       _grid->SetCellValue (n, static_cast<int> (*j) + 1, "1");
+                       _grid->SetCellValue (n, static_cast<int> (*j) + 1, wxT("1"));
                }
                ++n;
        }
diff --git a/wscript b/wscript
index 3f3ae2019b9e0857879219ac4c37dfa7f4540e38..502f27fd1a41fb74a30637f1a3bfbe146e49eb0e 100644 (file)
--- 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