~diegosarmentero/ubuntuone-windows-installer/ui-improves

« back to all changes in this revision

Viewing changes to ubuntuone_installer/gui/qt/forgotten.py

  • Committer: Tarmac
  • Author(s): ralsina
  • Date: 2011-07-22 19:30:55 UTC
  • mfrom: (18.2.16 show_spinner)
  • Revision ID: tarmac-20110722193055-s0w8a0vbi7wtukvw
Make all server-related actions show the overlay, and remove it when showing a page.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
 
 
3
# Authors: Roberto Alsina <roberto.alsina@canonical.com>
 
4
#
 
5
# Copyright 2011 Canonical Ltd.
 
6
#
 
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.
 
10
#
 
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.
 
15
#
 
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/>.
 
18
 
 
19
"""Custom forgotten password controller."""
 
20
 
 
21
from ubuntu_sso.qt import controllers
 
22
 
 
23
 
 
24
class ForgottenPasswordController(controllers.ForgottenPasswordController):
 
25
    """A custom forgotten password controller.
 
26
 
 
27
    This controller hides the overlay as needed.
 
28
    """
 
29
 
 
30
    def on_password_reset_error(self, app_name, error):
 
31
        """Hide the overlay, then do as the default controller does."""
 
32
        self.view.wizard().overlay.hide()
 
33
        super(ForgottenPasswordController,
 
34
            self).on_password_reset_error(app_name, error)