diff options
author | Mathias Buhr <napcode@apparatus.de> | 2016-03-08 09:14:50 +0100 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-03-08 08:44:58 -0500 |
commit | 720c68d7e1fc2c3e18bf50e542b1d9cad05a227a (patch) | |
tree | 84aefe0d04a694a00a16e1167e1e415287fdf48c /libs | |
parent | 1375c454fbf40a5c698f8e95d9dc4f85d0835ebd (diff) |
Adds a tooltip to the icon
Diffstat (limited to 'libs')
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/searchbar.h | 5 | ||||
-rw-r--r-- | libs/gtkmm2ext/searchbar.cc | 12 |
2 files changed, 10 insertions, 7 deletions
diff --git a/libs/gtkmm2ext/gtkmm2ext/searchbar.h b/libs/gtkmm2ext/gtkmm2ext/searchbar.h index 5096ed53f9..d14d3bed3f 100644 --- a/libs/gtkmm2ext/gtkmm2ext/searchbar.h +++ b/libs/gtkmm2ext/gtkmm2ext/searchbar.h @@ -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; } diff --git a/libs/gtkmm2ext/searchbar.cc b/libs/gtkmm2ext/searchbar.cc index 75915c1f2e..6bfb7e0629 100644 --- a/libs/gtkmm2ext/searchbar.cc +++ b/libs/gtkmm2ext/searchbar.cc @@ -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 |