summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-01-24 00:12:45 +0000
committerCarl Hetherington <cth@carlh.net>2015-01-24 00:12:45 +0000
commit1e4f8cc123ccf1661ea4d23a51625614c2cf2e59 (patch)
tree0abbbfac2097b52640ce447bc8fdc93e1939233e /src/tools
parent68f662ac50a00ad986e3bd258c3f7daac374ab26 (diff)
Hand-apply d4470377df181b4d15fbac86c454a8372b1a0f3d; fix update checker.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/dcpomatic.cc24
1 files changed, 7 insertions, 17 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc
index 6d27a4248..614073947 100644
--- a/src/tools/dcpomatic.cc
+++ b/src/tools/dcpomatic.cc
@@ -896,29 +896,19 @@ class App : public wxApp
void update_checker_state_changed ()
{
- switch (UpdateChecker::instance()->state ()) {
- case UpdateChecker::YES:
- {
- string test;
- if (Config::instance()->check_for_test_updates ()) {
- test = UpdateChecker::instance()->test ();
- }
- UpdateDialog* dialog = new UpdateDialog (_frame, UpdateChecker::instance()->stable (), test);
+ UpdateChecker* uc = UpdateChecker::instance ();
+ if (uc->state() == UpdateChecker::YES && (uc->stable() || uc->test())) {
+ UpdateDialog* dialog = new UpdateDialog (_frame, uc->stable (), uc->test ());
dialog->ShowModal ();
dialog->Destroy ();
- break;
- }
- case UpdateChecker::NO:
+ } else if (uc->state() == UpdateChecker::FAILED) {
if (!UpdateChecker::instance()->last_emit_was_first ()) {
- error_dialog (_frame, _("There are no new versions of DCP-o-matic available."));
+ error_dialog (_frame, _("The DCP-o-matic download server could not be contaced."));
}
- break;
- case UpdateChecker::FAILED:
+ } else {
if (!UpdateChecker::instance()->last_emit_was_first ()) {
- error_dialog (_frame, _("The DCP-o-matic download server could not be contacted."));
+ error_dialog (_frame, _("There are no new versions of DCP-o-matic available."));
}
- default:
- break;
}
}