Merge lp:~evfool/midori/lp1170850 into lp:midori
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Cris Dywan | ||||
Approved revision: | 6557 | ||||
Merged at revision: | 6563 | ||||
Proposed branch: | lp:~evfool/midori/lp1170850 | ||||
Merge into: | lp:midori | ||||
Diff against target: |
149 lines (+30/-12) 5 files modified
midori/midori-completion.vala (+25/-8) midori/midori-historycompletion.vala (+1/-1) midori/midori-locationaction.c (+2/-2) midori/midori-searchcompletion.vala (+1/-0) midori/midori-viewcompletion.vala (+1/-1) |
||||
To merge this branch: | bzr merge lp:~evfool/midori/lp1170850 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Cris Dywan | Approve | ||
Review via email:
|
Commit message
Display locationbar suggestions in the correct order
Description of the change
Copied from the commit message:
Display locationbar suggestions in the correct order (lp:1170850)
This consists of the following changes:
* Add a priority property to the suggestion objects, initialized to the
position of the parent completion item
* When adding the results of an async call of a completion to get the
suggestions, find the index of the last item with higher priority, and
add the new suggestions after that.
This is required, as the current async loading order can not guarantee
that the suggestions will appear in the correct order, as it depends
on the execution time of the completion loading, when suggestions of a
specific completion will be added. Calculating the start index based on
the position of the completion in itself, as we would also need to know
how many items the other completions (appearing before this one) will add.
I'm liking this priority concept! Just two comments here:
Might it have been simpler to use the List instead of TreeModelForeac hFunc? Though no strong opinion, it looks sensible just unexpected.
One thing I do find awkward is adding the position to every Suggestion - there's nothing useful to do with it for a Completion subclass. Given that Autocompleter gets one complete List<Suggestion> always and knows where it comes from I'd prefer it to handle this behind the scenes.