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
=== modified file 'softwarecenter/ui/gtk/navhistory.py'
--- softwarecenter/ui/gtk/navhistory.py 2011-05-17 08:02:58 +0000
+++ softwarecenter/ui/gtk/navhistory.py 2011-06-24 08:07:27 +0000
@@ -19,6 +19,7 @@
19import gobject19import gobject
20import logging20import logging
2121
22from softwarecenter.enums import NavButtons
22from softwarecenter.utils import unescape23from softwarecenter.utils import unescape
2324
24# FIXME: sucks, move elsewhere25# FIXME: sucks, move elsewhere
@@ -99,7 +100,9 @@
99 """100 """
100 The search terms changed, track them in the current navigation item101 The search terms changed, track them in the current navigation item
101 """102 """
102 self._nav_stack[self._nav_stack.cursor].apps_search_term = terms103 # only track search term changes in search pathbar items (lp: #801114)
104 if self._nav_stack[self._nav_stack.cursor].parts[-1].get_name() == NavButtons.SEARCH:
105 self._nav_stack[self._nav_stack.cursor].apps_search_term = terms
103106
104 def reset(self):107 def reset(self):
105 """108 """