changeset 1906:3d4b69d3eee7

findbar activation the Fl_Input would eat the shift-enter keypress, meaning that the Previous button never got its shortcut.
author corvid <corvid@lavabit.com>
date Fri, 18 Feb 2011 02:06:35 +0000
parents 370e97c9f39b
children 5f92140e4bce
files src/findbar.cc src/findbar.hh
diffstat 2 files changed, 1 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/findbar.cc	Thu Feb 17 21:26:04 2011 +0100
+++ b/src/findbar.cc	Fri Feb 18 02:06:35 2011 +0000
@@ -82,19 +82,6 @@
 }
 
 /*
- * Find next occurrence of input key
- */
-void Findbar::search_cb2(Fl_Widget *widget, void *vfb)
-{
-   /*
-    * Somehow fltk even regards the first loss of focus for the
-    * window as a WHEN_ENTER_KEY_ALWAYS event.
-    */
-   if (Fl::event_key() == FL_Enter)
-      search_cb(widget, vfb);
-}
-
-/*
  * Hide the search bar
  */
 void Findbar::hide_cb(Fl_Widget *, void *vfb)
@@ -133,8 +120,7 @@
     x += input_width + gap;
     resizable(i);
     i->color(206);
-    i->when(FL_WHEN_ENTER_KEY_ALWAYS);
-    i->callback(search_cb2, this);
+    i->when(FL_WHEN_NEVER);
    add(i);
 
     next_btn = new Fl_Button(x, border, button_width, height, "Next");
--- a/src/findbar.hh	Thu Feb 17 21:26:04 2011 +0100
+++ b/src/findbar.hh	Fri Feb 18 02:06:35 2011 +0000
@@ -20,7 +20,6 @@
 
    static void search_cb (Fl_Widget *, void *);
    static void searchBackwards_cb (Fl_Widget *, void *);
-   static void search_cb2 (Fl_Widget *, void *);
    static void hide_cb (Fl_Widget *, void *);
 
 public: