Merge lp:~mvo/software-center/lp977889 into lp:software-center

Proposed by Michael Vogt on 2012-04-10
Status: Merged
Merged at revision: 2955
Proposed branch: lp:~mvo/software-center/lp977889
Merge into: lp:software-center
Diff against target: 37 lines (+9/-4)
1 file modified
softwarecenter/ui/gtk3/panes/availablepane.py (+9/-4)
To merge this branch: bzr merge lp:~mvo/software-center/lp977889
Reviewer Review Type Date Requested Status
Gary Lasker (community) 2012-04-10 Approve on 2012-04-10
Review via email: mp+101389@code.launchpad.net

Description of the change

This fixes the disappearing sort combobox described in bug #977889. To reproduce:

1. search "foo"
2. click on "back"
3. click on "more" in "What's New" in the lobby view
4. click on back
5. search "bar"

with trunk the sort combo is no longer there, with this branch is should be there.

To post a comment you must log in.
Gary Lasker (gary-lasker) wrote :

Does the trick perfectly, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'softwarecenter/ui/gtk3/panes/availablepane.py'
--- softwarecenter/ui/gtk3/panes/availablepane.py 2012-03-30 09:46:20 +0000
+++ softwarecenter/ui/gtk3/panes/availablepane.py 2012-04-10 15:01:24 +0000
@@ -500,6 +500,13 @@
500 iconnames.append(self.db.get_iconname(doc))500 iconnames.append(self.db.get_iconname(doc))
501 self.backend.install_multiple(apps, iconnames)501 self.backend.install_multiple(apps, iconnames)
502502
503 def _show_or_hide_search_combo_box(self, view_state):
504 # show/hide the sort combobox headers if the category forces a
505 # custom sort mode
506 category = view_state.category
507 allow_user_sort = category is None or not category.is_forced_sort_mode
508 self.app_view.set_allow_user_sorting(allow_user_sort)
509
503 def set_state(self, nav_item):510 def set_state(self, nav_item):
504 pass511 pass
505512
@@ -603,6 +610,7 @@
603610
604 header_strings = self._get_header_for_view_state(view_state)611 header_strings = self._get_header_for_view_state(view_state)
605 self.app_view.set_header_labels(*header_strings)612 self.app_view.set_header_labels(*header_strings)
613 self._show_or_hide_search_combo_box(view_state)
606614
607 self.app_view.vadj = view_state.vadjustment615 self.app_view.vadj = view_state.vadjustment
608616
@@ -631,10 +639,7 @@
631639
632 header_strings = self._get_header_for_view_state(view_state)640 header_strings = self._get_header_for_view_state(view_state)
633 self.app_view.set_header_labels(*header_strings)641 self.app_view.set_header_labels(*header_strings)
634 # hide the sort combobox headers if the category forces a642 self._show_or_hide_search_combo_box(view_state)
635 # custom sort mode
636 allow_user_sort = category is None or not category.is_forced_sort_mode
637 self.app_view.set_allow_user_sorting(allow_user_sort)
638643
639 if view_state.search_term:644 if view_state.search_term:
640 self._clear_search()645 self._clear_search()

Subscribers

People subscribed via source and target branches