diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-07-05 23:18:43 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-07-05 23:18:43 +0100 |
| commit | 66e6d93921ef9ecca86d807be68f7cfb481cc4c6 (patch) | |
| tree | b13753e0b7bd3c54cff421c12b3d44601cba5ae9 | |
| parent | e09df0d2680a01003af057df8eab6bec0133731a (diff) | |
swaroop: remove on-screen log from player.
| -rw-r--r-- | src/wx/swaroop_controls.cc | 16 | ||||
| -rw-r--r-- | src/wx/swaroop_controls.h | 1 |
2 files changed, 7 insertions, 10 deletions
diff --git a/src/wx/swaroop_controls.cc b/src/wx/swaroop_controls.cc index 34241078b..e7232e6f4 100644 --- a/src/wx/swaroop_controls.cc +++ b/src/wx/swaroop_controls.cc @@ -104,9 +104,6 @@ SwaroopControls::SwaroopControls (wxWindow* parent, shared_ptr<FilmViewer> viewe _v_sizer->Add (e_sizer, 1, wxEXPAND); - _log = new wxTextCtrl (this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, 200), wxTE_READONLY | wxTE_MULTILINE); - _v_sizer->Add (_log, 0, wxALL | wxEXPAND, DCPOMATIC_SIZER_GAP); - _play_button->Bind (wxEVT_BUTTON, boost::bind(&SwaroopControls::play_clicked, this)); _pause_button->Bind (wxEVT_BUTTON, boost::bind(&SwaroopControls::pause_clicked, this)); _stop_button->Bind (wxEVT_BUTTON, boost::bind(&SwaroopControls::stop_clicked, this)); @@ -295,6 +292,11 @@ SwaroopControls::next_clicked () void SwaroopControls::log (wxString s) { + optional<boost::filesystem::path> log = Config::instance()->player_activity_log_file(); + if (!log) { + return; + } + struct timeval time; gettimeofday (&time, 0); char buffer[64]; @@ -302,14 +304,10 @@ SwaroopControls::log (wxString s) struct tm* t = localtime (&sec); strftime (buffer, 64, "%c", t); wxString ts = std_to_wx(string(buffer)) + N_(": "); - _log->SetValue(_log->GetValue() + ts + s + "\n"); - - optional<boost::filesystem::path> log = Config::instance()->player_activity_log_file(); - if (!log) { + FILE* f = fopen_boost (*log, "a"); + if (!f) { return; } - - FILE* f = fopen_boost (*log, "a"); fprintf (f, "%s%s\n", wx_to_std(ts).c_str(), wx_to_std(s).c_str()); fclose (f); } diff --git a/src/wx/swaroop_controls.h b/src/wx/swaroop_controls.h index d8d39d4a0..11dbcfc10 100644 --- a/src/wx/swaroop_controls.h +++ b/src/wx/swaroop_controls.h @@ -77,7 +77,6 @@ private: wxListCtrl* _spl_view; wxButton* _refresh_spl_view; wxListCtrl* _current_spl_view; - wxTextCtrl* _log; bool _current_disable_timeline; bool _current_disable_next; |
