Bug 52394 - strange behavior of <up>/<down> keys in listboxes
strange behavior of <up>/<down> keys in listboxes
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: anaconda (Show other bugs)
7.3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Matt Wilson
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-08-23 10:54 EDT by Enrico Scholz
Modified: 2007-04-18 12:36 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-04-15 16:23:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Enrico Scholz 2001-08-23 10:54:13 EDT
When visiting a listbox the first time and pressing the <up> or <down> keys
the mark jumps to the beginning of the listbox.

E.g. at the "Language Selection" screen (first screen), "English" is
selected. Then press <TAB> until the listbox is activated. Now "Chinese
(Simplified)" is selected and <down> selects "Chinese (Traditional)", <up>
is not working.

The expected result would be the selection of "Czech" at <up> and "French"
at <down>.


All other listboxes are affected also and it's very annoying in these where
are a lot of possible selections (e.g. keyboard-type).
Comment 1 Brent Fox 2001-08-23 15:19:38 EDT
Owen, is this a GTK problem?  I don't think I have any control over the keyboard
navigation of the this widget, do I?
Comment 2 Owen Taylor 2001-08-23 16:26:47 EDT
Well, yes and no. The problem is that the selected row is different
from the focus row. There unfortunately is no easy way to move
the focus row. There are hacks to do this by emitting 
::scroll_vertical the right number of times, but I doubt you
can do this from Python.

GtkTreeView has gtk_tree_view_set_cursor() with both sets the cursor
row and selects it.
Comment 3 Matt Wilson 2001-08-23 17:11:54 EDT
--- language_gui.py	2001/08/07 15:42:06	1.19
+++ language_gui.py	2001/08/23 21:20:10
@@ -70,6 +70,14 @@
 
         if default > 0:
             self.language.select_row (default, 0)
+            row = self.language.focus_row
+            if row != default:
+                if row < default:
+                    step = SCROLL_STEP_FORWARD
+                else:
+                    step = SCROLL_STEP_BACKWARD
+                for i in range(abs(default - row)):
+                    self.language.emit("scroll_vertical", step, 0.5)
 
         sw = GtkScrolledWindow ()
         sw.set_border_width (5)

Comment 4 Matt Wilson 2001-08-23 17:15:33 EDT
When we move to GTK+2.0 we'll be using GtkListView and we'll fix this then.

Note You need to log in before you can comment on or make changes to this bug.