From 2ebf9da926f3170c134d34a84839541ddc1f7bbf Mon Sep 17 00:00:00 2001 From: "v.audacity" Date: Wed, 25 Jul 2012 00:09:55 +0000 Subject: [PATCH] For bug 436 (P2): Added tooltip for "Snap To" checkbox. --- src/toolbars/SelectionBar.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/toolbars/SelectionBar.cpp b/src/toolbars/SelectionBar.cpp index b2f70bedd..0dc41a6e4 100644 --- a/src/toolbars/SelectionBar.cpp +++ b/src/toolbars/SelectionBar.cpp @@ -237,6 +237,9 @@ void SelectionBar::Populate() 0, wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER | wxRIGHT, 5); mSnapTo->SetName(_("Snap To")); mSnapTo->SetValue(gPrefs->Read(wxT("/SnapTo"), 0L)!=0); + #if wxUSE_TOOLTIPS + mSnapTo->SetToolTip(wxString::Format(_("Snap clicks/selections to %s"), formatName)); + #endif mSnapTo->Connect(wxEVT_SET_FOCUS, wxFocusEventHandler(SelectionBar::OnFocus), @@ -363,6 +366,9 @@ void SelectionBar::OnUpdate(wxCommandEvent &evt) TimeTextCtrl *ttc = new TimeTextCtrl(this, wxID_ANY, wxT(""), 0.0, mRate); wxString formatName(ttc->GetBuiltinName(index)); gPrefs->Write(wxT("/SelectionFormat"), formatName); + #if wxUSE_TOOLTIPS + mSnapTo->SetToolTip(wxString::Format(_("Snap clicks/selections to %s"), formatName)); + #endif delete ttc; // ToolBar::ReCreateButtons() will get rid of our sizers and controls