Bug 52394

Summary: strange behavior of <up>/<down> keys in listboxes
Product: [Retired] Red Hat Linux Reporter: Enrico Scholz <rh-bugzilla>
Component: anacondaAssignee: Matt Wilson <msw>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: otaylor
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-04-15 20:23:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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
--- 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 21:15:33 UTC
When we move to GTK+2.0 we'll be using GtkListView and we'll fix this then.