Merge lp:~gary-lasker/software-center/fix-crash-lp970157 into lp:software-center

Proposed by Gary Lasker
Status: Merged
Merged at revision: 2949
Proposed branch: lp:~gary-lasker/software-center/fix-crash-lp970157
Merge into: lp:software-center
Diff against target: 16 lines (+4/-2)
1 file modified
softwarecenter/ui/gtk3/panes/installedpane.py (+4/-2)
To merge this branch: bzr merge lp:~gary-lasker/software-center/fix-crash-lp970157
Reviewer Review Type Date Requested Status
Michael Vogt Approve
Review via email: mp+101158@code.launchpad.net

Description of the change

Small fix for a crash that can happen during the installed view treeview initialization. There should be no side effects from this fix as even if the vadustment value is None, with this fix the scroll will be set at the top, right where it should be for initialization anyway.

To post a comment you must log in.
Michael Vogt (mvo) wrote :

Thanks, looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'softwarecenter/ui/gtk3/panes/installedpane.py'
2--- softwarecenter/ui/gtk3/panes/installedpane.py 2012-04-04 16:03:25 +0000
3+++ softwarecenter/ui/gtk3/panes/installedpane.py 2012-04-06 22:51:20 +0000
4@@ -340,8 +340,10 @@
5 for ind in expanded_rows:
6 path = Gtk.TreePath.new_from_string(ind)
7 self.app_view.tree_view.expand_row(path, False)
8- self.app_view.tree_view_scroll.get_vadjustment().set_lower(vadj)
9- self.app_view.tree_view_scroll.get_vadjustment().set_value(vadj)
10+ va = self.app_view.tree_view_scroll.get_vadjustment()
11+ if va:
12+ va.set_lower(vadj)
13+ va.set_value(vadj)
14
15 #~ @interrupt_build_and_wait
16 def _build_categorised_installedview(self, keep_state=False):

Subscribers

People subscribed via source and target branches