booh-classifier: handle home/end keys to navigate full left/right in the items
authorGuillaume Cottenceau <gcottenc@gmail.com>
Mon, 23 Feb 2009 14:04:23 +0000 (15:04 +0100)
committerGuillaume Cottenceau <gcottenc@gmail.com>
Mon, 23 Feb 2009 14:06:17 +0000 (15:06 +0100)
bin/booh-classifier

index b64e803..b6d4421 100755 (executable)
@@ -967,6 +967,16 @@ def thumbnail_keypressed(entry, event)
         elsif event.keyval == Gdk::Keyval::GDK_Return
             view_entry(entry)
 
+        elsif event.keyval == Gdk::Keyval::GDK_Home
+            if $allentries[0] && $allentries[0].button
+                $allentries[0].button.grab_focus
+            end
+
+        elsif event.keyval == Gdk::Keyval::GDK_End
+            if $allentries[-1] && $allentries[-1].button
+                $allentries[-1].button.grab_focus
+            end
+
         else
             char = [ Gdk::Keyval.to_unicode(event.keyval) ].pack("C*")
             if char =~ /^[a-zA-z0-9]$/