~dobey/ubuntuone-control-panel/use-dirspec

« back to all changes in this revision

Viewing changes to ubuntuone/controlpanel/gui/qt/preferences.py

  • Committer: Tarmac
  • Author(s): Roberto Alsina
  • Date: 2012-05-15 15:31:32 UTC
  • mfrom: (322.1.1 kibblebytes)
  • Revision ID: tarmac-20120515153132-elyw1mkygu25sc2p
 - Replaced "Kilobits per second" labels with units in the spinboxes (Fixes lp:984484)

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
        self.ui.apply_changes_button.setText(SETTINGS_BUTTON_APPLY)
84
84
        self.ui.bandwidth_settings.setTitle(SETTINGS_BANDWIDTH)
85
85
        self.ui.file_sync_settings.setTitle(SETTINGS_FILE_SYNC)
86
 
        self.ui.kbps_label_1.setText(SETTINGS_KILOBITS_PER_SECOND)
87
 
        self.ui.kbps_label_2.setText(SETTINGS_KILOBITS_PER_SECOND)
 
86
        self.ui.upload_speed_spinbox.setSuffix("  " +
 
87
            SETTINGS_KILOBITS_PER_SECOND)
 
88
        self.ui.download_speed_spinbox.setSuffix("  " +
 
89
            SETTINGS_KILOBITS_PER_SECOND)
88
90
        self.ui.label_2.setText(SETTINGS_BANDWIDTH_ZERO_WARNING)
89
91
        self.ui.restore_defaults_button.setText(SETTINGS_BUTTON_DEFAULT)
90
92
 
188
190
    def resizeEvent(self, event):
189
191
        super(PreferencesPanel, self).resizeEvent(event)
190
192
        size_bandwidth = (self.ui.bandwidth_settings.width() -
191
 
            self.ui.upload_speed_spinbox.width() -
192
 
            self.ui.kbps_label_1.width())
 
193
            self.ui.upload_speed_spinbox.width())
193
194
        padding = 160  # Padding to allow shrinking
194
195
        size_sync = (self.ui.file_sync_settings.width() - padding)
195
196
        force_wordwrap(self.ui.limit_uploads_checkbox, size_bandwidth,