{
stringstream s;
s << "Save changes to film \"" << film->name() << "\" before closing?";
- _dialog = new wxMessageDialog (0, std_to_wx (s.str()), wxT ("Film changed"), wxYES_NO | wxYES_DEFAULT | wxICON_QUESTION);
+ _dialog = new wxMessageDialog (0, std_to_wx (s.str()), _("Film changed"), wxYES_NO | wxYES_DEFAULT | wxICON_QUESTION);
}
~FilmChangedDialog ()
if (r == wxID_OK) {
if (boost::filesystem::exists (d->get_path())) {
- error_dialog (this, String::compose ("The directory %1 already exists.", d->get_path()));
+ error_dialog (this, wxString::Format (_("The directory %s already exists"), d->get_path().c_str()));
return;
}
void file_open (wxCommandEvent &)
{
- wxDirDialog* c = new wxDirDialog (this, wxT ("Select film to open"), wxStandardPaths::Get().GetDocumentsDir(), wxDEFAULT_DIALOG_STYLE | wxDD_DIR_MUST_EXIST);
+ wxDirDialog* c = new wxDirDialog (this, _("Select film to open"), wxStandardPaths::Get().GetDocumentsDir(), wxDEFAULT_DIALOG_STYLE | wxDD_DIR_MUST_EXIST);
int const r = c->ShowModal ();
if (r == wxID_OK) {
film->log()->set_level (log_level);
set_film ();
} catch (std::exception& e) {
- error_dialog (this, String::compose ("Could not open film at %1 (%2)", wx_to_std (c->GetPath()), e.what()));
+ wxString p = c->GetPath ();
+ wxCharBuffer b = p.ToUTF8 ();
+ error_dialog (this, wxString::Format (_("Could not open film at %s (%s)"), p.data(), e.what()));
}
}
wxFlexGridSizer* table = new wxFlexGridSizer (3, 6, 6);
table->AddGrowableCol (1, 1);
- add_label_to_sizer (table, this, "TMS IP address");
+ add_label_to_sizer (table, this, _("TMS IP address"));
_tms_ip = new wxTextCtrl (this, wxID_ANY);
table->Add (_tms_ip, 1, wxEXPAND);
table->AddSpacer (0);
- add_label_to_sizer (table, this, "TMS target path");
+ add_label_to_sizer (table, this, _("TMS target path"));
_tms_path = new wxTextCtrl (this, wxID_ANY);
table->Add (_tms_path, 1, wxEXPAND);
table->AddSpacer (0);
- add_label_to_sizer (table, this, "TMS user name");
+ add_label_to_sizer (table, this, _("TMS user name"));
_tms_user = new wxTextCtrl (this, wxID_ANY);
table->Add (_tms_user, 1, wxEXPAND);
table->AddSpacer (0);
- add_label_to_sizer (table, this, "TMS password");
+ add_label_to_sizer (table, this, _("TMS password"));
_tms_password = new wxTextCtrl (this, wxID_ANY);
table->Add (_tms_password, 1, wxEXPAND);
table->AddSpacer (0);
- add_label_to_sizer (table, this, "Threads to use for encoding on this host");
+ add_label_to_sizer (table, this, _("Threads to use for encoding on this host"));
_num_local_encoding_threads = new wxSpinCtrl (this);
table->Add (_num_local_encoding_threads, 1, wxEXPAND);
table->AddSpacer (0);
- add_label_to_sizer (table, this, "Default directory for new films");
+ add_label_to_sizer (table, this, _("Default directory for new films"));
#ifdef __WXMSW__
_default_directory = new DirPickerCtrl (this);
#else
table->Add (_default_directory, 1, wxEXPAND);
table->AddSpacer (0);
- add_label_to_sizer (table, this, "Default DCI name details");
+ add_label_to_sizer (table, this, _("Default DCI name details"));
_default_dci_metadata_button = new wxButton (this, wxID_ANY, _("Edit..."));
table->Add (_default_dci_metadata_button);
table->AddSpacer (1);
- add_label_to_sizer (table, this, "Reference scaler for A/B");
+ add_label_to_sizer (table, this, _("Reference scaler for A/B"));
_reference_scaler = new wxChoice (this, wxID_ANY);
vector<Scaler const *> const sc = Scaler::all ();
for (vector<Scaler const *>::const_iterator i = sc.begin(); i != sc.end(); ++i) {
table->AddSpacer (0);
{
- add_label_to_sizer (table, this, "Reference filters for A/B");
+ add_label_to_sizer (table, this, _("Reference filters for A/B"));
wxSizer* s = new wxBoxSizer (wxHORIZONTAL);
_reference_filters = new wxStaticText (this, wxID_ANY, wxT (""));
s->Add (_reference_filters, 1, wxEXPAND);
table->AddSpacer (0);
}
- add_label_to_sizer (table, this, "Encoding Servers");
+ add_label_to_sizer (table, this, _("Encoding Servers"));
_servers = new wxListCtrl (this, wxID_ANY, wxDefaultPosition, wxSize (220, 100), wxLC_REPORT | wxLC_SINGLE_SEL);
wxListItem ip;
ip.SetId (0);
wxFlexGridSizer* table = new wxFlexGridSizer (2, 6, 6);
table->AddGrowableCol (1, 1);
- add_label_to_sizer (table, this, "Audio Language (e.g. EN)");
+ add_label_to_sizer (table, this, _("Audio Language (e.g. EN)"));
_audio_language = new wxTextCtrl (this, wxID_ANY);
table->Add (_audio_language, 1, wxEXPAND);
- add_label_to_sizer (table, this, "Subtitle Language (e.g. FR)");
+ add_label_to_sizer (table, this, _("Subtitle Language (e.g. FR)"));
_subtitle_language = new wxTextCtrl (this, wxID_ANY);
table->Add (_subtitle_language, 1, wxEXPAND);
- add_label_to_sizer (table, this, "Territory (e.g. UK)");
+ add_label_to_sizer (table, this, _("Territory (e.g. UK)"));
_territory = new wxTextCtrl (this, wxID_ANY);
table->Add (_territory, 1, wxEXPAND);
- add_label_to_sizer (table, this, "Rating (e.g. 15)");
+ add_label_to_sizer (table, this, _("Rating (e.g. 15)"));
_rating = new wxTextCtrl (this, wxID_ANY);
table->Add (_rating, 1, wxEXPAND);
- add_label_to_sizer (table, this, "Studio (e.g. TCF)");
+ add_label_to_sizer (table, this, _("Studio (e.g. TCF)"));
_studio = new wxTextCtrl (this, wxID_ANY);
table->Add (_studio, 1, wxEXPAND);
- add_label_to_sizer (table, this, "Facility (e.g. DLA)");
+ add_label_to_sizer (table, this, _("Facility (e.g. DLA)"));
_facility = new wxTextCtrl (this, wxID_ANY);
table->Add (_facility, 1, wxEXPAND);
- add_label_to_sizer (table, this, "Package Type (e.g. OV)");
+ add_label_to_sizer (table, this, _("Package Type (e.g. OV)"));
_package_type = new wxTextCtrl (this, wxID_ANY);
table->Add (_package_type, 1, wxEXPAND);
pad->Add (_film_sizer, 0, wxALL, 8);
_film_panel->SetSizer (pad);
- add_label_to_sizer (_film_sizer, _film_panel, "Name");
+ add_label_to_sizer (_film_sizer, _film_panel, _("Name"));
_name = new wxTextCtrl (_film_panel, wxID_ANY);
_film_sizer->Add (_name, 1, wxEXPAND);
- add_label_to_sizer (_film_sizer, _film_panel, "DCP Name");
+ add_label_to_sizer (_film_sizer, _film_panel, _("DCP Name"));
_dcp_name = new wxStaticText (_film_panel, wxID_ANY, wxT (""));
_film_sizer->Add (_dcp_name, 0, wxALIGN_CENTER_VERTICAL | wxSHRINK);
- _use_dci_name = new wxCheckBox (_film_panel, wxID_ANY, wxT ("Use DCI name"));
+ _use_dci_name = new wxCheckBox (_film_panel, wxID_ANY, _("Use DCI name"));
_film_sizer->Add (_use_dci_name, 1, wxEXPAND);
- _edit_dci_button = new wxButton (_film_panel, wxID_ANY, wxT ("Details..."));
+ _edit_dci_button = new wxButton (_film_panel, wxID_ANY, _("Details..."));
_film_sizer->Add (_edit_dci_button, 0);
- add_label_to_sizer (_film_sizer, _film_panel, "Content");
- _content = new wxFilePickerCtrl (_film_panel, wxID_ANY, wxT (""), wxT ("Select Content File"), wxT("*.*"));
+ add_label_to_sizer (_film_sizer, _film_panel, _("Content"));
+ _content = new wxFilePickerCtrl (_film_panel, wxID_ANY, wxT (""), _("Select Content File"), wxT("*.*"));
_film_sizer->Add (_content, 1, wxEXPAND);
- _trust_content_header = new wxCheckBox (_film_panel, wxID_ANY, wxT ("Trust content's header"));
+ _trust_content_header = new wxCheckBox (_film_panel, wxID_ANY, _("Trust content's header"));
video_control (_trust_content_header);
_film_sizer->Add (_trust_content_header, 1);
_film_sizer->AddSpacer (0);
- add_label_to_sizer (_film_sizer, _film_panel, "Content Type");
+ add_label_to_sizer (_film_sizer, _film_panel, _("Content Type"));
_dcp_content_type = new wxChoice (_film_panel, wxID_ANY);
_film_sizer->Add (_dcp_content_type);
- video_control (add_label_to_sizer (_film_sizer, _film_panel, "Frames Per Second"));
+ video_control (add_label_to_sizer (_film_sizer, _film_panel, _("Frames Per Second")));
_frames_per_second = new wxStaticText (_film_panel, wxID_ANY, wxT (""));
_film_sizer->Add (video_control (_frames_per_second), 1, wxALIGN_CENTER_VERTICAL);
- video_control (add_label_to_sizer (_film_sizer, _film_panel, "Original Size"));
+ video_control (add_label_to_sizer (_film_sizer, _film_panel, _("Original Size")));
_original_size = new wxStaticText (_film_panel, wxID_ANY, wxT (""));
_film_sizer->Add (video_control (_original_size), 1, wxALIGN_CENTER_VERTICAL);
- video_control (add_label_to_sizer (_film_sizer, _film_panel, "Length"));
+ video_control (add_label_to_sizer (_film_sizer, _film_panel, _("Length")));
_length = new wxStaticText (_film_panel, wxID_ANY, wxT (""));
_film_sizer->Add (video_control (_length), 1, wxALIGN_CENTER_VERTICAL);
{
- video_control (add_label_to_sizer (_film_sizer, _film_panel, "Trim frames"));
+ video_control (add_label_to_sizer (_film_sizer, _film_panel, _("Trim frames")));
wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
- video_control (add_label_to_sizer (s, _film_panel, "Start"));
+ video_control (add_label_to_sizer (s, _film_panel, _("Start")));
_trim_start = new wxSpinCtrl (_film_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1));
s->Add (video_control (_trim_start));
- video_control (add_label_to_sizer (s, _film_panel, "End"));
+ video_control (add_label_to_sizer (s, _film_panel, _("End")));
_trim_end = new wxSpinCtrl (_film_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1));
s->Add (video_control (_trim_end));
_film_sizer->Add (s);
}
- _dcp_ab = new wxCheckBox (_film_panel, wxID_ANY, wxT ("A/B"));
+ _dcp_ab = new wxCheckBox (_film_panel, wxID_ANY, _("A/B"));
video_control (_dcp_ab);
_film_sizer->Add (_dcp_ab, 1);
_film_sizer->AddSpacer (0);
/* STILL-only stuff */
{
- still_control (add_label_to_sizer (_film_sizer, _film_panel, "Duration"));
+ still_control (add_label_to_sizer (_film_sizer, _film_panel, _("Duration")));
wxSizer* s = new wxBoxSizer (wxHORIZONTAL);
_still_duration = new wxSpinCtrl (_film_panel);
still_control (_still_duration);
s->Add (_still_duration, 1, wxEXPAND);
- still_control (add_label_to_sizer (s, _film_panel, "s"));
+ /* TRANSLATORS: `s' here is an abbreviation for seconds, the unit of time */
+ still_control (add_label_to_sizer (s, _film_panel, _("s")));
_film_sizer->Add (s);
}
pad->Add (_video_sizer, 0, wxALL, 8);
_video_panel->SetSizer (pad);
- add_label_to_sizer (_video_sizer, _video_panel, "Format");
+ add_label_to_sizer (_video_sizer, _video_panel, _("Format"));
_format = new wxChoice (_video_panel, wxID_ANY);
_video_sizer->Add (_format);
{
- add_label_to_sizer (_video_sizer, _video_panel, "Crop");
+ add_label_to_sizer (_video_sizer, _video_panel, _("Crop"));
wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
- add_label_to_sizer (s, _video_panel, "L");
+ /* TRANSLATORS: L, R, T and B are abbreviations for Left, Right, Top, Bottom, the four edges
+ of the picture frame.
+ */
+ add_label_to_sizer (s, _video_panel, _("L"));
_left_crop = new wxSpinCtrl (_video_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1));
s->Add (_left_crop, 0);
- add_label_to_sizer (s, _video_panel, "R");
+ add_label_to_sizer (s, _video_panel, _("R"));
_right_crop = new wxSpinCtrl (_video_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1));
s->Add (_right_crop, 0);
- add_label_to_sizer (s, _video_panel, "T");
+ add_label_to_sizer (s, _video_panel, _("T"));
_top_crop = new wxSpinCtrl (_video_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1));
s->Add (_top_crop, 0);
- add_label_to_sizer (s, _video_panel, "B");
+ add_label_to_sizer (s, _video_panel, _("B"));
_bottom_crop = new wxSpinCtrl (_video_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1));
s->Add (_bottom_crop, 0);
/* VIDEO-only stuff */
{
- video_control (add_label_to_sizer (_video_sizer, _video_panel, "Filters"));
+ video_control (add_label_to_sizer (_video_sizer, _video_panel, _("Filters")));
wxSizer* s = new wxBoxSizer (wxHORIZONTAL);
- _filters = new wxStaticText (_video_panel, wxID_ANY, wxT ("None"));
+ _filters = new wxStaticText (_video_panel, wxID_ANY, _("None"));
video_control (_filters);
s->Add (_filters, 1, wxEXPAND | wxALIGN_CENTER_VERTICAL | wxTOP | wxBOTTOM | wxRIGHT, 6);
- _filters_button = new wxButton (_video_panel, wxID_ANY, wxT ("Edit..."));
+ _filters_button = new wxButton (_video_panel, wxID_ANY, _("Edit..."));
video_control (_filters_button);
s->Add (_filters_button, 0);
_video_sizer->Add (s, 1);
}
- video_control (add_label_to_sizer (_video_sizer, _video_panel, "Scaler"));
+ video_control (add_label_to_sizer (_video_sizer, _video_panel, _("Scaler")));
_scaler = new wxChoice (_video_panel, wxID_ANY);
_video_sizer->Add (video_control (_scaler), 1);
_scaler->Append (std_to_wx ((*i)->name()));
}
- add_label_to_sizer (_video_sizer, _video_panel, "Colour look-up table");
+ add_label_to_sizer (_video_sizer, _video_panel, _("Colour look-up table"));
_colour_lut = new wxChoice (_video_panel, wxID_ANY);
for (int i = 0; i < 2; ++i) {
_colour_lut->Append (std_to_wx (colour_lut_index_to_name (i)));
_video_sizer->Add (_colour_lut, 1, wxEXPAND);
{
- add_label_to_sizer (_video_sizer, _video_panel, "JPEG2000 bandwidth");
+ add_label_to_sizer (_video_sizer, _video_panel, _("JPEG2000 bandwidth"));
wxSizer* s = new wxBoxSizer (wxHORIZONTAL);
_j2k_bandwidth = new wxSpinCtrl (_video_panel, wxID_ANY);
s->Add (_j2k_bandwidth, 1);
- add_label_to_sizer (s, _video_panel, "MBps");
+ add_label_to_sizer (s, _video_panel, _("MBps"));
_video_sizer->Add (s, 1);
}
_audio_panel->SetSizer (pad);
{
- video_control (add_label_to_sizer (_audio_sizer, _audio_panel, "Audio Gain"));
+ video_control (add_label_to_sizer (_audio_sizer, _audio_panel, _("Audio Gain")));
wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
_audio_gain = new wxSpinCtrl (_audio_panel);
s->Add (video_control (_audio_gain), 1);
- video_control (add_label_to_sizer (s, _audio_panel, "dB"));
+ video_control (add_label_to_sizer (s, _audio_panel, _("dB")));
_audio_gain_calculate_button = new wxButton (_audio_panel, wxID_ANY, _("Calculate..."));
video_control (_audio_gain_calculate_button);
s->Add (_audio_gain_calculate_button, 1, wxEXPAND);
}
{
- video_control (add_label_to_sizer (_audio_sizer, _audio_panel, "Audio Delay"));
+ video_control (add_label_to_sizer (_audio_sizer, _audio_panel, _("Audio Delay")));
wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
_audio_delay = new wxSpinCtrl (_audio_panel);
s->Add (video_control (_audio_delay), 1);
- video_control (add_label_to_sizer (s, _audio_panel, "ms"));
+ /* TRANSLATORS: this is an abbreviation for milliseconds, the unit of time */
+ video_control (add_label_to_sizer (s, _audio_panel, _("ms")));
_audio_sizer->Add (s);
}
assert (MAX_AUDIO_CHANNELS == 6);
- char const * channels[] = {
- "Left",
- "Right",
- "Centre",
- "Lfe (sub)",
- "Left surround",
- "Right surround"
+ /* TRANSLATORS: these are the names of audio channels; Lfe (sub) is the low-frequency
+ enhancement channel (sub-woofer)./
+ */
+ wxString const channels[] = {
+ _("Left"),
+ _("Right"),
+ _("Centre"),
+ _("Lfe (sub)"),
+ _("Left surround"),
+ _("Right surround"),
};
for (int i = 0; i < MAX_AUDIO_CHANNELS; ++i) {
add_label_to_sizer (_audio_sizer, _audio_panel, channels[i]);
- _external_audio[i] = new wxFilePickerCtrl (_audio_panel, wxID_ANY, wxT (""), wxT ("Select Audio File"), wxT ("*.wav"));
+ _external_audio[i] = new wxFilePickerCtrl (_audio_panel, wxID_ANY, wxT (""), _("Select Audio File"), wxT ("*.wav"));
_audio_sizer->Add (_external_audio[i], 1, wxEXPAND);
}
pad->Add (_subtitle_sizer, 0, wxALL, 8);
_subtitle_panel->SetSizer (pad);
- _with_subtitles = new wxCheckBox (_subtitle_panel, wxID_ANY, wxT("With Subtitles"));
+ _with_subtitles = new wxCheckBox (_subtitle_panel, wxID_ANY, _("With Subtitles"));
video_control (_with_subtitles);
_subtitle_sizer->Add (_with_subtitles, 1);
_subtitle_stream = new wxChoice (_subtitle_panel, wxID_ANY);
_subtitle_sizer->Add (video_control (_subtitle_stream));
- video_control (add_label_to_sizer (_subtitle_sizer, _subtitle_panel, "Subtitle Offset"));
+ video_control (add_label_to_sizer (_subtitle_sizer, _subtitle_panel, _("Subtitle Offset")));
_subtitle_offset = new wxSpinCtrl (_subtitle_panel);
_subtitle_sizer->Add (video_control (_subtitle_offset), 1);
{
- video_control (add_label_to_sizer (_subtitle_sizer, _subtitle_panel, "Subtitle Scale"));
+ video_control (add_label_to_sizer (_subtitle_sizer, _subtitle_panel, _("Subtitle Scale")));
wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
_subtitle_scale = new wxSpinCtrl (_subtitle_panel);
s->Add (video_control (_subtitle_scale));
- video_control (add_label_to_sizer (s, _subtitle_panel, "%"));
+ video_control (add_label_to_sizer (s, _subtitle_panel, _("%")));
_subtitle_sizer->Add (s);
}
_film->set_content (wx_to_std (_content->GetPath ()));
} catch (std::exception& e) {
_content->SetPath (std_to_wx (_film->directory ()));
- error_dialog (this, String::compose ("Could not set content: %1", e.what ()));
+ error_dialog (this, wxString::Format (_("Could not set content: %s"), e.what ()));
}
}
} catch (DecodeError& e) {
_play_button->SetValue (false);
check_play_state ();
- error_dialog (this, String::compose ("Could not decode video for view (%1)", e.what()));
+ error_dialog (this, wxString::Format (_("Could not decode video for view (%s)"), e.what()));
}
}
wxFlexGridSizer* table = new wxFlexGridSizer (2, 6, 6);
table->AddGrowableCol (1, 1);
- add_label_to_sizer (table, this, "I want to play this back at fader");
+ add_label_to_sizer (table, this, _("I want to play this back at fader"));
_wanted = new wxTextCtrl (this, wxID_ANY, wxT (""), wxDefaultPosition, wxDefaultSize, 0, wxTextValidator (wxFILTER_NUMERIC));
table->Add (_wanted, 1, wxEXPAND);
- add_label_to_sizer (table, this, "But I have to use fader");
+ add_label_to_sizer (table, this, _("But I have to use fader"));
_actual = new wxTextCtrl (this, wxID_ANY, wxT (""), wxDefaultPosition, wxDefaultSize, 0, wxTextValidator (wxFILTER_NUMERIC));
table->Add (_actual, 1, wxEXPAND);
_job_records[*i].message->SetLabel (std_to_wx (st));
_job_records[*i].gauge->SetValue (p * 100);
} else {
- _job_records[*i].message->SetLabel (wxT ("Running"));
+ _job_records[*i].message->SetLabel (_("Running"));
_job_records[*i].gauge->Pulse ();
}
}
try {
film->make_dcp (transcode);
} catch (BadSettingError& e) {
- error_dialog (parent, String::compose ("Bad setting for %1 (%2)", e.setting(), e.what ()));
+ error_dialog (parent, wxString::Format (_("Bad setting for %s (%s)"), e.setting().c_str(), e.what()));
} catch (std::exception& e) {
- error_dialog (parent, String::compose ("Could not make DCP: %1", e.what ()));
+ error_dialog (parent, wxString::Format (_("Could not make DCP: %s"), e.what ()));
}
}
using namespace boost;
NewFilmDialog::NewFilmDialog (wxWindow* parent)
- : wxDialog (parent, wxID_ANY, wxString (_("New Film")))
+ : wxDialog (parent, wxID_ANY, _("New Film"))
{
wxBoxSizer* overall_sizer = new wxBoxSizer (wxVERTICAL);
SetSizer (overall_sizer);
table->AddGrowableCol (1, 1);
overall_sizer->Add (table, 1, wxEXPAND | wxALL, 6);
- add_label_to_sizer (table, this, "Film name");
+ add_label_to_sizer (table, this, _("Film name"));
_name = new wxTextCtrl (this, wxID_ANY);
table->Add (_name, 1, wxEXPAND);
- add_label_to_sizer (table, this, "Create in folder");
+ add_label_to_sizer (table, this, _("Create in folder"));
#ifdef __WXMSW__
_folder = new DirPickerCtrl (this);
#else
{
wxFlexGridSizer* table = new wxFlexGridSizer (2, 3, 6);
- add_label_to_sizer (table, this, "Frames");
- _frames = new wxStaticText (this, wxID_ANY, std_to_wx (""));
+ add_label_to_sizer (table, this, _("Frames"));
+ _frames = new wxStaticText (this, wxID_ANY, wxT (""));
table->Add (_frames, 1, wxALIGN_CENTER_VERTICAL);
- add_label_to_sizer (table, this, "Disk space required for frames");
- _disk_for_frames = new wxStaticText (this, wxID_ANY, std_to_wx (""));
+ add_label_to_sizer (table, this, _("Disk space required for frames"));
+ _disk_for_frames = new wxStaticText (this, wxID_ANY, wxT (""));
table->Add (_disk_for_frames, 1, wxALIGN_CENTER_VERTICAL);
- add_label_to_sizer (table, this, "Total disk space required");
- _total_disk = new wxStaticText (this, wxID_ANY, std_to_wx (""));
+ add_label_to_sizer (table, this, _("Total disk space required"));
+ _total_disk = new wxStaticText (this, wxID_ANY, wxT (""));
table->Add (_total_disk, 1, wxALIGN_CENTER_VERTICAL);
- add_label_to_sizer (table, this, "Frames already encoded");
- _encoded = new ThreadedStaticText (this, "counting...", boost::bind (&PropertiesDialog::frames_already_encoded, this));
+ add_label_to_sizer (table, this, _("Frames already encoded"));
+ _encoded = new ThreadedStaticText (this, _("counting..."), boost::bind (&PropertiesDialog::frames_already_encoded, this));
table->Add (_encoded, 1, wxALIGN_CENTER_VERTICAL);
if (_film->length()) {
#include "wx_util.h"
ServerDialog::ServerDialog (wxWindow* parent, ServerDescription* server)
- : wxDialog (parent, wxID_ANY, wxString (_("Server")))
+ : wxDialog (parent, wxID_ANY, _("Server"))
{
if (server) {
_server = server;
wxFlexGridSizer* table = new wxFlexGridSizer (2, 4, 4);
table->AddGrowableCol (1, 1);
- add_label_to_sizer (table, this, "Host name or IP address");
+ add_label_to_sizer (table, this, _("Host name or IP address"));
_host = new wxTextCtrl (this, wxID_ANY);
table->Add (_host, 1, wxEXPAND);
- add_label_to_sizer (table, this, "Threads to use");
+ add_label_to_sizer (table, this, _("Threads to use"));
_threads = new wxSpinCtrl (this, wxID_ANY);
table->Add (_threads, 1, wxEXPAND);
* @param prop Proportion to pass when calling Add() on the wxSizer.
*/
wxStaticText *
-add_label_to_sizer (wxSizer* s, wxWindow* p, string t, int prop)
+add_label_to_sizer (wxSizer* s, wxWindow* p, wxString t, int prop)
{
- wxStaticText* m = new wxStaticText (p, wxID_ANY, std_to_wx (t));
+ wxStaticText* m = new wxStaticText (p, wxID_ANY, t);
s->Add (m, prop, wxALIGN_CENTER_VERTICAL | wxALL, 6);
return m;
}
* @param m Message.
*/
void
-error_dialog (wxWindow* parent, string m)
+error_dialog (wxWindow* parent, wxString m)
{
- wxMessageDialog* d = new wxMessageDialog (parent, std_to_wx (m), wxT ("DVD-o-matic"), wxOK);
+ wxMessageDialog* d = new wxMessageDialog (parent, m, _("DVD-o-matic"), wxOK);
d->ShowModal ();
d->Destroy ();
}
* @param initial Initial text for the wxStaticText while the computation is being run.
* @param fn Function which works out what the wxStaticText content should be and returns it.
*/
-ThreadedStaticText::ThreadedStaticText (wxWindow* parent, string initial, function<string ()> fn)
- : wxStaticText (parent, wxID_ANY, std_to_wx (initial))
+ThreadedStaticText::ThreadedStaticText (wxWindow* parent, wxString initial, function<string ()> fn)
+ : wxStaticText (parent, wxID_ANY, initial)
{
Connect (_update_event_id, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler (ThreadedStaticText::thread_finished), 0, this);
_thread = new thread (bind (&ThreadedStaticText::run, this, fn));
* @brief Some utility functions and classes.
*/
-extern void error_dialog (wxWindow *, std::string);
-extern wxStaticText* add_label_to_sizer (wxSizer *, wxWindow *, std::string, int prop = 0);
+extern void error_dialog (wxWindow *, wxString);
+extern wxStaticText* add_label_to_sizer (wxSizer *, wxWindow *, wxString, int prop = 0);
extern std::string wx_to_std (wxString);
extern wxString std_to_wx (std::string);
class ThreadedStaticText : public wxStaticText
{
public:
- ThreadedStaticText (wxWindow* parent, std::string initial, boost::function<std::string ()> fn);
+ ThreadedStaticText (wxWindow* parent, wxString initial, boost::function<std::string ()> fn);
~ThreadedStaticText ();
private:
conf.check_cfg(package = 'sndfile', args = '--cflags --libs', uselib_store = 'SNDFILE', mandatory = True)
conf.check_cfg(package = 'glib-2.0', args = '--cflags --libs', uselib_store = 'GLIB', mandatory = True)
- conf.check_cfg(package = 'liblzma', args = '--cflags --libs', uselib_store = 'LZMA', mandatory = True)
+ if conf.options.target_windows is False:
+ conf.check_cfg(package = 'liblzma', args = '--cflags --libs', uselib_store = 'LZMA', mandatory = True)
conf.check_cfg(package = '', path = 'Magick++-config', args = '--cppflags --cxxflags --libs', uselib_store = 'MAGICK', mandatory = True)
if conf.options.static: