summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-10-07 17:11:31 +0100
committerCarl Hetherington <cth@carlh.net>2015-10-09 13:44:58 +0100
commitf29f405000752ad568de1e304640a4edac8214bc (patch)
treecb4990c7e7d90ddc6d5fddb9a69f3379a693c3fa /src/tools
parentbf0b74f67b87b2361529cefaae45533e5935a9c4 (diff)
Basics of job view when sending KDM emails from dcpomatic_kdm.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/dcpomatic_kdm.cc25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/tools/dcpomatic_kdm.cc b/src/tools/dcpomatic_kdm.cc
index 5972b6c0f..dd2c09bb0 100644
--- a/src/tools/dcpomatic_kdm.cc
+++ b/src/tools/dcpomatic_kdm.cc
@@ -25,6 +25,7 @@
#include "wx/screens_panel.h"
#include "wx/kdm_timing_panel.h"
#include "wx/kdm_output_panel.h"
+#include "wx/job_view_dialog.h"
#include "lib/config.h"
#include "lib/util.h"
#include "lib/screen.h"
@@ -61,6 +62,7 @@ public:
DOMFrame (wxString const & title)
: wxFrame (NULL, -1, title)
, _config_dialog (0)
+ , _job_view (0)
{
wxMenuBar* bar = new wxMenuBar;
setup_menu (bar);
@@ -270,14 +272,20 @@ private:
wxString::Format (s, int(screen_kdms.size()), std_to_wx(_output->directory().string()).data())
);
} else {
- JobManager::instance()->add (
- shared_ptr<Job> (new SendKDMEmailJob (
- decrypted.annotation_text(),
- decrypted.content_title_text(),
- _timing->from(), _timing->until(),
- CinemaKDMs::collect (screen_kdms)
- ))
- );
+ shared_ptr<Job> job (new SendKDMEmailJob (
+ decrypted.annotation_text(),
+ decrypted.content_title_text(),
+ _timing->from(), _timing->until(),
+ CinemaKDMs::collect (screen_kdms)
+ ));
+
+ JobManager::instance()->add (job);
+ if (_job_view) {
+ _job_view->Destroy ();
+ _job_view = 0;
+ }
+ _job_view = new JobViewDialog (this, _("Send KDM emails"), job);
+ _job_view->ShowModal ();
}
} catch (dcp::NotEncryptedError& e) {
error_dialog (this, _("CPL's content is not encrypted."));
@@ -308,6 +316,7 @@ private:
wxStaticText* _issue_date;
wxButton* _create;
KDMOutputPanel* _output;
+ JobViewDialog* _job_view;
};
/** @class App