diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-08-08 17:04:26 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-08-14 11:18:18 +0100 |
| commit | eb370b3058dacc1b21ee8f576af5d6189670673e (patch) | |
| tree | 3c34e38250ab4966914cd4f52d8a9a6d4f78c6da /src/tools | |
| parent | 350b8076eb7ef0a40c5a803a7b58a732c694252d (diff) | |
Nag on 3rd successful DCP encode.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/dcpomatic.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 6972b35c4..fe23f8eaf 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -45,10 +45,12 @@ #include "wx/export_dialog.h" #include "wx/paste_dialog.h" #include "wx/focus_manager.h" +#include "wx/html_dialog.h" #include "lib/film.h" #include "lib/config.h" #include "lib/util.h" #include "lib/video_content.h" +#include "lib/analytics.h" #include "lib/content.h" #include "lib/version.h" #include "lib/signal_manager.h" @@ -79,6 +81,7 @@ #include <wx/cmdline.h> #include <wx/preferences.h> #include <wx/splash.h> +#include <wx/wxhtml.h> #ifdef __WXMSW__ #include <shellapi.h> #endif @@ -277,6 +280,8 @@ public: _config_changed_connection = Config::instance()->Changed.connect (boost::bind (&DOMFrame::config_changed, this, _1)); config_changed (Config::OTHER); + _analytics_message_connection = Analytics::instance()->Message.connect(boost::bind(&DOMFrame::analytics_message, this, _1, _2)); + Bind (wxEVT_MENU, boost::bind (&DOMFrame::file_new, this), ID_file_new); Bind (wxEVT_MENU, boost::bind (&DOMFrame::file_open, this), ID_file_open); Bind (wxEVT_MENU, boost::bind (&DOMFrame::file_save, this), ID_file_save); @@ -1001,6 +1006,9 @@ private: */ _config_changed_connection.disconnect (); + /* Also stop hearing about analytics-related stuff */ + _analytics_message_connection.disconnect (); + ev.Skip (); } @@ -1291,6 +1299,13 @@ private: _film_viewer->forward_frame (); } + void analytics_message (string title, string html) + { + HTMLDialog* d = new HTMLDialog(this, std_to_wx(title), std_to_wx(html)); + d->ShowModal(); + d->Destroy(); + } + FilmEditor* _film_editor; FilmViewer* _film_viewer; VideoWaveformDialog* _video_waveform_dialog; @@ -1305,6 +1320,7 @@ private: int _history_position; wxMenuItem* _history_separator; boost::signals2::scoped_connection _config_changed_connection; + boost::signals2::scoped_connection _analytics_message_connection; bool _update_news_requested; shared_ptr<Content> _clipboard; }; |
