Merge lp:~gary-lasker/software-center/remember-sort-preference-lp966878 into lp:software-center
Proposed by
Gary Lasker
Status: | Merged |
---|---|
Merged at revision: | 2954 |
Proposed branch: | lp:~gary-lasker/software-center/remember-sort-preference-lp966878 |
Merge into: | lp:software-center |
Diff against target: |
41 lines (+5/-4) 3 files modified
softwarecenter/ui/gtk3/panes/availablepane.py (+1/-1) softwarecenter/ui/gtk3/panes/softwarepane.py (+4/-2) softwarecenter/ui/gtk3/views/appview.py (+0/-1) |
To merge this branch: | bzr merge lp:~gary-lasker/software-center/remember-sort-preference-lp966878 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Vogt | Approve | ||
Review via email: mp+101306@code.launchpad.net |
Description of the change
This is a fix for bug 966878. A simple fix to not reset the user's sorting preference if they have set one. We should respect the setting when moving around the UI, as we already do when searching in the categories screens. Please check bug 966878 for details and steps to reproduce.
Thanks!
To post a comment you must log in.
Thanks for your branch! I like the idea of going for a simple fix, unfortunately this seems to only
fix parts of the issue as e.g.:
- searching for "foo"
- change "by name"
- go back
- go a a category like "accessories" will sort by name, but the combo will show "by top rated"
(note that this is not a regression, but a different incarnation of the bug or a different bug that is very similar to this one).
As for the bit: self.get_ sort_mode( ), /ui/gtk3/ panes/available pane.py' ui/gtk3/ panes/available pane.py 2012-03-30 09:46:20 +0000 ui/gtk3/ panes/available pane.py 2012-04-10 09:37:54 +0000
self. refresh_ apps()
...
8 + sortmode=
...
I am not sure that this is needed, the name of the function is certainly very misleading, my suggestion would
be to do something like (suggestions for better names welcome of course):
=== modified file 'softwarecenter
--- softwarecenter/
+++ softwarecenter/
@@ -618,7 +618,7 @@
query = self.get_query() query(query) query_len( query)
self. subcategories_ view.set_ subcategory( category, n_matches)
- n_matches = self.quick_
+ n_matches = self.quick_
=== modified file 'softwarecenter /ui/gtk3/ panes/softwarep ane.py' ui/gtk3/ panes/softwarep ane.py 2012-04-04 14:40:09 +0000 ui/gtk3/ panes/softwarep ane.py 2012-04-10 09:34:25 +0000
self. show_appview_ spinner( )
self. _refresh_ apps_with_ apt_cache( query)
--- softwarecenter/
+++ softwarecenter/
@@ -431,7 +431,10 @@
- def quick_query(self, query): len(self, query): "enquirer. set_query( ) quick query"):
self. enquirer. set_query(
+ def quick_query_
+ """ do a blocking query that only returns the amount of
+ matches from this query
+ """
# a blocking query and does not emit "query-complete"
with ExecutionTime(
To make it clearer what its actually doing. So unless I miss something, the sort order should not
influence the amount of items returned, so it should be ok to omit it.