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

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

Description of the change

Fix an intermittent crash that can happen if the installed view pane has not been built yet when a call to show the spinner is made as a result of a refresh.

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks! Nice and clean.

review: Approve
Revision history for this message
Gary Lasker (gary-lasker) wrote :

Thanks for the review, Michael!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'softwarecenter/ui/gtk3/panes/installedpane.py'
--- softwarecenter/ui/gtk3/panes/installedpane.py 2012-02-28 13:51:20 +0000
+++ softwarecenter/ui/gtk3/panes/installedpane.py 2012-03-06 18:22:20 +0000
@@ -113,6 +113,8 @@
113 113
114 self.visible_docids = None114 self.visible_docids = None
115 self.visible_cats = {}115 self.visible_cats = {}
116
117 self.installed_spinner_notebook = None
116118
117 def init_view(self):119 def init_view(self):
118 if self.view_initialized: 120 if self.view_initialized:
@@ -215,11 +217,13 @@
215 217
216 def show_installed_view_spinner(self):218 def show_installed_view_spinner(self):
217 """ display the local spinner for the installed view panel """219 """ display the local spinner for the installed view panel """
218 self.installed_spinner_notebook.show_spinner()220 if self.installed_spinner_notebook:
221 self.installed_spinner_notebook.show_spinner()
219 222
220 def hide_installed_view_spinner(self):223 def hide_installed_view_spinner(self):
221 """ hide the local spinner for the installed view panel """224 """ hide the local spinner for the installed view panel """
222 self.installed_spinner_notebook.hide_spinner()225 if self.installed_spinner_notebook:
226 self.installed_spinner_notebook.hide_spinner()
223227
224 def _selected_computer_changed(self, oneconf_pickler, hostid, hostname):228 def _selected_computer_changed(self, oneconf_pickler, hostid, hostname):
225 if self.current_hostid == hostid:229 if self.current_hostid == hostid:

Subscribers

People subscribed via source and target branches