[perl-Glib-Object-Introspection] perli11ndoc: make Control+k focus the search entry



commit 814eb1eb894c29af753389180a3751104911c5b8
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Tue Sep 8 12:08:51 2015 +0200

    perli11ndoc: make Control+k focus the search entry

 bin/perli11ndoc |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/bin/perli11ndoc b/bin/perli11ndoc
index f1ee2de..e8a89a5 100755
--- a/bin/perli11ndoc
+++ b/bin/perli11ndoc
@@ -1173,8 +1173,14 @@ sub new {
   $window->set_default_geometry (800, 800);
 
   my $accel_group = Gtk3::AccelGroup->new;
-  $accel_group->connect (Gtk3::Gdk::KEY_q (), qw/control-mask/, [],
-                         sub { $self->quit; });
+  $accel_group->connect (Gtk3::Gdk::KEY_q (), qw/control-mask/, [], sub {
+    $self->quit;
+    return Gtk3::EVENT_STOP ();
+  });
+  $accel_group->connect (Gtk3::Gdk::KEY_k (), qw/control-mask/, [], sub {
+    $self->{search_entry}->grab_focus;
+    return Gtk3::EVENT_STOP ();
+  });
   $window->add_accel_group ($accel_group);
 
   $self->{window} = $window;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]