Bug 5173

Summary: HildonPickerDialog selects the first item always if appended into shown widget
Product: [Maemo Official Platform] Desktop platform Reporter: Henrik Hedberg <hhedberg>
Component: hildon-widgetsAssignee: Alberto Garcia Gonzalez <agarcia>
Status: RESOLVED FIXED QA Contact: hildon-libs-bugs
Severity: normal    
Priority: Low CC: agarcia, andre_klapper
Version: 5.0-beta2   
Target Milestone: 5.0/(10.2010.19-1)   
Hardware: All   
OS: Linux   
Attachments: Testcase

Description Henrik Hedberg (reporter) 2009-09-22 14:06:55 UTC
SOFTWARE VERSION:
1.2009.38-13 and Fremantle SDK beta 2

STEPS TO REPRODUCE THE PROBLEM:
1. Download the attached test application.
2. Compile it: gcc -o hpdtest hpdtest.c $(pkg-config --cflags --libs hildon-1)
3. Execute it: run-standalone ./hpdtest

EXPECTED OUTCOME:
After two seconds, an user should be able to select one of the available three
choices.

ACTUAL OUTCOME:
The dialog selects the first choice always without even displaying the choices.

REPRODUCIBILITY:
always

EXTRA SOFTWARE INSTALLED:

OTHER COMMENTS:
The problem is:
- If the HildonPickerDialog (and thus, HildonTouchSelector) is shown without
items
- the first item that is appended while the dialog being visible
- is selected always.

There are cases when HildonPickerDialog should be able to be filled after it
has been shown. For example, when the data is read from external source. The
current implementation always selects the first option, if HildonPickerDialog
is visible when the first item is appended into the model.
Comment 1 Henrik Hedberg (reporter) 2009-09-22 14:07:36 UTC
Created an attachment (id=1374) [details]
Testcase
Comment 2 Alberto Garcia Gonzalez 2010-02-03 10:53:57 UTC
Sorry, I overlooked this bug, I'll take a look at it as soon as possible
Comment 3 Alberto Garcia Gonzalez 2010-02-03 11:39:18 UTC
Confirmed, this is indeed an ugly bug.

The good news is that it was fixed by this commit:

http://maemo.gitorious.org/hildon/hildon/commit/8fea4c4c320f52c7c1cb5cda381e41a22b542695

The fix was released in libhildon 2.2.4, so it will be available in
the next Maemo update.

(It almost made it into the current 2009.51-1 release, which comes
with libhildon 2.2.3)
Comment 4 Andre Klapper maemo.org 2010-03-15 20:53:33 UTC
Setting explicit PR1.2 milestone (so it's clearer in which public release the
fix will be available to users).

Sorry for the bugmail noise (you can filter on this message).