Merge lp:~ralsina/ubuntuone-control-panel/kibblebits into lp:ubuntuone-control-panel

Proposed by Roberto Alsina
Status: Merged
Approved by: Alejandro J. Cura
Approved revision: 323
Merged at revision: 324
Proposed branch: lp:~ralsina/ubuntuone-control-panel/kibblebits
Merge into: lp:ubuntuone-control-panel
Diff against target: 105 lines (+13/-21)
4 files modified
data/qt/preferences.ui (+6/-14)
ubuntuone/controlpanel/gui/__init__.py (+1/-1)
ubuntuone/controlpanel/gui/qt/preferences.py (+5/-4)
ubuntuone/controlpanel/gui/qt/tests/test_preferences.py (+1/-2)
To merge this branch: bzr merge lp:~ralsina/ubuntuone-control-panel/kibblebits
Reviewer Review Type Date Requested Status
Alejandro J. Cura (community) Approve
Diego Sarmentero (community) Approve
Review via email: mp+105821@code.launchpad.net

Commit message

 - Replaced "Kilobits per second" labels with units in the spinboxes (Fixes lp:984484)

To post a comment you must log in.
Revision history for this message
Diego Sarmentero (diegosarmentero) wrote :

+1

review: Approve
Revision history for this message
Alejandro J. Cura (alecu) wrote :

Works as expected, tests pass, plus... it looks *much* nicer!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/qt/preferences.ui'
2--- data/qt/preferences.ui 2012-03-22 16:44:35 +0000
3+++ data/qt/preferences.ui 2012-05-15 14:16:22 +0000
4@@ -38,6 +38,9 @@
5 </item>
6 <item row="0" column="1">
7 <widget class="QSpinBox" name="upload_speed_spinbox">
8+ <property name="alignment">
9+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
10+ </property>
11 <property name="minimum">
12 <number>-1</number>
13 </property>
14@@ -46,13 +49,6 @@
15 </property>
16 </widget>
17 </item>
18- <item row="0" column="2">
19- <widget class="QLabel" name="kbps_label_1">
20- <property name="text">
21- <string notr="true">Kilobits per second</string>
22- </property>
23- </widget>
24- </item>
25 <item row="0" column="3">
26 <spacer name="horizontalSpacer_2">
27 <property name="orientation">
28@@ -75,6 +71,9 @@
29 </item>
30 <item row="1" column="1">
31 <widget class="QSpinBox" name="download_speed_spinbox">
32+ <property name="alignment">
33+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
34+ </property>
35 <property name="minimum">
36 <number>-1</number>
37 </property>
38@@ -83,13 +82,6 @@
39 </property>
40 </widget>
41 </item>
42- <item row="1" column="2">
43- <widget class="QLabel" name="kbps_label_2">
44- <property name="text">
45- <string notr="true">Kilobits per second</string>
46- </property>
47- </widget>
48- </item>
49 <item row="2" column="0">
50 <spacer name="verticalSpacer_2">
51 <property name="orientation">
52
53=== modified file 'ubuntuone/controlpanel/gui/__init__.py'
54--- ubuntuone/controlpanel/gui/__init__.py 2012-05-14 16:20:45 +0000
55+++ ubuntuone/controlpanel/gui/__init__.py 2012-05-15 14:16:22 +0000
56@@ -231,7 +231,7 @@
57 SETTINGS_CHANGE_ERROR = _('The settings could not be changed,\n'
58 'previous values were restored.')
59 SETTINGS_FILE_SYNC = _('File Sync Settings')
60-SETTINGS_KILOBITS_PER_SECOND = _('Kilobits per second')
61+SETTINGS_KILOBITS_PER_SECOND = _('KiB/s')
62 SETTINGS_LIMIT_DOWNLOAD = _('Limit download speed to')
63 SETTINGS_LIMIT_UPLOAD = _('Limit upload speed to')
64 SETTINGS_SYNC_ALL_FOLDERS = _('Automatically sync all new cloud folders '
65
66=== modified file 'ubuntuone/controlpanel/gui/qt/preferences.py'
67--- ubuntuone/controlpanel/gui/qt/preferences.py 2012-04-17 18:08:45 +0000
68+++ ubuntuone/controlpanel/gui/qt/preferences.py 2012-05-15 14:16:22 +0000
69@@ -83,8 +83,10 @@
70 self.ui.apply_changes_button.setText(SETTINGS_BUTTON_APPLY)
71 self.ui.bandwidth_settings.setTitle(SETTINGS_BANDWIDTH)
72 self.ui.file_sync_settings.setTitle(SETTINGS_FILE_SYNC)
73- self.ui.kbps_label_1.setText(SETTINGS_KILOBITS_PER_SECOND)
74- self.ui.kbps_label_2.setText(SETTINGS_KILOBITS_PER_SECOND)
75+ self.ui.upload_speed_spinbox.setSuffix(" " +
76+ SETTINGS_KILOBITS_PER_SECOND)
77+ self.ui.download_speed_spinbox.setSuffix(" " +
78+ SETTINGS_KILOBITS_PER_SECOND)
79 self.ui.label_2.setText(SETTINGS_BANDWIDTH_ZERO_WARNING)
80 self.ui.restore_defaults_button.setText(SETTINGS_BUTTON_DEFAULT)
81
82@@ -188,8 +190,7 @@
83 def resizeEvent(self, event):
84 super(PreferencesPanel, self).resizeEvent(event)
85 size_bandwidth = (self.ui.bandwidth_settings.width() -
86- self.ui.upload_speed_spinbox.width() -
87- self.ui.kbps_label_1.width())
88+ self.ui.upload_speed_spinbox.width())
89 padding = 160 # Padding to allow shrinking
90 size_sync = (self.ui.file_sync_settings.width() - padding)
91 force_wordwrap(self.ui.limit_uploads_checkbox, size_bandwidth,
92
93=== modified file 'ubuntuone/controlpanel/gui/qt/tests/test_preferences.py'
94--- ubuntuone/controlpanel/gui/qt/tests/test_preferences.py 2012-04-17 18:08:45 +0000
95+++ ubuntuone/controlpanel/gui/qt/tests/test_preferences.py 2012-05-15 14:16:22 +0000
96@@ -308,8 +308,7 @@
97 wrap_calls, check, (size, text)))
98 self.ui.setFixedWidth(1000)
99 size_bandwidth = (self.ui.ui.bandwidth_settings.width() -
100- self.ui.ui.upload_speed_spinbox.width() -
101- self.ui.ui.kbps_label_1.width())
102+ self.ui.ui.upload_speed_spinbox.width())
103 padding = 160 # Left and Right Padding
104 size_sync = (self.ui.ui.file_sync_settings.width() - padding)
105 self.ui.show()

Subscribers

People subscribed via source and target branches