Another try at the wxString / std / i18n confusions.
authorCarl Hetherington <cth@carlh.net>
Wed, 27 Mar 2013 12:26:41 +0000 (12:26 +0000)
committerCarl Hetherington <cth@carlh.net>
Wed, 27 Mar 2013 12:26:41 +0000 (12:26 +0000)
src/wx/audio_dialog.cc
src/wx/film_editor.cc
src/wx/film_viewer.cc
src/wx/gain_calculator_dialog.cc
src/wx/job_wrapper.cc

index ba7ddd8f788dacaede8d5fca5a0ea6b57bc1d7ce..3e43d484fda83ed9943d075a42d92133f19550f3 100644 (file)
@@ -98,7 +98,7 @@ AudioDialog::set_film (boost::shared_ptr<Film> f)
        _film_changed_connection = _film->Changed.connect (bind (&AudioDialog::film_changed, this, _1));
        _film_audio_analysis_succeeded_connection = _film->AudioAnalysisSucceeded.connect (bind (&AudioDialog::try_to_load_analysis, this));
 
-       SetTitle (std_to_wx (String::compose (wx_to_std (_("DVD-o-matic audio - %1")), _film->name())));
+       SetTitle (wxString::Format (_("DVD-o-matic audio - %1"), std_to_wx(_film->name()).data()));
 }
 
 void
index 4ef30fd050fab0cb77ad1eed5e76c7f1e55cdc60..a94ed7b2d8e3bc056f90211a65b072d32c17384d 100644 (file)
@@ -501,7 +501,7 @@ FilmEditor::content_changed (wxCommandEvent &)
                _film->set_content (wx_to_std (_content->GetPath ()));
        } catch (std::exception& e) {
                _content->SetPath (std_to_wx (_film->directory ()));
-               error_dialog (this, std_to_wx (String::compose (wx_to_std (_("Could not set content: %1")), e.what ())));
+               error_dialog (this, wxString::Format (_("Could not set content: %1"), std_to_wx (e.what()).data()));
        }
 }
 
index a7f370f00188c8acc8a65dee722783ee8680c75e..08eade4d0f020d59916c6ec12b4a8d78b9f4a3a7 100644 (file)
@@ -105,7 +105,7 @@ FilmViewer::film_changed (Film::Property p)
                try {
                        _decoders = decoder_factory (_film, o);
                } catch (StringError& e) {
-                       error_dialog (this, std_to_wx (String::compose (wx_to_std (_("Could not open content file (%1)")), e.what())));
+                       error_dialog (this, wxString::Format (_("Could not open content file (%s)"), std_to_wx(e.what()).data()));
                        return;
                }
                
@@ -411,7 +411,7 @@ FilmViewer::get_frame ()
        } catch (DecodeError& e) {
                _play_button->SetValue (false);
                check_play_state ();
-               error_dialog (this, std_to_wx (String::compose (wx_to_std (_("Could not decode video for view (%1)")), e.what())));
+               error_dialog (this, wxString::Format (_("Could not decode video for view (%s)"), std_to_wx(e.what()).data()));
        }
 }
 
index 7f4b774c0eac82516a00d05d8d34215b9b42f9e2..22e6b447ab1bb96f69f0946986b0c0f4b3d8651f 100644 (file)
@@ -24,7 +24,7 @@
 using namespace boost;
 
 GainCalculatorDialog::GainCalculatorDialog (wxWindow* parent)
-       : wxDialog (parent, wxID_ANY, wxString (_("Gain Calculator")))
+       : wxDialog (parent, wxID_ANY, _("Gain Calculator"))
 {
        wxFlexGridSizer* table = new wxFlexGridSizer (2, 6, 6);
        table->AddGrowableCol (1, 1);
index f0b506ba5a2cc2db2bef294ba9ceb13a5e0aa0e2..d6ae828b480d5206c3908941b399ba2ddcd3572b 100644 (file)
@@ -35,8 +35,8 @@ JobWrapper::make_dcp (wxWindow* parent, shared_ptr<Film> film)
        try {
                film->make_dcp ();
        } catch (BadSettingError& e) {
-               error_dialog (parent, std_to_wx (String::compose (wx_to_std (_("Bad setting for %1 (%2)")), e.setting(), e.what())));
+               error_dialog (parent, wxString::Format (_("Bad setting for %1 (%2)"), std_to_wx(e.setting()).data(), std_to_wx(e.what()).data()));
        } catch (std::exception& e) {
-               error_dialog (parent, std_to_wx (String::compose (wx_to_std (_("Could not make DCP: %1")), e.what())));
+               error_dialog (parent, wxString::Format (_("Could not make DCP: %1"), std_to_wx(e.what()).data()));
        }
 }