diff options
author | corvid <corvid@lavabit.com> | 2009-10-03 15:29:57 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2009-10-03 15:29:57 +0000 |
commit | 241f20d9187569eedeb974f2edbf2cbf09be2409 (patch) | |
tree | 62a118fc04aeb2c854b3d9b90de2c43e7643034f /src/findbar.cc | |
parent | b959c77c50c1496c815fe179cb38805a422ad0cc (diff) |
only set tooltips for UI if prefs.show_tooltip set
Diffstat (limited to 'src/findbar.cc')
-rw-r--r-- | src/findbar.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/findbar.cc b/src/findbar.cc index 2045d2a0..d35719d6 100644 --- a/src/findbar.cc +++ b/src/findbar.cc @@ -122,7 +122,6 @@ Findbar::Findbar(int width, int height) : hide_btn = new HighlightButton(x, border, 16, height, 0); hideImg = new xpmImage(new_s_xpm); hide_btn->image(hideImg); - hide_btn->tooltip("Hide"); x += 16 + gap; hide_btn->callback(hide_cb, this); hide_btn->clear_tab_to_focus(); @@ -138,16 +137,12 @@ Findbar::Findbar(int width, int height) : next_btn = new HighlightButton(x, border, button_width, height, "Next"); x += button_width + gap; - next_btn->tooltip("Find next occurrence of the search phrase\n" - "shortcut: Enter"); next_btn->add_shortcut(ReturnKey); next_btn->add_shortcut(KeypadEnter); next_btn->callback(search_cb, this); next_btn->clear_tab_to_focus(); prev_btn= new HighlightButton(x, border, button_width, height, "Previous"); - prev_btn->tooltip("Find previous occurrence of the search phrase\n" - "shortcut: Shift+Enter"); prev_btn->add_shortcut(SHIFT+ReturnKey); prev_btn->callback(searchBackwards_cb, this); prev_btn->clear_tab_to_focus(); @@ -159,6 +154,14 @@ Findbar::Findbar(int width, int height) : x += 2 * button_width + gap; end(); + + if (prefs.show_tooltip) { + hide_btn->tooltip("Hide"); + next_btn->tooltip("Find next occurrence of the search phrase\n" + "shortcut: Enter"); + prev_btn->tooltip("Find previous occurrence of the search phrase\n" + "shortcut: Shift+Enter"); + } } Findbar::~Findbar() |