Merge lp:~dobey/ubuntuone-client/error-dialog-errors into lp:ubuntuone-client

Proposed by dobey
Status: Merged
Approved by: Rick McBride
Approved revision: 508
Merged at revision: not available
Proposed branch: lp:~dobey/ubuntuone-client/error-dialog-errors
Merge into: lp:ubuntuone-client
Diff against target: 20 lines (+6/-2)
1 file modified
bin/ubuntuone-preferences (+6/-2)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client/error-dialog-errors
Reviewer Review Type Date Requested Status
Rick McBride (community) Approve
John Lenton (community) Approve
Review via email: mp+23871@code.launchpad.net

Commit message

Use the correct MODAL flag to avoid AttributeError
Use a try/finally to destroy the dialog when closed

To post a comment you must log in.
Revision history for this message
John Lenton (chipaca) wrote :

 review approve

review: Approve
Revision history for this message
Rick McBride (rmcbride) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/ubuntuone-preferences'
2--- bin/ubuntuone-preferences 2010-04-19 14:37:13 +0000
3+++ bin/ubuntuone-preferences 2010-04-21 19:23:15 +0000
4@@ -301,11 +301,15 @@
5 """
6 logger.error(msg)
7 dialog = gtk.MessageDialog(self.get_toplevel(),
8- gtk.DIALOG_DESTROY_WITH_PARENT | gtk.MODAL,
9+ gtk.DIALOG_DESTROY_WITH_PARENT |
10+ gtk.DIALOG_MODAL,
11 gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE,
12 'Error')
13 dialog.format_secondary_text(str(msg))
14- dialog.run()
15+ try:
16+ dialog.run()
17+ finally:
18+ dialog.destroy()
19 while gtk.events_pending():
20 gtk.main_iteration()
21

Subscribers

People subscribed via source and target branches