Adds a tooltip to the icon
This commit is contained in:
parent
1375c454fb
commit
720c68d7e1
|
@ -68,7 +68,7 @@ KeyEditor::KeyEditor ()
|
|||
: ArdourWindow (_("Key Bindings"))
|
||||
, unbind_button (_("Remove shortcut"))
|
||||
, unbind_box (BUTTONBOX_END)
|
||||
, filter_entry (_("Search..."))
|
||||
, filter_entry (_("Search..."), true)
|
||||
, filter_string("")
|
||||
, sort_column(0)
|
||||
, sort_type(Gtk::SORT_ASCENDING)
|
||||
|
@ -80,6 +80,7 @@ KeyEditor::KeyEditor ()
|
|||
|
||||
Glib::RefPtr<Gdk::Pixbuf> icon = ARDOUR_UI_UTILS::get_icon ("search");
|
||||
filter_entry.set_icon_from_pixbuf (icon);
|
||||
filter_entry.set_icon_tooltip_text (_("Click to reset search string"));
|
||||
filter_entry.signal_search_string_updated ().connect (sigc::mem_fun (*this, &KeyEditor::search_string_updated));
|
||||
vpacker.pack_start (filter_entry, false, false);
|
||||
|
||||
|
|
|
@ -8,8 +8,11 @@ namespace Gtkmm2ext {
|
|||
class SearchBar : public Gtk::Entry
|
||||
{
|
||||
public:
|
||||
SearchBar(const std::string& placeholder_text = "Search...", bool icon_click_resets = true);
|
||||
SearchBar(
|
||||
const std::string& placeholder_text = "Search...",
|
||||
bool icon_click_resets = true);
|
||||
|
||||
// resets the searchbar to the initial state
|
||||
void reset ();
|
||||
// emitted when the filter has been updated
|
||||
sigc::signal<void, const std::string&> signal_search_string_updated () { return sig_search_string_updated; }
|
||||
|
|
|
@ -64,12 +64,12 @@ SearchBar::key_press_event (GdkEventKey* ev)
|
|||
void
|
||||
SearchBar::icon_clicked_event (Gtk::EntryIconPosition, const GdkEventButton*)
|
||||
{
|
||||
if (icon_click_resets) {
|
||||
reset ();
|
||||
}
|
||||
else {
|
||||
search_string_changed ();
|
||||
}
|
||||
if (icon_click_resets) {
|
||||
reset ();
|
||||
}
|
||||
else {
|
||||
search_string_changed ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue
Block a user