public void HandleKeyPressEvent (object sender, Gtk.KeyPressEventArgs args)
{
bool ctrl = ModifierType.ControlMask == (args.Event.State & ModifierType.ControlMask);
if ((ctrl && args.Event.Key == Gdk.Key.F) || args.Event.Key == Gdk.Key.slash) {
if (!find_bar.Visible) {
if (query_widget.Visible) {
query_widget.Close ();
}
find_bar.ShowAll ();
}
// Grab the focus even if it's already shown
find_bar.Entry.GrabFocus ();
args.RetVal = true;
return;
}
args.RetVal = false;
}
}