summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cscript2
-rw-r--r--src/lib/util.cc2
-rw-r--r--src/wx/controls.cc2
-rw-r--r--src/wx/standard_controls.cc1
-rw-r--r--src/wx/wx_util.cc212
-rw-r--r--src/wx/wx_util.h76
6 files changed, 148 insertions, 147 deletions
diff --git a/cscript b/cscript
index 22bcb4d5d..193db2213 100644
--- a/cscript
+++ b/cscript
@@ -506,7 +506,7 @@ def build_with_cpp17(target):
def dependencies(target, options):
- deps = [('libdcp', '61c6b8a23ef6381c2d1b1aaa5bfc1e31e35a7ec0', {'c++17': build_with_cpp17(target)})]
+ deps = [('libdcp', 'b47f0559041040495a08eb0b5cc2d62068d83952', {'c++17': build_with_cpp17(target)})]
deps.append(('libsub', 'v1.6.59'))
deps.append(('leqm-nrt', 'd75d0af984d9c14bfefca8f1bdbc215c3bf3a388'))
if target.platform != 'linux' or target.distro != 'arch':
diff --git a/src/lib/util.cc b/src/lib/util.cc
index 1f5bec22c..60b93a0c4 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -171,7 +171,7 @@ time_to_hmsf(DCPTime time, Frame rate)
m -= h * 60;
char buffer[64];
- snprintf(buffer, sizeof(buffer), "%02d:%02d:%02d.%02d", h, m, s, static_cast<int>(f));
+ snprintf(buffer, sizeof(buffer), "%02d:%02d:%02d:%02d", h, m, s, static_cast<int>(f));
return buffer;
}
diff --git a/src/wx/controls.cc b/src/wx/controls.cc
index fce3fd7eb..708cc9a5d 100644
--- a/src/wx/controls.cc
+++ b/src/wx/controls.cc
@@ -279,7 +279,7 @@ Controls::update_position_label()
{
if (!_film) {
checked_set(_frame_number, char_to_wx("0"));
- checked_set(_timecode, char_to_wx("0:0:0.0"));
+ checked_set(_timecode, char_to_wx("0:0:0:0"));
return;
}
diff --git a/src/wx/standard_controls.cc b/src/wx/standard_controls.cc
index 942c49fc4..d9b8c998b 100644
--- a/src/wx/standard_controls.cc
+++ b/src/wx/standard_controls.cc
@@ -38,6 +38,7 @@ StandardControls::StandardControls(wxWindow* parent, FilmViewer& viewer, bool ed
{
_button_sizer->Add (_play_button, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2);
_play_button->Bind (wxEVT_TOGGLEBUTTON, boost::bind(&StandardControls::play_clicked, this));
+ setup_sensitivity();
}
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc
index 8d21a3e63..8e86a5408 100644
--- a/src/wx/wx_util.cc
+++ b/src/wx/wx_util.cc
@@ -65,9 +65,9 @@ using namespace dcpomatic;
wxStaticText *
#ifdef __WXOSX__
-create_label (wxWindow* p, wxString t, bool left)
+create_label(wxWindow* p, wxString t, bool left)
#else
-create_label (wxWindow* p, wxString t, bool)
+create_label(wxWindow* p, wxString t, bool)
#endif
{
#ifdef __WXOSX__
@@ -75,14 +75,14 @@ create_label (wxWindow* p, wxString t, bool)
t += char_to_wx(":");
}
#endif
- return new StaticText (p, t);
+ return new StaticText(p, t);
}
#ifdef __WXOSX__
static
void
-setup_osx_flags (wxSizer* s, bool left, int& flags)
+setup_osx_flags(wxSizer* s, bool left, int& flags)
{
if (left) {
auto box = dynamic_cast<wxBoxSizer*>(s);
@@ -103,28 +103,28 @@ setup_osx_flags (wxSizer* s, bool left, int& flags)
* @param prop Proportion to pass when calling Add() on the wxSizer.
*/
wxStaticText *
-add_label_to_sizer (wxSizer* s, wxWindow* p, wxString t, bool left, int prop, int flags)
+add_label_to_sizer(wxSizer* s, wxWindow* p, wxString t, bool left, int prop, int flags)
{
#ifdef __WXOSX__
- setup_osx_flags (s, left, flags);
+ setup_osx_flags(s, left, flags);
#endif
- auto m = create_label (p, t, left);
- s->Add (m, prop, flags, DCPOMATIC_SIZER_GAP);
+ auto m = create_label(p, t, left);
+ s->Add(m, prop, flags, DCPOMATIC_SIZER_GAP);
return m;
}
wxStaticText *
#ifdef __WXOSX__
-add_label_to_sizer (wxSizer* s, wxStaticText* t, bool left, int prop, int flags)
+add_label_to_sizer(wxSizer* s, wxStaticText* t, bool left, int prop, int flags)
#else
-add_label_to_sizer (wxSizer* s, wxStaticText* t, bool, int prop, int flags)
+add_label_to_sizer(wxSizer* s, wxStaticText* t, bool, int prop, int flags)
#endif
{
#ifdef __WXOSX__
- setup_osx_flags (s, left, flags);
+ setup_osx_flags(s, left, flags);
#endif
- s->Add (t, prop, flags, DCPOMATIC_SIZER_GAP);
+ s->Add(t, prop, flags, DCPOMATIC_SIZER_GAP);
return t;
}
@@ -134,9 +134,9 @@ add_label_to_sizer(wxGridBagSizer* s, wxWindow* p, wxString t, bool left, wxGBPo
{
int flags = wxALIGN_CENTER_VERTICAL | wxLEFT;
#ifdef __WXOSX__
- setup_osx_flags (s, left, flags);
+ setup_osx_flags(s, left, flags);
#endif
- auto m = create_label (p, t, left);
+ auto m = create_label(p, t, left);
s->Add(m, pos, span, flags, indent ? DCPOMATIC_SIZER_X_GAP : 0);
return m;
}
@@ -144,16 +144,16 @@ add_label_to_sizer(wxGridBagSizer* s, wxWindow* p, wxString t, bool left, wxGBPo
wxStaticText *
#ifdef __WXOSX__
-add_label_to_sizer (wxGridBagSizer* s, wxStaticText* t, bool left, wxGBPosition pos, wxGBSpan span)
+add_label_to_sizer(wxGridBagSizer* s, wxStaticText* t, bool left, wxGBPosition pos, wxGBSpan span)
#else
-add_label_to_sizer (wxGridBagSizer* s, wxStaticText* t, bool, wxGBPosition pos, wxGBSpan span)
+add_label_to_sizer(wxGridBagSizer* s, wxStaticText* t, bool, wxGBPosition pos, wxGBSpan span)
#endif
{
int flags = wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT;
#ifdef __WXOSX__
- setup_osx_flags (s, left, flags);
+ setup_osx_flags(s, left, flags);
#endif
- s->Add (t, pos, span, flags);
+ s->Add(t, pos, span, flags);
return t;
}
@@ -164,12 +164,12 @@ add_label_to_sizer (wxGridBagSizer* s, wxStaticText* t, bool, wxGBPosition pos,
* @param e Extended message.
*/
void
-error_dialog (wxWindow* parent, wxString m, optional<wxString> e)
+error_dialog(wxWindow* parent, wxString m, optional<wxString> e)
{
wxMessageDialog dialog(parent, m, variant::wx::dcpomatic(), wxOK | wxICON_ERROR);
if (e) {
wxString em = *e;
- em[0] = wxToupper (em[0]);
+ em[0] = wxToupper(em[0]);
dialog.SetExtendedMessage(em);
}
dialog.ShowModal();
@@ -181,7 +181,7 @@ error_dialog (wxWindow* parent, wxString m, optional<wxString> e)
* @param m Message.
*/
void
-message_dialog (wxWindow* parent, wxString m)
+message_dialog(wxWindow* parent, wxString m)
{
wxMessageDialog dialog(parent, m, variant::wx::dcpomatic(), wxOK | wxICON_INFORMATION);
dialog.ShowModal();
@@ -190,7 +190,7 @@ message_dialog (wxWindow* parent, wxString m)
/** @return true if the user answered "yes" */
bool
-confirm_dialog (wxWindow* parent, wxString m)
+confirm_dialog(wxWindow* parent, wxString m)
{
wxMessageDialog dialog(parent, m, variant::wx::dcpomatic(), wxYES_NO | wxICON_QUESTION);
return dialog.ShowModal() == wxID_YES;
@@ -201,9 +201,9 @@ confirm_dialog (wxWindow* parent, wxString m)
* @return Corresponding STL string.
*/
string
-wx_to_std (wxString s)
+wx_to_std(wxString s)
{
- return string (s.ToUTF8());
+ return string(s.ToUTF8());
}
@@ -211,9 +211,9 @@ wx_to_std (wxString s)
* @return Corresponding wxWidgets string.
*/
wxString
-std_to_wx (string s)
+std_to_wx(string s)
{
- return wxString (s.c_str(), wxConvUTF8);
+ return wxString(s.c_str(), wxConvUTF8);
}
@@ -225,14 +225,14 @@ char_to_wx(char const* s)
string
-string_client_data (wxClientData* o)
+string_client_data(wxClientData* o)
{
- return wx_to_std (dynamic_cast<wxStringClientData*>(o)->GetData());
+ return wx_to_std(dynamic_cast<wxStringClientData*>(o)->GetData());
}
void
-checked_set (FilePickerCtrl* widget, boost::filesystem::path value)
+checked_set(FilePickerCtrl* widget, boost::filesystem::path value)
{
if (widget->path() != value) {
if (value.empty()) {
@@ -247,60 +247,60 @@ checked_set (FilePickerCtrl* widget, boost::filesystem::path value)
void
-checked_set (wxDirPickerCtrl* widget, boost::filesystem::path value)
+checked_set(wxDirPickerCtrl* widget, boost::filesystem::path value)
{
- if (widget->GetPath() != std_to_wx (value.string())) {
+ if (widget->GetPath() != std_to_wx(value.string())) {
if (value.empty()) {
/* Hack to make wxWidgets clear the control when we are passed
an empty value.
*/
value = " ";
}
- widget->SetPath (std_to_wx (value.string()));
+ widget->SetPath(std_to_wx(value.string()));
}
}
void
-checked_set (wxSpinCtrl* widget, int value)
+checked_set(wxSpinCtrl* widget, int value)
{
if (widget->GetValue() != value) {
- widget->SetValue (value);
+ widget->SetValue(value);
}
}
void
-checked_set (wxSpinCtrlDouble* widget, double value)
+checked_set(wxSpinCtrlDouble* widget, double value)
{
/* XXX: completely arbitrary epsilon */
- if (fabs (widget->GetValue() - value) > 1e-16) {
- widget->SetValue (value);
+ if (fabs(widget->GetValue() - value) > 1e-16) {
+ widget->SetValue(value);
}
}
void
-checked_set (wxChoice* widget, int value)
+checked_set(wxChoice* widget, int value)
{
if (widget->GetSelection() != value) {
- widget->SetSelection (value);
+ widget->SetSelection(value);
}
}
void
-checked_set (wxChoice* widget, string value)
+checked_set(wxChoice* widget, string value)
{
wxClientData* o = nullptr;
if (widget->GetSelection() != -1) {
- o = widget->GetClientObject (widget->GetSelection ());
+ o = widget->GetClientObject(widget->GetSelection());
}
if (!o || string_client_data(o) != value) {
for (unsigned int i = 0; i < widget->GetCount(); ++i) {
- if (string_client_data (widget->GetClientObject (i)) == value) {
- widget->SetSelection (i);
+ if (string_client_data(widget->GetClientObject(i)) == value) {
+ widget->SetSelection(i);
}
}
}
@@ -308,11 +308,11 @@ checked_set (wxChoice* widget, string value)
void
-checked_set (wxChoice* widget, vector<pair<string, string>> items)
+checked_set(wxChoice* widget, vector<pair<string, string>> items)
{
vector<pair<string, string>> current;
for (unsigned int i = 0; i < widget->GetCount(); ++i) {
- current.push_back (
+ current.push_back(
make_pair(
wx_to_std(widget->GetString(i)),
widget->GetClientData() ? string_client_data(widget->GetClientObject(i)) : ""
@@ -324,24 +324,24 @@ checked_set (wxChoice* widget, vector<pair<string, string>> items)
return;
}
- widget->Clear ();
+ widget->Clear();
for (auto i: items) {
- widget->Append (std_to_wx(i.first), new wxStringClientData(std_to_wx(i.second)));
+ widget->Append(std_to_wx(i.first), new wxStringClientData(std_to_wx(i.second)));
}
}
void
-checked_set (wxTextCtrl* widget, string value)
+checked_set(wxTextCtrl* widget, string value)
{
- if (widget->GetValue() != std_to_wx (value)) {
- widget->ChangeValue (std_to_wx (value));
+ if (widget->GetValue() != std_to_wx(value)) {
+ widget->ChangeValue(std_to_wx(value));
}
}
void
-checked_set (PasswordEntry* entry, string value)
+checked_set(PasswordEntry* entry, string value)
{
if (entry->get() != value) {
entry->set(value);
@@ -350,46 +350,46 @@ checked_set (PasswordEntry* entry, string value)
void
-checked_set (wxTextCtrl* widget, wxString value)
+checked_set(wxTextCtrl* widget, wxString value)
{
if (widget->GetValue() != value) {
- widget->ChangeValue (value);
+ widget->ChangeValue(value);
}
}
void
-checked_set (wxStaticText* widget, string value)
+checked_set(wxStaticText* widget, string value)
{
- if (widget->GetLabel() != std_to_wx (value)) {
- widget->SetLabel (std_to_wx (value));
+ if (widget->GetLabel() != std_to_wx(value)) {
+ widget->SetLabel(std_to_wx(value));
}
}
void
-checked_set (wxStaticText* widget, wxString value)
+checked_set(wxStaticText* widget, wxString value)
{
if (widget->GetLabel() != value) {
- widget->SetLabel (value);
+ widget->SetLabel(value);
}
}
void
-checked_set (wxCheckBox* widget, bool value)
+checked_set(wxCheckBox* widget, bool value)
{
if (widget->GetValue() != value) {
- widget->SetValue (value);
+ widget->SetValue(value);
}
}
void
-checked_set (wxRadioButton* widget, bool value)
+checked_set(wxRadioButton* widget, bool value)
{
if (widget->GetValue() != value) {
- widget->SetValue (value);
+ widget->SetValue(value);
}
}
@@ -422,23 +422,23 @@ checked_set(RegionSubtagWidget* widget, optional<dcp::LanguageTag::RegionSubtag>
int
-wx_get (wxSpinCtrl* w)
+wx_get(wxSpinCtrl* w)
{
- return w->GetValue ();
+ return w->GetValue();
}
int
-wx_get (wxChoice* w)
+wx_get(wxChoice* w)
{
- return w->GetSelection ();
+ return w->GetSelection();
}
double
-wx_get (wxSpinCtrlDouble* w)
+wx_get(wxSpinCtrlDouble* w)
{
- return w->GetValue ();
+ return w->GetValue();
}
@@ -454,7 +454,7 @@ context_translation(char const* s)
/* No translation; strip the context */
int c = t.Find(char_to_wx("|"));
if (c != wxNOT_FOUND) {
- t = t.Mid (c + 1);
+ t = t.Mid(c + 1);
}
}
@@ -463,46 +463,46 @@ context_translation(char const* s)
wxString
-time_to_timecode (DCPTime t, double fps)
+time_to_timecode(DCPTime t, double fps)
{
- auto w = t.seconds ();
+ auto w = t.seconds();
int const h = (w / 3600);
w -= h * 3600;
int const m = (w / 60);
w -= m * 60;
- int const s = floor (w);
+ int const s = floor(w);
w -= s;
- int const f = lrint (w * fps);
- return wxString::Format(char_to_wx("%02d:%02d:%02d.%02d"), h, m, s, f);
+ int const f = lrint(w * fps);
+ return wxString::Format(char_to_wx("%02d:%02d:%02d:%02d"), h, m, s, f);
}
void
-setup_audio_channels_choice (wxChoice* choice, int minimum)
+setup_audio_channels_choice(wxChoice* choice, int minimum)
{
vector<pair<string, string>> items;
for (int i = minimum; i <= 16; i += 2) {
if (i == 2) {
- items.push_back (make_pair(wx_to_std(_("2 - stereo")), locale_convert<string>(i)));
+ items.push_back(make_pair(wx_to_std(_("2 - stereo")), locale_convert<string>(i)));
} else if (i == 4) {
- items.push_back (make_pair(wx_to_std(_("4 - L/C/R/Lfe")), locale_convert<string>(i)));
+ items.push_back(make_pair(wx_to_std(_("4 - L/C/R/Lfe")), locale_convert<string>(i)));
} else if (i == 6) {
- items.push_back (make_pair(wx_to_std(_("6 - 5.1")), locale_convert<string>(i)));
+ items.push_back(make_pair(wx_to_std(_("6 - 5.1")), locale_convert<string>(i)));
} else if (i == 8) {
- items.push_back (make_pair(wx_to_std(_("8 - 5.1/HI/VI")), locale_convert<string>(i)));
+ items.push_back(make_pair(wx_to_std(_("8 - 5.1/HI/VI")), locale_convert<string>(i)));
} else if (i == 12) {
- items.push_back (make_pair(wx_to_std(_("12 - 7.1/HI/VI")), locale_convert<string>(i)));
+ items.push_back(make_pair(wx_to_std(_("12 - 7.1/HI/VI")), locale_convert<string>(i)));
} else {
- items.push_back (make_pair(locale_convert<string> (i), locale_convert<string>(i)));
+ items.push_back(make_pair(locale_convert<string>(i), locale_convert<string>(i)));
}
}
- checked_set (choice, items);
+ checked_set(choice, items);
}
wxSplashScreen*
-maybe_show_splash ()
+maybe_show_splash()
{
wxSplashScreen* splash = nullptr;
@@ -523,7 +523,7 @@ maybe_show_splash ()
#else
splash = new wxSplashScreen(bitmap, wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_NO_TIMEOUT, 0, nullptr, -1);
#endif
- wxYield ();
+ wxYield();
}
} catch (boost::filesystem::filesystem_error& e) {
/* Maybe we couldn't find the splash image; never mind */
@@ -534,19 +534,19 @@ maybe_show_splash ()
double
-calculate_mark_interval (double mark_interval)
+calculate_mark_interval(double mark_interval)
{
if (mark_interval > 5) {
- mark_interval -= lrint (mark_interval) % 5;
+ mark_interval -= lrint(mark_interval) % 5;
}
if (mark_interval > 10) {
- mark_interval -= lrint (mark_interval) % 10;
+ mark_interval -= lrint(mark_interval) % 10;
}
if (mark_interval > 60) {
- mark_interval -= lrint (mark_interval) % 60;
+ mark_interval -= lrint(mark_interval) % 60;
}
if (mark_interval > 3600) {
- mark_interval -= lrint (mark_interval) % 3600;
+ mark_interval -= lrint(mark_interval) % 3600;
}
if (mark_interval < 1) {
@@ -559,16 +559,16 @@ calculate_mark_interval (double mark_interval)
/** @return false if the task was cancelled */
bool
-display_progress (wxString title, wxString task)
+display_progress(wxString title, wxString task)
{
- auto jm = JobManager::instance ();
+ auto jm = JobManager::instance();
- wxProgressDialog progress (title, task, 100, 0, wxPD_CAN_ABORT);
+ wxProgressDialog progress(title, task, 100, 0, wxPD_CAN_ABORT);
bool ok = true;
while (jm->work_to_do()) {
- dcpomatic_sleep_seconds (1);
+ dcpomatic_sleep_seconds(1);
if (!progress.Pulse()) {
/* user pressed cancel */
for (auto i: jm->get()) {
@@ -584,7 +584,7 @@ display_progress (wxString title, wxString task)
int
-get_offsets (vector<Offset>& offsets)
+get_offsets(vector<Offset>& offsets)
{
offsets.push_back({_("UTC-11"), dcp::UTCOffset(-11, 0)});
offsets.push_back({_("UTC-10"), dcp::UTCOffset(-10, 0)});
@@ -623,13 +623,13 @@ get_offsets (vector<Offset>& offsets)
wxString
-bitmap_path (string name)
+bitmap_path(string name)
{
boost::filesystem::path base;
#ifdef DCPOMATIC_DEBUG
/* Hack to allow Linux and OS X to find icons when running from the source tree */
- char* path = getenv ("DCPOMATIC_GRAPHICS");
+ char* path = getenv("DCPOMATIC_GRAPHICS");
if (path) {
base = path;
} else {
@@ -644,7 +644,7 @@ bitmap_path (string name)
#endif
auto p = base / name;
- return std_to_wx (p.string());
+ return std_to_wx(p.string());
}
@@ -656,18 +656,18 @@ icon_path(string name)
wxSize
-small_button_size (wxWindow* parent, wxString text)
+small_button_size(wxWindow* parent, wxString text)
{
- wxClientDC dc (parent);
- auto size = dc.GetTextExtent (text);
- size.SetHeight (-1);
- size.IncBy (32, 0);
+ wxClientDC dc(parent);
+ auto size = dc.GetTextExtent(text);
+ size.SetHeight(-1);
+ size.IncBy(32, 0);
return size;
}
bool
-gui_is_dark ()
+gui_is_dark()
{
#ifdef DCPOMATIC_WINDOWS
/* Dark mode doesn't really work at all on Windows at the moment, so just don't use it */
@@ -684,13 +684,13 @@ gui_is_dark ()
#if wxCHECK_VERSION(3,1,0)
double
-dpi_scale_factor (wxWindow* window)
+dpi_scale_factor(wxWindow* window)
{
return window->GetDPIScaleFactor();
}
#else
double
-dpi_scale_factor (wxWindow*)
+dpi_scale_factor(wxWindow*)
{
return 1;
}
@@ -699,7 +699,7 @@ dpi_scale_factor (wxWindow*)
int
-search_ctrl_height ()
+search_ctrl_height()
{
#ifdef __WXGTK3__
return 30;
diff --git a/src/wx/wx_util.h b/src/wx/wx_util.h
index 6f84705fb..957957589 100644
--- a/src/wx/wx_util.h
+++ b/src/wx/wx_util.h
@@ -94,34 +94,34 @@ class PasswordEntry;
#define S_(x) context_translation(x)
-extern void error_dialog (wxWindow *, wxString, boost::optional<wxString> e = boost::optional<wxString>());
-extern void message_dialog (wxWindow *, wxString);
-extern bool confirm_dialog (wxWindow *, wxString);
-extern wxStaticText* create_label (wxWindow* p, wxString t, bool left);
-extern wxStaticText* add_label_to_sizer (wxSizer *, wxWindow *, wxString, bool left, int prop = 0, int flags = wxLEFT | wxRIGHT);
-extern wxStaticText* add_label_to_sizer (wxSizer *, wxStaticText *, bool left, int prop = 0, int flags = wxLEFT | wxRIGHT);
+extern void error_dialog(wxWindow *, wxString, boost::optional<wxString> e = boost::optional<wxString>());
+extern void message_dialog(wxWindow *, wxString);
+extern bool confirm_dialog(wxWindow *, wxString);
+extern wxStaticText* create_label(wxWindow* p, wxString t, bool left);
+extern wxStaticText* add_label_to_sizer(wxSizer *, wxWindow *, wxString, bool left, int prop = 0, int flags = wxLEFT | wxRIGHT);
+extern wxStaticText* add_label_to_sizer(wxSizer *, wxStaticText *, bool left, int prop = 0, int flags = wxLEFT | wxRIGHT);
extern wxStaticText* add_label_to_sizer(wxGridBagSizer *, wxWindow *, wxString, bool, wxGBPosition, wxGBSpan span = wxDefaultSpan, bool indent = false);
-extern wxStaticText* add_label_to_sizer (wxGridBagSizer *, wxStaticText *, bool, wxGBPosition, wxGBSpan span = wxDefaultSpan);
-extern std::string wx_to_std (wxString);
-extern wxString std_to_wx (std::string);
+extern wxStaticText* add_label_to_sizer(wxGridBagSizer *, wxStaticText *, bool, wxGBPosition, wxGBSpan span = wxDefaultSpan);
+extern std::string wx_to_std(wxString);
+extern wxString std_to_wx(std::string);
/** Convert UTF8-encoded char array to wxString */
extern wxString char_to_wx(char const* s);
extern wxString context_translation(char const* s);
-extern std::string string_client_data (wxClientData* o);
-extern wxString time_to_timecode (dcpomatic::DCPTime t, double fps);
-extern void setup_audio_channels_choice (wxChoice* choice, int minimum);
+extern std::string string_client_data(wxClientData* o);
+extern wxString time_to_timecode(dcpomatic::DCPTime t, double fps);
+extern void setup_audio_channels_choice(wxChoice* choice, int minimum);
extern wxSplashScreen* maybe_show_splash();
-extern double calculate_mark_interval (double start);
-extern bool display_progress (wxString title, wxString task);
-extern bool report_errors_from_last_job (wxWindow* parent);
-extern wxString bitmap_path (std::string name);
+extern double calculate_mark_interval(double start);
+extern bool display_progress(wxString title, wxString task);
+extern bool report_errors_from_last_job(wxWindow* parent);
+extern wxString bitmap_path(std::string name);
extern wxString icon_path(std::string name);
-extern wxSize small_button_size (wxWindow* parent, wxString text);
-extern bool gui_is_dark ();
-extern double dpi_scale_factor (wxWindow* window);
-extern int search_ctrl_height ();
+extern wxSize small_button_size(wxWindow* parent, wxString text);
+extern bool gui_is_dark();
+extern double dpi_scale_factor(wxWindow* window);
+extern int search_ctrl_height();
extern void report_config_load_failure(wxWindow* parent, Config::LoadFailure what);
extern bool layout_for_short_screen(wxWindow* reference);
@@ -137,7 +137,7 @@ struct Offset
dcp::UTCOffset offset;
};
-extern int get_offsets (std::vector<Offset>& offsets);
+extern int get_offsets(std::vector<Offset>& offsets);
namespace dcpomatic {
namespace wx {
@@ -149,27 +149,27 @@ namespace wx {
}
-extern void checked_set (FilePickerCtrl* widget, boost::filesystem::path value);
-extern void checked_set (wxDirPickerCtrl* widget, boost::filesystem::path value);
-extern void checked_set (wxSpinCtrl* widget, int value);
-extern void checked_set (wxSpinCtrlDouble* widget, double value);
-extern void checked_set (wxChoice* widget, int value);
-extern void checked_set (wxChoice* widget, std::string value);
-extern void checked_set (wxChoice* widget, std::vector<std::pair<std::string, std::string> > items);
-extern void checked_set (wxTextCtrl* widget, std::string value);
-extern void checked_set (wxTextCtrl* widget, wxString value);
-extern void checked_set (PasswordEntry* widget, std::string value);
-extern void checked_set (wxCheckBox* widget, bool value);
-extern void checked_set (wxRadioButton* widget, bool value);
-extern void checked_set (wxStaticText* widget, std::string value);
-extern void checked_set (wxStaticText* widget, wxString value);
+extern void checked_set(FilePickerCtrl* widget, boost::filesystem::path value);
+extern void checked_set(wxDirPickerCtrl* widget, boost::filesystem::path value);
+extern void checked_set(wxSpinCtrl* widget, int value);
+extern void checked_set(wxSpinCtrlDouble* widget, double value);
+extern void checked_set(wxChoice* widget, int value);
+extern void checked_set(wxChoice* widget, std::string value);
+extern void checked_set(wxChoice* widget, std::vector<std::pair<std::string, std::string> > items);
+extern void checked_set(wxTextCtrl* widget, std::string value);
+extern void checked_set(wxTextCtrl* widget, wxString value);
+extern void checked_set(PasswordEntry* widget, std::string value);
+extern void checked_set(wxCheckBox* widget, bool value);
+extern void checked_set(wxRadioButton* widget, bool value);
+extern void checked_set(wxStaticText* widget, std::string value);
+extern void checked_set(wxStaticText* widget, wxString value);
extern void checked_set(LanguageTagWidget* widget, dcp::LanguageTag value);
extern void checked_set(LanguageTagWidget* widget, boost::optional<dcp::LanguageTag> value);
extern void checked_set(RegionSubtagWidget* widget, boost::optional<dcp::LanguageTag::RegionSubtag> value);
-extern int wx_get (wxChoice* widget);
-extern int wx_get (wxSpinCtrl* widget);
-extern double wx_get (wxSpinCtrlDouble* widget);
+extern int wx_get(wxChoice* widget);
+extern int wx_get(wxSpinCtrl* widget);
+extern double wx_get(wxSpinCtrlDouble* widget);
#ifdef DCPOMATIC_WINDOWS
#define DCPOMATIC_USE_OWN_PICKER