summaryrefslogtreecommitdiff
path: root/src/wx/audio_panel.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-01-07 16:02:33 +0000
committerCarl Hetherington <cth@carlh.net>2016-01-07 16:02:33 +0000
commitf61777543c611ed3ba818bf1c564322cb71b3009 (patch)
tree64368e19346a821e363fa8b93a6dc8ee65d2cae3 /src/wx/audio_panel.cc
parentc51f4dd82ada91d5e1c2c6a9b61089195e1fa85d (diff)
Factor out some common stuff and give a better tooltip on the 'refer' buttons when no DCP is selected.
Diffstat (limited to 'src/wx/audio_panel.cc')
-rw-r--r--src/wx/audio_panel.cc11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/wx/audio_panel.cc b/src/wx/audio_panel.cc
index ff62acc67..34d6ac885 100644
--- a/src/wx/audio_panel.cc
+++ b/src/wx/audio_panel.cc
@@ -245,16 +245,7 @@ AudioPanel::setup_sensitivity ()
list<string> why_not;
bool const can_reference = dcp && dcp->can_reference_audio (why_not);
- _reference->Enable (can_reference);
-
- wxString s;
- if (!can_reference) {
- s = _("Cannot reference this DCP. ");
- BOOST_FOREACH (string i, why_not) {
- s += std_to_wx(i) + wxT(" ");
- }
- }
- _reference->SetToolTip (s);
+ setup_refer_button (_reference, dcp, can_reference, why_not);
if (_reference->GetValue ()) {
_gain->wrapped()->Enable (false);