table->Add(_email, 1, wxEXPAND);
table->AddSpacer(0);
- _write_to->bind(&DKDMOutputPanel::setup_sensitivity, this);
- _email->bind(&DKDMOutputPanel::setup_sensitivity, this);
+ _write_to->bind(&DKDMOutputPanel::method_changed, this);
+ _email->bind(&DKDMOutputPanel::method_changed, this);
SetSizer(table);
}
+void
+DKDMOutputPanel::method_changed()
+{
+ setup_sensitivity();
+ MethodChanged();
+}
+
+
void
DKDMOutputPanel::setup_sensitivity()
{
{
return wx_to_std(_folder->GetPath());
}
+
+
+bool
+DKDMOutputPanel::method_selected() const
+{
+ return _write_to->GetValue() || _email->GetValue();
+}
+
+
std::function<bool (boost::filesystem::path)> confirm_overwrite
);
+ bool method_selected() const;
+
+ boost::signals2::signal<void ()> MethodChanged;
+
private:
+ void method_changed();
+
NameFormatEditor* _filename_format;
CheckBox* _write_to;
#ifdef DCPOMATIC_USE_OWN_PICKER