X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic.cc;h=614073947b4032e305ef26a0a2e90c1879f740a5;hp=6d27a4248cda0f2b3cb07fc031c1f24620d11eb7;hb=1e4f8cc123ccf1661ea4d23a51625614c2cf2e59;hpb=68f662ac50a00ad986e3bd258c3f7daac374ab26 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; } }