Merge lp:~diegosarmentero/ubuntuone-control-panel/quota-warning into lp:ubuntuone-control-panel
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Natalia Bidart on 2012-02-17 | ||||
| Approved revision: | 264 | ||||
| Merged at revision: | 262 | ||||
| Proposed branch: | lp:~diegosarmentero/ubuntuone-control-panel/quota-warning | ||||
| Merge into: | lp:ubuntuone-control-panel | ||||
| Diff against target: |
214 lines (+102/-28) 4 files modified
ubuntuone/controlpanel/gui/__init__.py (+16/-4) ubuntuone/controlpanel/gui/qt/controlpanel.py (+9/-20) ubuntuone/controlpanel/gui/qt/tests/test_controlpanel.py (+2/-4) ubuntuone/controlpanel/gui/tests/test_show_quota_warning.py (+75/-0) |
||||
| To merge this branch: | bzr merge lp:~diegosarmentero/ubuntuone-control-panel/quota-warning | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Natalia Bidart | Approve on 2012-02-17 | ||
| Roberto Alsina (community) | 2012-01-31 | Approve on 2012-02-01 | |
|
Review via email:
|
|||
Commit Message
- Control Panel shows quota in red with more accuracy depending on the free space (LP: #901314).
Description of the Change
Change the actual implementation to not be based in percentage, but instead in some fix sizes.
For Free accounts:
- Show warning when the available quota is 500mb or less
For Pay accounts:
- Show warning when the available quota is 3gb or less
- 256. By Manuel de la Peña on 2012-02-01
-
Forward extra params to u1trial.
| Natalia Bidart (nataliabidart) wrote : | # |
Branch looks great.
Can you please do the whole quota-highlight calculation using bytes, to ease the understanding of the code?
Thanks!
| Diego Sarmentero (diegosarmentero) wrote : | # |
> Branch looks great.
>
> Can you please do the whole quota-highlight calculation using bytes, to ease
> the understanding of the code?
>
> Thanks!
Done!
- 257. By Natalia Bidart on 2012-02-07
-
- Avoid TypeError when fetching credentials in the Gtk OverviewPanel
(LP: #927743).
- Run the whole test suite with a single command (LP: #927770).
- Do proper cleanup when dealing with UIs (LP: #925617). - 258. By Natalia Bidart on 2012-02-08
-
- Replaced custom webclient with the one from ubuntu-sso-client
(LP: #926311).
- Removed the dependency on qt4reactor for Linux implementation. - 259. By Natalia Bidart on 2012-02-10
-
- Install the uniqueapp module (LP: #930269).
- 260. By Diego Sarmentero on 2012-02-17
-
Conflict resolved
| Natalia Bidart (nataliabidart) wrote : | # |
The following method does not indent the multiline guard properly. I would advice something like:
def show_quota_
"""Return True if the user should be warn about the remaining quota."""
available = (int_bytes_total - int_bytes_used)
free_threshold = (int_bytes_total == FREE_ACCOUNT_SIZE and
payed_threshold = (int_bytes_total > FREE_ACCOUNT_SIZE and
return free_threshold or payed_threshold
For the constants about quota, I would change these:
1 +FREE_ACCOUNT_SIZE = 5368709120
27 +QUOTA_
to be:
The rest looks good!
- 261. By Diego Sarmentero on 2012-02-17
-
reverting red constant to unicode
- 262. By Diego Sarmentero on 2012-02-17
-
Improving quota sizes readability
- 263. By Diego Sarmentero on 2012-02-17
-
Changes in the way the boolean value is calculated in show_quota_warning.
- 264. By Diego Sarmentero on 2012-02-17
-
Removing duplicated quota_threshold


I like this better.