This service will be undergoing non-disruptive maintenance at 07:20 UTC, 2018-12-14. It is expected to last approximately 30 minutes
Bug 52394 - strange behavior of <up>/<down> keys in listboxes
Summary: strange behavior of <up>/<down> keys in listboxes
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: anaconda (Show other bugs)
(Show other bugs)
Version: 7.3
Hardware: i386 Linux
Target Milestone: ---
Assignee: Matt Wilson
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2001-08-23 14:54 UTC by Enrico Scholz
Modified: 2007-04-18 16:36 UTC (History)
1 user (show)

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

Attachments (Terms of Use)

Description Enrico Scholz 2001-08-23 14:54:13 UTC
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 19:19:38 UTC
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 20:26:47 UTC
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 21:11:54 UTC
---	2001/08/07 15:42:06	1.19
+++	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 21:15:33 UTC
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.