diff options
Diffstat (limited to 'src/wx/wx_util.cc')
| -rw-r--r-- | src/wx/wx_util.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc index 7edcabf40..91fd42624 100644 --- a/src/wx/wx_util.cc +++ b/src/wx/wx_util.cc @@ -30,6 +30,7 @@ #include <dcp/locale_convert.h> #include <wx/spinctrl.h> #include <wx/splash.h> +#include <wx/filepicker.h> #include <boost/thread.hpp> using namespace std; @@ -196,6 +197,20 @@ checked_set (FilePickerCtrl* widget, boost::filesystem::path value) } void +checked_set (wxDirPickerCtrl* widget, boost::filesystem::path value) +{ + if (widget->GetPath() != std_to_wx (value.string())) { + if (value.empty()) { + /* Hack to make wxWidgets clear the control when we are passed + an empty value. + */ + value = " "; + } + widget->SetPath (std_to_wx (value.string())); + } +} + +void checked_set (wxSpinCtrl* widget, int value) { if (widget->GetValue() != value) { |
