using std::vector;
+using boost::optional;
DirDialog::DirDialog(
wxWindow* parent,
wxString title,
long style,
- std::string initial_path_key
+ std::string initial_path_key,
+ optional<boost::filesystem::path> override_path
)
: wxDirDialog(
parent,
title,
- std_to_wx(Config::instance()->initial_path(initial_path_key).get_value_or(home_directory()).string()),
+ std_to_wx(
+ override_path.get_value_or(
+ Config::instance()->initial_path(initial_path_key).get_value_or(home_directory())
+ ).string()),
style
)
, _initial_path_key(initial_path_key)
#include <wx/wx.h>
LIBDCP_ENABLE_WARNINGS
#include <boost/filesystem.hpp>
+#include <boost/optional.hpp>
#include <vector>
wxWindow* parent,
wxString title,
long style,
- std::string initial_path_key
+ std::string initial_path_key,
+ boost::optional<boost::filesystem::path> override_path = boost::optional<boost::filesystem::path>()
);
/** @return true if OK was clicked */
using std::vector;
+using boost::optional;
FileDialog::FileDialog(
wxString title,
wxString allowed,
long style,
- std::string initial_path_key
+ std::string initial_path_key,
+ optional<boost::filesystem::path> override_path
)
: wxFileDialog(
parent,
title,
- std_to_wx(Config::instance()->initial_path(initial_path_key).get_value_or(home_directory()).string()),
+ std_to_wx(
+ override_path.get_value_or(
+ Config::instance()->initial_path(initial_path_key).get_value_or(home_directory())
+ ).string()),
wxEmptyString,
allowed,
style
#include <wx/wx.h>
LIBDCP_ENABLE_WARNINGS
#include <boost/filesystem.hpp>
+#include <boost/optional.hpp>
#include <vector>
wxString title,
wxString allowed,
long style,
- std::string initial_path_key
+ std::string initial_path_key,
+ boost::optional<boost::filesystem::path> override_path = boost::optional<boost::filesystem::path>()
);
/** @return true if OK was clicked */