From 58cd57db37f1460a899aaf92b8c7e7564f55e50d Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 4 Jun 2019 00:55:39 +0100 Subject: [PATCH] More system information to tools and add it to the player. --- src/tools/dcpomatic.cc | 8 ++++---- src/tools/dcpomatic_player.cc | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 2fe5187b4..820289825 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -230,12 +230,12 @@ enum { ID_jobs_open_dcp_in_player, ID_view_closed_captions, ID_view_video_waveform, - ID_view_system_information, ID_tools_hints, ID_tools_encoding_servers, ID_tools_manage_templates, ID_tools_check_for_updates, ID_tools_send_translations, + ID_tools_system_information, ID_tools_restore_default_preferences, ID_help_report_a_problem, /* IDs for shortcuts (with no associated menu item) */ @@ -322,12 +322,12 @@ public: Bind (wxEVT_MENU, boost::bind (&DOMFrame::jobs_open_dcp_in_player, this), ID_jobs_open_dcp_in_player); Bind (wxEVT_MENU, boost::bind (&DOMFrame::view_closed_captions, this), ID_view_closed_captions); Bind (wxEVT_MENU, boost::bind (&DOMFrame::view_video_waveform, this), ID_view_video_waveform); - Bind (wxEVT_MENU, boost::bind (&DOMFrame::view_system_information, this), ID_view_system_information); Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_hints, this), ID_tools_hints); Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_encoding_servers, this), ID_tools_encoding_servers); Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_manage_templates, this), ID_tools_manage_templates); Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_check_for_updates, this), ID_tools_check_for_updates); Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_send_translations, this), ID_tools_send_translations); + Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_system_information, this),ID_tools_system_information); Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_restore_default_preferences, this), ID_tools_restore_default_preferences); Bind (wxEVT_MENU, boost::bind (&DOMFrame::help_about, this), wxID_ABOUT); Bind (wxEVT_MENU, boost::bind (&DOMFrame::help_report_a_problem, this), ID_help_report_a_problem); @@ -991,7 +991,7 @@ private: _video_waveform_dialog->Show (); } - void view_system_information () + void tools_system_information () { if (!_system_information_dialog) { _system_information_dialog = new SystemInformationDialog (this, _film_viewer); @@ -1281,7 +1281,6 @@ private: wxMenu* view = new wxMenu; add_item (view, _("Closed captions..."), ID_view_closed_captions, NEEDS_FILM); add_item (view, _("Video waveform..."), ID_view_video_waveform, NEEDS_FILM); - add_item (view, _("System information..."), ID_view_system_information, 0); wxMenu* tools = new wxMenu; add_item (tools, _("Hints..."), ID_tools_hints, NEEDS_FILM); @@ -1289,6 +1288,7 @@ private: add_item (tools, _("Manage templates..."), ID_tools_manage_templates, 0); add_item (tools, _("Check for updates"), ID_tools_check_for_updates, 0); add_item (tools, _("Send translations..."), ID_tools_send_translations, 0); + add_item (tools, _("System information..."), ID_tools_system_information, 0); tools->AppendSeparator (); add_item (tools, _("Restore default preferences"), ID_tools_restore_default_preferences, ALWAYS); diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index cd941e935..6a64bd0de 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -30,6 +30,7 @@ #include "wx/standard_controls.h" #include "wx/swaroop_controls.h" #include "wx/timer_display.h" +#include "wx/system_information_dialog.h" #include "lib/cross.h" #include "lib/config.h" #include "lib/util.h" @@ -111,6 +112,7 @@ enum { ID_tools_verify, ID_tools_check_for_updates, ID_tools_timing, + ID_tools_system_information, /* IDs for shortcuts (with no associated menu item) */ ID_start_stop, ID_back_frame, @@ -131,6 +133,7 @@ public: , _history_items (0) , _history_position (0) , _history_separator (0) + , _system_information_dialog (0) , _view_full_screen (0) , _view_dual_screen (0) { @@ -172,6 +175,7 @@ public: Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_verify, this), ID_tools_verify); Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_check_for_updates, this), ID_tools_check_for_updates); Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_timing, this), ID_tools_timing); + Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_system_information, this), ID_tools_system_information); /* Use a panel as the only child of the Frame so that we avoid the dark-grey background on Windows. @@ -503,6 +507,7 @@ private: tools->AppendSeparator (); tools->Append (ID_tools_check_for_updates, _("Check for updates")); tools->Append (ID_tools_timing, _("Timing...")); + tools->Append (ID_tools_system_information, _("System information...")); wxMenu* help = new wxMenu; #ifdef __WXOSX__ @@ -796,6 +801,15 @@ private: d->Destroy (); } + void tools_system_information () + { + if (!_system_information_dialog) { + _system_information_dialog = new SystemInformationDialog (this, _viewer); + } + + _system_information_dialog->Show (); + } + void help_about () { AboutDialog* d = new AboutDialog (this); @@ -953,6 +967,7 @@ private: wxMenuItem* _history_separator; shared_ptr _viewer; Controls* _controls; + SystemInformationDialog* _system_information_dialog; boost::shared_ptr _film; boost::signals2::scoped_connection _config_changed_connection; wxMenuItem* _file_add_ov; -- 2.30.2