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
=== modified file 'bin/ubuntuone-preferences'
--- bin/ubuntuone-preferences 2010-04-19 14:37:13 +0000
+++ bin/ubuntuone-preferences 2010-04-21 19:23:15 +0000
@@ -301,11 +301,15 @@
301 """301 """
302 logger.error(msg)302 logger.error(msg)
303 dialog = gtk.MessageDialog(self.get_toplevel(),303 dialog = gtk.MessageDialog(self.get_toplevel(),
304 gtk.DIALOG_DESTROY_WITH_PARENT | gtk.MODAL,304 gtk.DIALOG_DESTROY_WITH_PARENT |
305 gtk.DIALOG_MODAL,
305 gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE,306 gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE,
306 'Error')307 'Error')
307 dialog.format_secondary_text(str(msg))308 dialog.format_secondary_text(str(msg))
308 dialog.run()309 try:
310 dialog.run()
311 finally:
312 dialog.destroy()
309 while gtk.events_pending():313 while gtk.events_pending():
310 gtk.main_iteration()314 gtk.main_iteration()
311315

Subscribers

People subscribed via source and target branches