diff options
author | corvid <corvid@lavabit.com> | 2011-01-23 23:28:22 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2011-01-23 23:28:22 +0000 |
commit | 0996de0d697c3b5baface97f05b18353f7f30d64 (patch) | |
tree | 6175c381024dc1adf25934fd40dd0f6b6b5d29cd /src | |
parent | 2411c95059cb0f26a4b38075916f597e7948eca2 (diff) |
prevent new Fl_Widgets from automatically being added to a Fl_Group
Diffstat (limited to 'src')
-rw-r--r-- | src/findbar.cc | 15 | ||||
-rw-r--r-- | src/uicmd.cc | 2 |
2 files changed, 12 insertions, 5 deletions
diff --git a/src/findbar.cc b/src/findbar.cc index dd792833..5dd45bd6 100644 --- a/src/findbar.cc +++ b/src/findbar.cc @@ -113,18 +113,21 @@ Findbar::Findbar(int width, int height) : int border = 2; int input_width = width - (2 * border + 4 * (button_width + gap)); int x = border; + + Fl_Group::current(0); + height -= 2 * border; box(FL_PLASTIC_UP_BOX); Fl_Group::hide(); - begin(); hide_btn = new Fl_Button(x, border, 16, height, 0); hideImg = new Fl_Pixmap(new_s_xpm); hide_btn->image(hideImg); x += 16 + gap; hide_btn->callback(hide_cb, this); hide_btn->clear_visible_focus(); + add(hide_btn); i = new MyInput(x, border, input_width, height); x += input_width + gap; @@ -132,25 +135,27 @@ Findbar::Findbar(int width, int height) : i->color(206); i->when(FL_WHEN_ENTER_KEY_ALWAYS); i->callback(search_cb2, this); + add(i); next_btn = new Fl_Button(x, border, button_width, height, "Next"); x += button_width + gap; next_btn->shortcut(FL_Enter); next_btn->callback(search_cb, this); next_btn->clear_visible_focus(); + add(next_btn); prev_btn= new Fl_Button(x, border, button_width, height, "Previous"); + x += button_width + gap; prev_btn->shortcut(FL_SHIFT+FL_Enter); prev_btn->callback(searchBackwards_cb, this); prev_btn->clear_visible_focus(); - x += button_width + gap; + add(prev_btn); check_btn = new Fl_Check_Button(x, border, 2*button_width, height, "Case-sensitive"); - check_btn->clear_visible_focus(); x += 2 * button_width + gap; - - end(); + check_btn->clear_visible_focus(); + add(check_btn); if (prefs.show_tooltip) { hide_btn->tooltip("Hide"); diff --git a/src/uicmd.cc b/src/uicmd.cc index 9122a105..04d1f0f6 100644 --- a/src/uicmd.cc +++ b/src/uicmd.cc @@ -232,6 +232,7 @@ class CustTabGroup : public Fl_Tabs { public: CustTabGroup (int x, int y, int ww, int wh, const char *lbl=0) : Fl_Tabs(x,y,ww,wh,lbl) { + Fl_Group::current(0); // The parameter pager is cloned, so free it. // CustShrinkTabPager *cp = new CustShrinkTabPager(); // this->pager(cp); @@ -427,6 +428,7 @@ BrowserWindow *a_UIcmd_browser_window_new(int ww, int wh, else win = new Fl_Double_Window(ww, wh); + Fl_Group::current(0); //may need a handler for this // win->shortcut(0); // Ignore Escape CustTabGroup *DilloTabs = new CustTabGroup(0, 0, ww, wh); |