~diegosarmentero/ubuntu-sso-client/forgotten-link

« back to all changes in this revision

Viewing changes to ubuntu_sso/qt/network_detection_page.py

  • Committer: Tarmac
  • Author(s): Natalia B. Bidart
  • Date: 2012-02-18 14:52:57 UTC
  • mfrom: (877.1.7 fix-933632)
  • Revision ID: tarmac-20120218145257-p5809z6j701j0v8a
- Make gettext return unicode strings. Also, transform arguments passed to
  the GLib spawnner to bytes (LP: #933632).

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Pages from SSO."""
18
18
 
19
 
 
20
 
import gettext
21
 
 
22
19
from twisted.internet import defer
23
20
from PyQt4 import QtGui
24
21
 
25
22
from ubuntu_sso import networkstate
26
23
 
27
24
from ubuntu_sso.qt.ui import network_detection_ui
28
 
 
29
 
_ = gettext.gettext
 
25
from ubuntu_sso.utils.ui import (
 
26
    CLOSE_AND_SETUP_LATER,
 
27
    NETWORK_DETECTION_TITLE,
 
28
    TRY_AGAIN_BUTTON,
 
29
)
30
30
 
31
31
 
32
32
class NetworkDetectionPage(QtGui.QWizardPage):
35
35
 
36
36
    def __init__(self, banner_pixmap=None, parent=None):
37
37
        super(NetworkDetectionPage, self).__init__(parent)
38
 
        self.setTitle(_("Network detection"))
 
38
        self.setTitle(NETWORK_DETECTION_TITLE)
39
39
        self.ui = network_detection_ui.Ui_Form()
40
40
        self.ui.setupUi(self)
41
41
        if banner_pixmap is not None:
47
47
        """Set UI details."""
48
48
        self.wizard()._next_id = None
49
49
 
50
 
        self.setButtonText(QtGui.QWizard.CustomButton1, _("Try again"))
 
50
        self.setButtonText(QtGui.QWizard.CustomButton1, TRY_AGAIN_BUTTON)
51
51
        self.setButtonText(QtGui.QWizard.CancelButton,
52
 
            _("Close window and set up later"))
 
52
            CLOSE_AND_SETUP_LATER)
53
53
        self.wizard().setButtonLayout([
54
54
            QtGui.QWizard.Stretch,
55
55
            QtGui.QWizard.CustomButton1,