aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2008-10-01 19:26:57 +0200
committerjcid <devnull@localhost>2008-10-01 19:26:57 +0200
commite293f994966f2dd42fd07fad60fdfbcdc1fb9081 (patch)
treeafa10e47caf57790d73906c05445ad165a66f8bd /src
parentbb03b8a02fbbf22b04aa64459cf95bd9422e598d (diff)
- Minor variable changes in findbar. Also some clear_tab_to_focus().
Diffstat (limited to 'src')
-rw-r--r--src/findbar.cc30
-rw-r--r--src/findbar.hh5
2 files changed, 19 insertions, 16 deletions
diff --git a/src/findbar.cc b/src/findbar.cc
index 16da8f0e..606fe7af 100644
--- a/src/findbar.cc
+++ b/src/findbar.cc
@@ -52,7 +52,7 @@ void Findbar::search_cb(Widget *, void *vfb)
{
Findbar *fb = (Findbar *)vfb;
const char *key = fb->i->value();
- bool case_sens = fb->cb->value();
+ bool case_sens = fb->check_btn->value();
if (key[0] != '\0')
a_UIcmd_findtext_search(a_UIcmd_get_bw_by_widget(fb),
@@ -97,13 +97,13 @@ Findbar::Findbar(int width, int height) :
Group::hide();
begin();
- hidebutton = new HighlightButton(x, border, 16, height, 0);
+ hide_btn = new HighlightButton(x, border, 16, height, 0);
hideImg = new xpmImage(new_s_xpm);
- hidebutton->image(hideImg);
- hidebutton->tooltip("Hide");
+ hide_btn->image(hideImg);
+ hide_btn->tooltip("Hide");
x += 16 + gap;
- hidebutton->callback(hide_cb, this);
- hidebutton->clear_tab_to_focus();
+ hide_btn->callback(hide_cb, this);
+ hide_btn->clear_tab_to_focus();
i = new MyInput(x, border, input_width, height);
x += input_width + gap;
@@ -111,16 +111,20 @@ Findbar::Findbar(int width, int height) :
i->color(206);
i->when(WHEN_ENTER_KEY_ALWAYS);
i->callback(search_cb2, this);
+ i->clear_tab_to_focus();
// TODO: search previous would be nice
- findb = new HighlightButton(x, border, button_width, height, "Next");
+ next_btn = new HighlightButton(x, border, button_width, height, "Next");
x += button_width + gap;
- findb->tooltip("Find next occurrence of the search phrase");
- findb->add_shortcut(ReturnKey);
- findb->add_shortcut(KeypadEnter);
- findb->callback(search_cb, this);
-
- cb = new CheckButton(x, border, 2*button_width, height, "Case-sensitive");
+ next_btn->tooltip("Find next occurrence of the search phrase");
+ next_btn->add_shortcut(ReturnKey);
+ next_btn->add_shortcut(KeypadEnter);
+ next_btn->callback(search_cb, this);
+ next_btn->clear_tab_to_focus();
+
+ check_btn = new CheckButton(x, border, 2*button_width, height,
+ "Case-sensitive");
+ check_btn->clear_tab_to_focus();
x += 2 * button_width + gap;
end();
diff --git a/src/findbar.hh b/src/findbar.hh
index b5591889..1e8c8d66 100644
--- a/src/findbar.hh
+++ b/src/findbar.hh
@@ -15,12 +15,11 @@ using namespace fltk;
* Searchbar to find text in page.
*/
class Findbar : public Group {
- HighlightButton *findb;
Button *clrb;
- HighlightButton *hidebutton;
+ HighlightButton *hide_btn, *next_btn;
+ CheckButton *check_btn;
xpmImage *hideImg;
Input *i;
- CheckButton *cb;
static void search_cb (Widget *, void *);
static void search_cb2 (Widget *, void *);