1
# -*- coding: utf-8 -*-
3
# Authors: Natalia B Bidart <natalia.bidart@canonical.com>
5
# Copyright 2011 Canonical Ltd.
7
# This program is free software: you can redistribute it and/or modify it
8
# under the terms of the GNU General Public License version 3, as published
9
# by the Free Software Foundation.
11
# This program is distributed in the hope that it will be useful, but
12
# WITHOUT ANY WARRANTY; without even the implied warranties of
13
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
14
# PURPOSE. See the GNU General Public License for more details.
16
# You should have received a copy of the GNU General Public License along
17
# with this program. If not, see <http://www.gnu.org/licenses/>.
19
"""The signin page."""
21
from PyQt4 import QtCore
23
from ubuntuone.controlpanel.gui import RESET_PASSWORD_LINK
24
from ubuntuone.controlpanel.gui.qt import icon_from_name
25
from ubuntuone.controlpanel.gui.qt.ubuntuonebin import UbuntuOneBin
26
from ubuntuone.controlpanel.gui.qt.ui import signin_ui
29
class SignInPanel(UbuntuOneBin):
30
"""The widget for signing in."""
33
signinCanceled = QtCore.pyqtSignal()
36
"""Do some extra setupping for the UI."""
37
super(SignInPanel, self)._setup()
38
self.ui.forgot_password_button.uri = RESET_PASSWORD_LINK
39
icon = icon_from_name('external_icon_orange')
40
self.ui.forgot_password_button.setIcon(icon)
43
def on_signin_button_clicked(self):
44
"""The 'Sign in' button was clicked."""
45
self.is_processing = True
48
def on_cancel_button_clicked(self):
49
"""The 'Cancel' button was clicked."""
50
self.signinCanceled.emit()