Merge lp:~evfool/software-center/fixnavigation into lp:software-center

Proposed by Robert Roth
Status: Merged
Merged at revision: 1874
Proposed branch: lp:~evfool/software-center/fixnavigation
Merge into: lp:software-center
Diff against target: 22 lines (+4/-1)
1 file modified
softwarecenter/ui/gtk/navhistory.py (+4/-1)
To merge this branch: bzr merge lp:~evfool/software-center/fixnavigation
Reviewer Review Type Date Requested Status
Gary Lasker (community) Approve
Review via email: mp+65769@code.launchpad.net

Description of the change

As using the search terms did update the search terms for the category pathbutton in this case, thus resulting in wrong navigation item. The fix restricts the updating search terms functionality to Search pathbar elements only, this way we won't have search terms stored in non-search pathbar elements, which seems to be the expected behavior.

To post a comment you must log in.
Revision history for this message
Gary Lasker (gary-lasker) wrote :

Nice fix, thanks Robert!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'softwarecenter/ui/gtk/navhistory.py'
2--- softwarecenter/ui/gtk/navhistory.py 2011-05-17 08:02:58 +0000
3+++ softwarecenter/ui/gtk/navhistory.py 2011-06-24 08:07:27 +0000
4@@ -19,6 +19,7 @@
5 import gobject
6 import logging
7
8+from softwarecenter.enums import NavButtons
9 from softwarecenter.utils import unescape
10
11 # FIXME: sucks, move elsewhere
12@@ -99,7 +100,9 @@
13 """
14 The search terms changed, track them in the current navigation item
15 """
16- self._nav_stack[self._nav_stack.cursor].apps_search_term = terms
17+ # only track search term changes in search pathbar items (lp: #801114)
18+ if self._nav_stack[self._nav_stack.cursor].parts[-1].get_name() == NavButtons.SEARCH:
19+ self._nav_stack[self._nav_stack.cursor].apps_search_term = terms
20
21 def reset(self):
22 """