Merge lp:~dobey/ubuntuone-client/fix-553318 into lp:ubuntuone-client

Proposed by dobey
Status: Merged
Approved by: Natalia Bidart
Approved revision: 473
Merged at revision: not available
Proposed branch: lp:~dobey/ubuntuone-client/fix-553318
Merge into: lp:ubuntuone-client
Diff against target: 30 lines (+4/-2)
1 file modified
bin/ubuntuone-preferences (+4/-2)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client/fix-553318
Reviewer Review Type Date Requested Status
Natalia Bidart (community) Approve
John O'Brien (community) Approve
Review via email: mp+22642@code.launchpad.net

Commit message

Call main_quit in a timeout, so the handle_bw_controls_changed timeout doesn't
  get ignored when closing the dialog

To post a comment you must log in.
Revision history for this message
John O'Brien (jdobrien) :
review: Approve
473. By dobey

Always list devices to avoid AttributeError if closed before devices found
Only present the window if it's visible, to avoid showing the closed dialog

Revision history for this message
Natalia Bidart (nataliabidart) :
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-01 17:22:13 +0000
3+++ bin/ubuntuone-preferences 2010-04-01 19:12:34 +0000
4@@ -597,7 +597,7 @@
5 """Handle the dialog's response."""
6 self.hide()
7 self.devices.handle_bw_controls_changed()
8- gtk.main_quit()
9+ gobject.timeout_add_seconds(5, gtk.main_quit)
10
11 def _format_for_gb_display(self, bytes):
12 """Format bytes into reasonable gb display."""
13@@ -957,6 +957,7 @@
14 sw.show()
15 self.devices = DevicesWidget(self.__bus, self.keyring)
16 sw.add_with_viewport(self.devices)
17+ self.devices.list_devices()
18 self.devices.show_all()
19
20 # Services tab
21@@ -1058,7 +1059,8 @@
22 self.dialog.request_quota_info()
23 self.dialog.request_account_info()
24 self.dialog.devices.get_devices()
25- self.dialog.present_with_time(int(time.time()))
26+ if self.dialog.visible:
27+ self.dialog.present_with_time(int(time.time()))
28
29 def got_newcredentials(self, realm, consumer_key):
30 """Show our dialog, since we can do stuff now."""

Subscribers

People subscribed via source and target branches