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
=== modified file 'data/qt/preferences.ui'
--- data/qt/preferences.ui 2012-03-22 16:44:35 +0000
+++ data/qt/preferences.ui 2012-05-15 14:16:22 +0000
@@ -38,6 +38,9 @@
38 </item>38 </item>
39 <item row="0" column="1">39 <item row="0" column="1">
40 <widget class="QSpinBox" name="upload_speed_spinbox">40 <widget class="QSpinBox" name="upload_speed_spinbox">
41 <property name="alignment">
42 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
43 </property>
41 <property name="minimum">44 <property name="minimum">
42 <number>-1</number>45 <number>-1</number>
43 </property>46 </property>
@@ -46,13 +49,6 @@
46 </property>49 </property>
47 </widget>50 </widget>
48 </item>51 </item>
49 <item row="0" column="2">
50 <widget class="QLabel" name="kbps_label_1">
51 <property name="text">
52 <string notr="true">Kilobits per second</string>
53 </property>
54 </widget>
55 </item>
56 <item row="0" column="3">52 <item row="0" column="3">
57 <spacer name="horizontalSpacer_2">53 <spacer name="horizontalSpacer_2">
58 <property name="orientation">54 <property name="orientation">
@@ -75,6 +71,9 @@
75 </item>71 </item>
76 <item row="1" column="1">72 <item row="1" column="1">
77 <widget class="QSpinBox" name="download_speed_spinbox">73 <widget class="QSpinBox" name="download_speed_spinbox">
74 <property name="alignment">
75 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
76 </property>
78 <property name="minimum">77 <property name="minimum">
79 <number>-1</number>78 <number>-1</number>
80 </property>79 </property>
@@ -83,13 +82,6 @@
83 </property>82 </property>
84 </widget>83 </widget>
85 </item>84 </item>
86 <item row="1" column="2">
87 <widget class="QLabel" name="kbps_label_2">
88 <property name="text">
89 <string notr="true">Kilobits per second</string>
90 </property>
91 </widget>
92 </item>
93 <item row="2" column="0">85 <item row="2" column="0">
94 <spacer name="verticalSpacer_2">86 <spacer name="verticalSpacer_2">
95 <property name="orientation">87 <property name="orientation">
9688
=== modified file 'ubuntuone/controlpanel/gui/__init__.py'
--- ubuntuone/controlpanel/gui/__init__.py 2012-05-14 16:20:45 +0000
+++ ubuntuone/controlpanel/gui/__init__.py 2012-05-15 14:16:22 +0000
@@ -231,7 +231,7 @@
231SETTINGS_CHANGE_ERROR = _('The settings could not be changed,\n'231SETTINGS_CHANGE_ERROR = _('The settings could not be changed,\n'
232 'previous values were restored.')232 'previous values were restored.')
233SETTINGS_FILE_SYNC = _('File Sync Settings')233SETTINGS_FILE_SYNC = _('File Sync Settings')
234SETTINGS_KILOBITS_PER_SECOND = _('Kilobits per second')234SETTINGS_KILOBITS_PER_SECOND = _('KiB/s')
235SETTINGS_LIMIT_DOWNLOAD = _('Limit download speed to')235SETTINGS_LIMIT_DOWNLOAD = _('Limit download speed to')
236SETTINGS_LIMIT_UPLOAD = _('Limit upload speed to')236SETTINGS_LIMIT_UPLOAD = _('Limit upload speed to')
237SETTINGS_SYNC_ALL_FOLDERS = _('Automatically sync all new cloud folders '237SETTINGS_SYNC_ALL_FOLDERS = _('Automatically sync all new cloud folders '
238238
=== modified file 'ubuntuone/controlpanel/gui/qt/preferences.py'
--- ubuntuone/controlpanel/gui/qt/preferences.py 2012-04-17 18:08:45 +0000
+++ ubuntuone/controlpanel/gui/qt/preferences.py 2012-05-15 14:16:22 +0000
@@ -83,8 +83,10 @@
83 self.ui.apply_changes_button.setText(SETTINGS_BUTTON_APPLY)83 self.ui.apply_changes_button.setText(SETTINGS_BUTTON_APPLY)
84 self.ui.bandwidth_settings.setTitle(SETTINGS_BANDWIDTH)84 self.ui.bandwidth_settings.setTitle(SETTINGS_BANDWIDTH)
85 self.ui.file_sync_settings.setTitle(SETTINGS_FILE_SYNC)85 self.ui.file_sync_settings.setTitle(SETTINGS_FILE_SYNC)
86 self.ui.kbps_label_1.setText(SETTINGS_KILOBITS_PER_SECOND)86 self.ui.upload_speed_spinbox.setSuffix(" " +
87 self.ui.kbps_label_2.setText(SETTINGS_KILOBITS_PER_SECOND)87 SETTINGS_KILOBITS_PER_SECOND)
88 self.ui.download_speed_spinbox.setSuffix(" " +
89 SETTINGS_KILOBITS_PER_SECOND)
88 self.ui.label_2.setText(SETTINGS_BANDWIDTH_ZERO_WARNING)90 self.ui.label_2.setText(SETTINGS_BANDWIDTH_ZERO_WARNING)
89 self.ui.restore_defaults_button.setText(SETTINGS_BUTTON_DEFAULT)91 self.ui.restore_defaults_button.setText(SETTINGS_BUTTON_DEFAULT)
9092
@@ -188,8 +190,7 @@
188 def resizeEvent(self, event):190 def resizeEvent(self, event):
189 super(PreferencesPanel, self).resizeEvent(event)191 super(PreferencesPanel, self).resizeEvent(event)
190 size_bandwidth = (self.ui.bandwidth_settings.width() -192 size_bandwidth = (self.ui.bandwidth_settings.width() -
191 self.ui.upload_speed_spinbox.width() -193 self.ui.upload_speed_spinbox.width())
192 self.ui.kbps_label_1.width())
193 padding = 160 # Padding to allow shrinking194 padding = 160 # Padding to allow shrinking
194 size_sync = (self.ui.file_sync_settings.width() - padding)195 size_sync = (self.ui.file_sync_settings.width() - padding)
195 force_wordwrap(self.ui.limit_uploads_checkbox, size_bandwidth,196 force_wordwrap(self.ui.limit_uploads_checkbox, size_bandwidth,
196197
=== modified file 'ubuntuone/controlpanel/gui/qt/tests/test_preferences.py'
--- ubuntuone/controlpanel/gui/qt/tests/test_preferences.py 2012-04-17 18:08:45 +0000
+++ ubuntuone/controlpanel/gui/qt/tests/test_preferences.py 2012-05-15 14:16:22 +0000
@@ -308,8 +308,7 @@
308 wrap_calls, check, (size, text)))308 wrap_calls, check, (size, text)))
309 self.ui.setFixedWidth(1000)309 self.ui.setFixedWidth(1000)
310 size_bandwidth = (self.ui.ui.bandwidth_settings.width() -310 size_bandwidth = (self.ui.ui.bandwidth_settings.width() -
311 self.ui.ui.upload_speed_spinbox.width() -311 self.ui.ui.upload_speed_spinbox.width())
312 self.ui.ui.kbps_label_1.width())
313 padding = 160 # Left and Right Padding312 padding = 160 # Left and Right Padding
314 size_sync = (self.ui.ui.file_sync_settings.width() - padding)313 size_sync = (self.ui.ui.file_sync_settings.width() - padding)
315 self.ui.show()314 self.ui.show()

Subscribers

People subscribed via source and target branches