~ralsina/ubuntuone-control-panel/quit-quit-quit

« back to all changes in this revision

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

  • Committer: Tarmac
  • Author(s): Natalia B. Bidart
  • Date: 2012-02-22 17:12:00 UTC
  • mfrom: (262.2.6 all-ui-from-code)
  • Revision ID: tarmac-20120222171200-c76wucr5xaxvn6vw
- No more strings coming up from the Designer ui files (LP: #938626).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# -*- coding: utf-8 -*-
2
 
 
3
 
# Authors: Natalia B Bidart <natalia.bidart@canonical.com>
4
2
#
5
3
# Copyright 2011 Canonical Ltd.
6
4
#
21
19
from PyQt4 import QtCore
22
20
from twisted.internet import defer
23
21
 
24
 
from ubuntuone.controlpanel.gui import RESET_PASSWORD_LINK
 
22
from ubuntuone.controlpanel.gui import (
 
23
    RESET_PASSWORD_LINK,
 
24
    SIGNIN_BUTTON,
 
25
    SIGNIN_CANCEL,
 
26
    SIGNIN_DESCRIPTION,
 
27
    SIGNIN_EMAIL,
 
28
    SIGNIN_FORGOT_PASSWORD,
 
29
    SIGNIN_PASSWORD,
 
30
    SIGNIN_TITLE,
 
31
)
25
32
from ubuntuone.controlpanel.gui.qt import icon_from_name, handle_errors
26
33
from ubuntuone.controlpanel.gui.qt.ubuntuonebin import UbuntuOneBin
27
34
from ubuntuone.controlpanel.gui.qt.ui import signin_ui
43
50
    def _setup(self):
44
51
        """Do some extra setupping for the UI."""
45
52
        super(SignInPanel, self)._setup()
 
53
        self.ui.cancel_button.setText(SIGNIN_CANCEL)
 
54
        self.ui.description_label.setText(SIGNIN_DESCRIPTION)
 
55
        self.ui.email_label.setText(SIGNIN_EMAIL)
 
56
        self.ui.sign_in_label.setText(SIGNIN_TITLE)
 
57
        self.ui.password_label.setText(SIGNIN_PASSWORD)
46
58
 
 
59
        self.ui.forgot_password_button.setText(SIGNIN_FORGOT_PASSWORD)
47
60
        self.ui.forgot_password_button.uri = RESET_PASSWORD_LINK
48
61
        icon = icon_from_name('external_icon_orange')
49
62
        self.ui.forgot_password_button.setIcon(icon)
50
63
 
 
64
        self.ui.signin_button.setText(SIGNIN_BUTTON)
51
65
        self.ui.signin_button.setEnabled(False)
52
66
        for entry in (self.ui.email_entry, self.ui.password_entry):
53
67
            entry.textChanged.connect(self.validate)