/*
- Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
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
if (!_film_to_create.empty ()) {
_frame->new_film (_film_to_create);
if (!_content_to_add.empty ()) {
- _frame->film()->examine_and_add_content (content_factory (_frame->film(), _content_to_add), true);
+ _frame->film()->examine_and_add_content (content_factory (_frame->film(), _content_to_add));
}
}
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 contacted."));
}
- 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;
}
}