X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fwx_util.cc;fp=src%2Fwx%2Fwx_util.cc;h=ee666310199754184c89c014634f28a9499b77b1;hb=4d879e836147720bed8208f92d8d39bcbd661221;hp=074f47d61bebd2a61ff77ee4d76bbe730ee7aff5;hpb=da822af56c5e4acab361b8531fb75a1dcb4b110e;p=dcpomatic.git diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc index 074f47d61..ee6663101 100644 --- a/src/wx/wx_util.cc +++ b/src/wx/wx_util.cc @@ -25,6 +25,7 @@ #include "file_picker_ctrl.h" +#include "language_tag_widget.h" #include "password_entry.h" #include "static_text.h" #include "wx_util.h" @@ -383,6 +384,24 @@ checked_set (wxRadioButton* widget, bool value) } +void +checked_set(LanguageTagWidget* widget, dcp::LanguageTag value) +{ + if (widget->get() != value) { + widget->set(value); + } +} + + +void +checked_set(LanguageTagWidget* widget, optional value) +{ + if (widget->get() != value) { + widget->set(value); + } +} + + void dcpomatic_setup_i18n () {