Fixes for wx 2.8.
authorCarl Hetherington <cth@carlh.net>
Wed, 27 Feb 2013 19:51:27 +0000 (19:51 +0000)
committerCarl Hetherington <cth@carlh.net>
Wed, 27 Feb 2013 19:51:27 +0000 (19:51 +0000)
src/wx/audio_dialog.cc
src/wx/audio_plot.cc
src/wx/film_editor.cc

index b7736f6647a5df222266c208888467f28b7e38f3..34dd268f2941bb1b0d82efad00d44c46e1dd6dc4 100644 (file)
@@ -40,7 +40,7 @@ AudioDialog::AudioDialog (wxWindow* parent)
        wxFlexGridSizer* table = new wxFlexGridSizer (2, 6, 6);
 
        for (int i = 0; i < MAX_AUDIO_CHANNELS; ++i) {
-               _channel_checkbox[i] = new wxCheckBox (this, wxID_ANY, audio_channel_name (i));
+               _channel_checkbox[i] = new wxCheckBox (this, wxID_ANY, std_to_wx (audio_channel_name (i)));
                table->Add (_channel_checkbox[i], 1, wxEXPAND);
                table->AddSpacer (0);
                _channel_checkbox[i]->Connect (wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler (AudioDialog::channel_clicked), 0, this);
@@ -88,7 +88,7 @@ AudioDialog::set_film (boost::shared_ptr<Film> f)
        _film_changed_connection = _film->Changed.connect (bind (&AudioDialog::film_changed, this, _1));
        _film_audio_analysis_finished_connection = _film->AudioAnalysisFinished.connect (bind (&AudioDialog::try_to_load_analysis, this));
 
-       SetTitle (String::compose ("DVD-o-matic audio - %1", _film->name()));
+       SetTitle (std_to_wx (String::compose ("DVD-o-matic audio - %1", _film->name())));
 }
 
 void
index 23cbabcdc0ee218e337fcb167cf5edf81ce6127b..9b2e6b1b0eef8cb218b370418619a64b44a8c800 100644 (file)
@@ -146,7 +146,11 @@ AudioPlot::paint (wxPaintEvent &)
                                plot_peak (p, c);
                        }
                        wxColour const col = _colours[c];
-                       gc->SetPen (*wxThePenList->FindOrCreatePen (wxColour (col.Red(), col.Green(), col.Blue(), col.Alpha() / 2)));
+#if wxMAJOR_VERSION == 2 && wxMINOR_VERSION >= 9
+                       gc->SetPen (*wxThePenList->FindOrCreatePen (wxColour (col.Red(), col.Green(), col.Blue(), col.Alpha() / 2), 1, wxPENSTYLE_SOLID));
+#else                  
+                       gc->SetPen (*wxThePenList->FindOrCreatePen (wxColour (col.Red(), col.Green(), col.Blue(), col.Alpha() / 2), 1, wxSOLID));
+#endif
                        gc->StrokePath (p);
                }
        }
@@ -158,7 +162,11 @@ AudioPlot::paint (wxPaintEvent &)
                                plot_rms (p, c);
                        }
                        wxColour const col = _colours[c];
-                       gc->SetPen (*wxThePenList->FindOrCreatePen (col));
+#if wxMAJOR_VERSION == 2 && wxMINOR_VERSION >= 9
+                       gc->SetPen (*wxThePenList->FindOrCreatePen (col, 1, wxPENSTYLE_SOLID));
+#else
+                       gc->SetPen (*wxThePenList->FindOrCreatePen (col, 1, wxSOLID));
+#endif                 
                        gc->StrokePath (p);
                }
        }
index c9f83677c6da5db1cf7ef2168890538d4d810e5b..499cb1a433e52e8b55d85dc319ff2aa23939e440 100644 (file)
@@ -348,7 +348,7 @@ FilmEditor::make_audio_panel ()
        grid->AddSpacer (0);
 
        for (int i = 0; i < MAX_AUDIO_CHANNELS; ++i) {
-               add_label_to_sizer (grid, _audio_panel, audio_channel_name (i));
+               add_label_to_sizer (grid, _audio_panel, std_to_wx (audio_channel_name (i)));
                _external_audio[i] = new wxFilePickerCtrl (_audio_panel, wxID_ANY, wxT (""), _("Select Audio File"), wxT ("*.wav"));
                grid->Add (_external_audio[i], 1, wxEXPAND);
        }