summaryrefslogtreecommitdiff
path: root/src/wx/cinema_dialog.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-03-02 21:41:58 +0000
committerCarl Hetherington <cth@carlh.net>2016-03-08 10:30:34 +0000
commit581ea73e56388d87a0c7f736efce447076618393 (patch)
treedccfd764d2234e7a3c4f15827ea5f237ebab5f65 /src/wx/cinema_dialog.cc
parent61978a4f081a3c41896bf41185634778b7c1e9ce (diff)
Add GUI and storage for UTC offset in Cinema.
Diffstat (limited to 'src/wx/cinema_dialog.cc')
-rw-r--r--src/wx/cinema_dialog.cc26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/wx/cinema_dialog.cc b/src/wx/cinema_dialog.cc
index 183e3b1b2..6fb4acc6b 100644
--- a/src/wx/cinema_dialog.cc
+++ b/src/wx/cinema_dialog.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,6 +19,7 @@
#include "cinema_dialog.h"
#include "wx_util.h"
+#include "lib/dcpomatic_assert.h"
#include <boost/foreach.hpp>
using std::string;
@@ -35,7 +36,7 @@ column (string s)
return s;
}
-CinemaDialog::CinemaDialog (wxWindow* parent, string title, string name, list<string> emails)
+CinemaDialog::CinemaDialog (wxWindow* parent, string title, string name, list<string> emails, int utc_offset)
: wxDialog (parent, wxID_ANY, std_to_wx (title))
{
wxBoxSizer* overall_sizer = new wxBoxSizer (wxVERTICAL);
@@ -49,6 +50,11 @@ CinemaDialog::CinemaDialog (wxWindow* parent, string title, string name, list<st
sizer->Add (_name, wxGBPosition (r, 1));
++r;
+ add_label_to_sizer (sizer, this, _("UTC offset (time zone)"), true, wxGBPosition (r, 0));
+ _utc_offset = new wxChoice (this, wxID_ANY);
+ sizer->Add (_utc_offset, wxGBPosition (r, 1));
+ ++r;
+
add_label_to_sizer (sizer, this, _("Email addresses for KDM delivery"), false, wxGBPosition (r, 0), wxGBSpan (1, 2));
++r;
@@ -70,6 +76,16 @@ CinemaDialog::CinemaDialog (wxWindow* parent, string title, string name, list<st
overall_sizer->Add (buttons, wxSizerFlags().Expand().DoubleBorder());
}
+ for (int i = -11; i <= -1; ++i) {
+ _utc_offset->Append (wxString::Format (_("UTC%d"), i));
+ }
+ _utc_offset->Append (_("UTC"));
+ for (int i = 1; i <= 12; ++i) {
+ _utc_offset->Append (wxString::Format (_("UTC+%d"), i));
+ }
+
+ _utc_offset->SetSelection (utc_offset + 11);
+
overall_sizer->Layout ();
overall_sizer->SetSizeHints (this);
}
@@ -99,3 +115,9 @@ CinemaDialog::emails () const
copy (_emails.begin(), _emails.end(), back_inserter (e));
return e;
}
+
+int
+CinemaDialog::utc_offset () const
+{
+ return _utc_offset->GetSelection() - 11;
+}