using std::string;
using std::vector;
using boost::optional;
+#if BOOST_VERSION >= 106100
+using namespace boost::placeholders;
+#endif
using namespace dcpomatic;
ucol_setAttribute(_collator, UCOL_STRENGTH, UCOL_PRIMARY, &status);
ucol_setAttribute(_collator, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, &status);
}
+
+ _config_connection = Config::instance()->Changed.connect(boost::bind(&ScreensPanel::config_changed, this, _1));
}
void
-ScreensPanel::search_changed ()
+ScreensPanel::clear_and_re_add()
{
_targets->DeleteAllItems ();
_screen_to_item.clear ();
add_cinemas ();
+}
+
+
+void
+ScreensPanel::search_changed ()
+{
+ clear_and_re_add();
_ignore_selection_change = true;
bool
ScreensPanel::notify_cinemas_changed()
{
+ _ignore_cinemas_changed = true;
+ ScopeGuard sg = [this]() { _ignore_cinemas_changed = false; };
+
try {
Config::instance()->changed(Config::CINEMAS);
} catch (FileError& e) {
}
+void
+ScreensPanel::config_changed(Config::Property property)
+{
+ if (property == Config::Property::CINEMAS && !_ignore_cinemas_changed) {
+ clear_and_re_add();
+ }
+}
+
+
*/
+#include "lib/config.h"
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/srchctrl.h>
void check_all ();
void uncheck_all ();
bool notify_cinemas_changed();
+ void clear_and_re_add();
+ void config_changed(Config::Property);
std::shared_ptr<Cinema> item_to_cinema (wxTreeListItem item) const;
std::shared_ptr<dcpomatic::Screen> item_to_screen (wxTreeListItem item) const;
bool _ignore_check_change = false;
UCollator* _collator = nullptr;
+
+ boost::signals2::scoped_connection _config_connection;
+ bool _ignore_cinemas_changed = false;
};