diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2011-08-01 11:30:28 -0400 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2011-08-01 11:30:28 -0400 |
commit | d1342e1d461b0001f5154c3c95fcc116a2451f50 (patch) | |
tree | 45804fc5aca0100e435fffdd743775cd10bd8307 /src/findbar.cc | |
parent | 80326c4d504759a206682d70f4f886f465b2d320 (diff) |
Re-enabled the temoporary panels feature for Ctrl+l
It has lots of code cleanups and a simpler/more-uniform way of handling it all.
Diffstat (limited to 'src/findbar.cc')
-rw-r--r-- | src/findbar.cc | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/src/findbar.cc b/src/findbar.cc index 4c881755..dcb9db53 100644 --- a/src/findbar.cc +++ b/src/findbar.cc @@ -97,7 +97,7 @@ void Findbar::searchBackwards_cb(Fl_Widget *, void *vfb) */ void Findbar::hide_cb(Fl_Widget *, void *vfb) { - ((Findbar *)vfb)->hide(); + a_UIcmd_findbar_toggle(a_UIcmd_get_bw_by_widget(vfb), 0); } /* @@ -175,19 +175,15 @@ Findbar::~Findbar() */ int Findbar::handle(int event) { - int ret = 0; int k = Fl::event_key(); unsigned modifier = Fl::event_state() & (FL_SHIFT| FL_CTRL| FL_ALT|FL_META); if (event == FL_KEYBOARD && modifier == 0 && k == FL_Escape) { - hide(); - ret = 1; + /* let the UI handle it */ + return 0; } - if (ret == 0) - ret = Fl_Group::handle(event); - - return ret; + return Fl_Group::handle(event); } /* @@ -199,7 +195,6 @@ void Findbar::show() dReturn_if (bw == NULL); // It takes more than just calling show() to do the trick - //a_UIcmd_findbar_toggle(bw, 1); Fl_Group::show(); /* select text even if already focused */ @@ -207,18 +202,3 @@ void Findbar::show() i->position(i->size(), 0); } -/* - * Hide the findbar and reset the search state - */ -void Findbar::hide() -{ - BrowserWindow *bw = a_UIcmd_get_bw_by_widget(this); - dReturn_if (bw == NULL); - - // It takes more than just calling hide() to do the trick - Fl_Group::hide(); - a_UIcmd_findbar_toggle(bw, 0); - - a_UIcmd_findtext_reset(bw); - a_UIcmd_focus_main_area(bw); -} |