From f066fe5fb8589d931d91e924f7e31f09efb33fd3 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 1 Sep 2014 00:35:03 +0100 Subject: Bump version --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index c919f85b5..9314e4066 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-09-01 Carl Hetherington + + * Version 1.73.1 released. + 2014-08-31 Carl Hetherington * Remove configurable CPL and use "DCP-o-matic (version) (git)" -- cgit v1.2.3 From 8407612363705f757d3ab26d6e119171c217b00a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 2 Sep 2014 22:09:33 +0100 Subject: Seemingly rather long-winded way of making the JobManagerView in dcpomatic_batch shrink nicely (i.e. shrinking the gauge) when the window is shrunk. It seems surprising that we have to call back to children to tell them to layout / fit-inside, but it does all *seem* to be necessary. --- ChangeLog | 4 ++++ src/tools/dcpomatic_batch.cc | 17 ++++++++++++----- src/wx/job_manager_view.cc | 12 +++++++++++- src/wx/job_manager_view.h | 1 + 4 files changed, 28 insertions(+), 6 deletions(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 9314e4066..54188c26a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-09-02 Carl Hetherington + + * Improve behaviour of batch converter window when it is shrunk (#338). + 2014-09-01 Carl Hetherington * Version 1.73.1 released. diff --git a/src/tools/dcpomatic_batch.cc b/src/tools/dcpomatic_batch.cc index 234bfea5c..de255e65e 100644 --- a/src/tools/dcpomatic_batch.cc +++ b/src/tools/dcpomatic_batch.cc @@ -62,6 +62,7 @@ class Frame : public wxFrame public: Frame (wxString const & title) : wxFrame (NULL, -1, title) + , _sizer (new wxBoxSizer (wxVERTICAL)) { wxMenuBar* bar = new wxMenuBar; setup_menu (bar); @@ -76,24 +77,29 @@ public: s->Add (panel, 1, wxEXPAND); SetSizer (s); - wxSizer* sizer = new wxBoxSizer (wxVERTICAL); - JobManagerView* job_manager_view = new JobManagerView (panel, JobManagerView::PAUSE); - sizer->Add (job_manager_view, 1, wxALL | wxEXPAND, 6); + _sizer->Add (job_manager_view, 1, wxALL | wxEXPAND, 6); wxSizer* buttons = new wxBoxSizer (wxHORIZONTAL); wxButton* add = new wxButton (panel, wxID_ANY, _("Add Film...")); add->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&Frame::add_film, this)); buttons->Add (add, 1, wxALL, 6); - sizer->Add (buttons, 0, wxALL, 6); + _sizer->Add (buttons, 0, wxALL, 6); - panel->SetSizer (sizer); + panel->SetSizer (_sizer); Bind (wxEVT_CLOSE_WINDOW, boost::bind (&Frame::close, this, _1)); + Bind (wxEVT_SIZE, boost::bind (&Frame::sized, this, _1)); } private: + void sized (wxSizeEvent& ev) + { + _sizer->Layout (); + ev.Skip (); + } + bool should_close () { if (!JobManager::instance()->work_to_do ()) { @@ -176,6 +182,7 @@ private: } boost::optional _last_parent; + wxSizer* _sizer; }; static const wxCmdLineEntryDesc command_line_description[] = { diff --git a/src/wx/job_manager_view.cc b/src/wx/job_manager_view.cc index df9c6f5f1..5146243b4 100644 --- a/src/wx/job_manager_view.cc +++ b/src/wx/job_manager_view.cc @@ -202,14 +202,24 @@ JobManagerView::JobManagerView (wxWindow* parent, Buttons buttons) _panel->SetSizer (_table); SetScrollRate (0, 32); + EnableScrolling (false, true); Bind (wxEVT_TIMER, boost::bind (&JobManagerView::periodic, this)); _timer.reset (new wxTimer (this)); _timer->Start (1000); - + + Bind (wxEVT_SIZE, boost::bind (&JobManagerView::sized, this, _1)); JobManager::instance()->JobAdded.connect (bind (&JobManagerView::job_added, this, _1)); } +void +JobManagerView::sized (wxSizeEvent& ev) +{ + _table->FitInside (_panel); + _table->Layout (); + ev.Skip (); +} + void JobManagerView::job_added (weak_ptr j) { diff --git a/src/wx/job_manager_view.h b/src/wx/job_manager_view.h index c4bb1e218..83ce4ee5a 100644 --- a/src/wx/job_manager_view.h +++ b/src/wx/job_manager_view.h @@ -43,6 +43,7 @@ public: private: void job_added (boost::weak_ptr); void periodic (); + void sized (wxSizeEvent &); wxPanel* _panel; wxFlexGridSizer* _table; -- cgit v1.2.3 From fb86361c31c35d7df3dede7b40e4b60e2e7f9c1a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 3 Sep 2014 00:37:51 +0100 Subject: Similar fix to Dolby cert downloads. --- ChangeLog | 4 ++++ src/wx/dolby_certificate_dialog.cc | 47 +++++++++++++++++++++++++++++++++----- src/wx/dolby_certificate_dialog.h | 4 ++++ src/wx/wx_util.cc | 10 +------- src/wx/wx_util.h | 1 - 5 files changed, 50 insertions(+), 16 deletions(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 54188c26a..d9be8474e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-09-03 Carl Hetherington + + * Fix server certificate downloads on OS X (#376). + 2014-09-02 Carl Hetherington * Improve behaviour of batch converter window when it is shrunk (#338). diff --git a/src/wx/dolby_certificate_dialog.cc b/src/wx/dolby_certificate_dialog.cc index a05a3bbc7..5e094844d 100644 --- a/src/wx/dolby_certificate_dialog.cc +++ b/src/wx/dolby_certificate_dialog.cc @@ -21,6 +21,7 @@ #include #include "lib/compose.hpp" #include "lib/internet.h" +#include "lib/ui_signaller.h" #include "dolby_certificate_dialog.h" #include "wx_util.h" @@ -74,8 +75,17 @@ DolbyCertificateDialog::setup_countries () _country->Append (_("Fetching...")); _country->SetSelection (0); - run_gui_loop (); - + +#ifdef DCPOMATIC_OSX + /* See DoremiCertificateDialog for discussion about this daft delay */ + wxMilliSleep (200); +#endif + ui_signaller->when_idle (boost::bind (&DolbyCertificateDialog::finish_setup_countries, this)); +} + +void +DolbyCertificateDialog::finish_setup_countries () +{ list const countries = get_dir (""); _country->Clear (); for (list::const_iterator i = countries.begin(); i != countries.end(); ++i) { @@ -89,8 +99,16 @@ DolbyCertificateDialog::country_selected () _cinema->Clear (); _cinema->Append (_("Fetching...")); _cinema->SetSelection (0); - run_gui_loop (); - + +#ifdef DCPOMATIC_OSX + wxMilliSleep (200); +#endif + ui_signaller->when_idle (boost::bind (&DolbyCertificateDialog::finish_country_selected, this)); +} + +void +DolbyCertificateDialog::finish_country_selected () +{ list const cinemas = get_dir (wx_to_std (_country->GetStringSelection())); _cinema->Clear (); for (list::const_iterator i = cinemas.begin(); i != cinemas.end(); ++i) { @@ -104,8 +122,16 @@ DolbyCertificateDialog::cinema_selected () _serial->Clear (); _serial->Append (_("Fetching...")); _serial->SetSelection (0); - run_gui_loop (); +#ifdef DCPOMATIC_OSX + wxMilliSleep (200); +#endif + ui_signaller->when_idle (boost::bind (&DolbyCertificateDialog::finish_cinema_selected, this)); +} + +void +DolbyCertificateDialog::finish_cinema_selected () +{ string const dir = String::compose ("%1/%2", wx_to_std (_country->GetStringSelection()), wx_to_std (_cinema->GetStringSelection())); list const zips = get_dir (dir); @@ -129,8 +155,17 @@ void DolbyCertificateDialog::download () { _message->SetLabel (_("Downloading certificate")); - run_gui_loop (); +#ifdef DCPOMATIC_OSX + wxMilliSleep (200); +#endif + + ui_signaller->when_idle (boost::bind (&DolbyCertificateDialog::finish_download, this)); +} + +void +DolbyCertificateDialog::finish_download () +{ string const zip = string_client_data (_serial->GetClientObject (_serial->GetSelection ())); string const file = String::compose ( diff --git a/src/wx/dolby_certificate_dialog.h b/src/wx/dolby_certificate_dialog.h index 194150363..e9bbffda0 100644 --- a/src/wx/dolby_certificate_dialog.h +++ b/src/wx/dolby_certificate_dialog.h @@ -27,9 +27,13 @@ public: private: void download (); + void finish_download (); void setup_countries (); + void finish_setup_countries (); void country_selected (); + void finish_country_selected (); void cinema_selected (); + void finish_cinema_selected (); void serial_selected (); std::list get_dir (std::string) const; diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc index 218a786b2..23a85534a 100644 --- a/src/wx/wx_util.cc +++ b/src/wx/wx_util.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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 @@ -312,14 +312,6 @@ wx_get (wxSpinCtrlDouble* w) return w->GetValue (); } -void -run_gui_loop () -{ - while (wxTheApp->Pending ()) { - wxTheApp->Dispatch (); - } -} - /** @param s String of the form Context|String * @return translation, or String if no translation is available. */ diff --git a/src/wx/wx_util.h b/src/wx/wx_util.h index 6dfc0bf5c..f0e20be95 100644 --- a/src/wx/wx_util.h +++ b/src/wx/wx_util.h @@ -63,7 +63,6 @@ extern wxStaticText* add_label_to_grid_bag_sizer (wxGridBagSizer *, wxWindow *, extern std::string wx_to_std (wxString); extern wxString std_to_wx (std::string); extern void dcpomatic_setup_i18n (); -extern void run_gui_loop (); extern wxString context_translation (wxString); /** @class ThreadedStaticText -- cgit v1.2.3 From 9b518f44a72db0883d4e9c008486d014e8f62748 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 3 Sep 2014 23:36:54 +0100 Subject: Bump version --- ChangeLog | 4 ++++ debian/changelog | 5 +++-- wscript | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index d9be8474e..0fcb2da4d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-09-03 Carl Hetherington + + * Version 1.73.2 released. + 2014-09-03 Carl Hetherington * Fix server certificate downloads on OS X (#376). diff --git a/debian/changelog b/debian/changelog index fe8a3c775..63e999b72 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -dcpomatic (1.73.1-1) UNRELEASED; urgency=low +dcpomatic (1.73.2-1) UNRELEASED; urgency=low * New upstream release. * New upstream release. @@ -177,8 +177,9 @@ dcpomatic (1.73.1-1) UNRELEASED; urgency=low * New upstream release. * New upstream release. * New upstream release. + * New upstream release. - -- Carl Hetherington Mon, 01 Sep 2014 00:35:03 +0100 + -- Carl Hetherington Wed, 03 Sep 2014 23:36:54 +0100 dcpomatic (0.87-1) UNRELEASED; urgency=low diff --git a/wscript b/wscript index a4cc1265b..8698dddc4 100644 --- a/wscript +++ b/wscript @@ -3,7 +3,7 @@ import os import sys APPNAME = 'dcpomatic' -VERSION = '1.73.1devel' +VERSION = '1.73.2' def options(opt): opt.load('compiler_cxx') -- cgit v1.2.3