Merge lp:~jtatum/ubuntuone-client/bug-465030 into lp:ubuntuone-client

Proposed by James Tatum
Status: Merged
Approved by: Joshua Blount
Approved revision: 275
Merged at revision: not available
Proposed branch: lp:~jtatum/ubuntuone-client/bug-465030
Merge into: lp:ubuntuone-client
Diff against target: 17 lines (+3/-0)
1 file modified
bin/ubuntuone-client-preferences (+3/-0)
To merge this branch: bzr merge lp:~jtatum/ubuntuone-client/bug-465030
Reviewer Review Type Date Requested Status
Joshua Blount (community) Approve
Vincenzo Di Somma (community) Approve
Rick McBride (community) Approve
Review via email: mp+14526@code.launchpad.net

Commit message

Update bandwidth controls on init with values from dbus

To post a comment you must log in.
Revision history for this message
James Tatum (jtatum) wrote :

The bandwidth settings in the preferences window do not appear to be saved. On closer examination, they were being retrieved correctly but only the internal state was being updated with the values. The controls were not being set. Added a bit of code to set the controls accordingly.

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

This looks great! behaves as described. There's some discussion on the behavior of value '0', but that doesn't have any real bearing on this fix. If that value needs to be "handled" it is a seperate issue from the save/retrieve problem.

review: Approve
Revision history for this message
Vincenzo Di Somma (vds) wrote :

Looks good!

review: Approve
Revision history for this message
Joshua Blount (jblount) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/ubuntuone-client-preferences'
2--- bin/ubuntuone-client-preferences 2009-10-08 18:57:48 +0000
3+++ bin/ubuntuone-client-preferences 2009-11-06 04:50:22 +0000
4@@ -144,10 +144,13 @@
5 """Got the throttling limits."""
6 self.up_limit = int(limits['upload'])
7 self.dn_limit = int(limits['download'])
8+ self.up_spin.set_value(self.up_limit / 1024)
9+ self.dn_spin.set_value(self.dn_limit / 1024)
10
11 def __got_enabled(self, enabled):
12 """Got the throttling enabled config."""
13 self.bw_enabled = bool(enabled)
14+ self.limit_check.set_active(self.bw_enabled)
15
16 def __update_bw_settings(self):
17 """Update the bandwidth throttling config in syncdaemon."""

Subscribers

People subscribed via source and target branches