// reset the search engine
//printf("BC_ListBox::BC_ListBox 4\n");
+ show_query = 0;
reset_query();
//printf("BC_ListBox::BC_ListBox 5\n");
}
case NO_OPERATION:
// Show tooltip
- if(button_highlighted && is_popup && !tooltip_done &&
+ if(button_highlighted && is_popup &&
tooltip_text && tooltip_text[0] != 0 &&
duration == get_resources()->tooltip_delay)
{
show_tooltip();
- tooltip_done = 1;
return 1;
}
break;
int BC_ListBox::deactivate()
{
+ hide_tooltip();
// printf("BC_ListBox::deactivate %d this=%p gui=%p active=%d\n",
// __LINE__,
// this,
if( active || !is_popup || gui ) return 0;
if(w != -1) popup_w = w;
if(h != -1) popup_h = h;
+ reset_query();
active = 1;
if( y + popup_h > top_level->get_root_h(0) )
y -= get_h() + popup_h;
{
case ESC:
case RETURN:
- case BACKSPACE:
top_level->deactivate();
// If user is manipulating popup with keyboard, don't pass on event.
if(query_len > 0) query[--query_len] = 0;
new_selection = query_list();
}
-
+ if( show_query ) {
+ if( query_len > 0 )
+ show_tooltip(query);
+ else
+ hide_tooltip();
+ }
redraw = 1;
result = 1;
}