~ubuntu-branches/ubuntu/precise/ubuntu-sso-client/precise-proposed

« back to all changes in this revision

Viewing changes to ubuntu_sso/qt/main/windows.py

  • Committer: Package Import Robot
  • Author(s): Natalia Bidart (nessita)
  • Date: 2012-04-03 12:01:29 UTC
  • mfrom: (1.1.35)
  • Revision ID: package-import@ubuntu.com-20120403120129-fg0gw1nnhgexq7gm
Tags: 2.99.92-0ubuntu1
* New upstream release:
  - Restoring transparency for the overlay widget (LP: #969455).
  - Converting to unicode some data returned by webclient in
    QByteArray format (LP: #961315).
  - Fixed the issue where we use an empty proxy url when the proxy
    was not set in gsettings (LP: #969280).
  - Forced white background (LP: #961346).
* debian/watch:
  - Updated url to fetch tarball from latest milestone.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
#
 
3
# Copyright 2012 Canonical Ltd.
 
4
#
 
5
# This program is free software: you can redistribute it and/or modify it
 
6
# under the terms of the GNU General Public License version 3, as published
 
7
# by the Free Software Foundation.
 
8
#
 
9
# This program is distributed in the hope that it will be useful, but
 
10
# WITHOUT ANY WARRANTY; without even the implied warranties of
 
11
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
 
12
# PURPOSE.  See the GNU General Public License for more details.
 
13
#
 
14
# You should have received a copy of the GNU General Public License along
 
15
# with this program.  If not, see <http://www.gnu.org/licenses/>.
 
16
 
 
17
"""Main method to be used on windows."""
 
18
 
 
19
from PyQt4 import QtGui
 
20
 
 
21
 
 
22
def main(app):
 
23
    """Apply style sheet and fonts."""
 
24
    # Apply font to the entire application
 
25
    QtGui.QFontDatabase.addApplicationFont(':/Ubuntu-R.ttf')
 
26
    QtGui.QFontDatabase.addApplicationFont(':/Ubuntu-B.ttf')
 
27
 
 
28
 
 
29
# Module 'reactor' has no 'run'/'stop' member, pylint: disable=E1101
 
30
 
 
31
 
 
32
def main_start(app):
 
33
    """Start the mainloop."""
 
34
    from twisted.internet import reactor
 
35
    reactor.run()
 
36
 
 
37
 
 
38
def main_quit(app):
 
39
    """Stop the mainloop."""
 
40
    from twisted.internet import reactor
 
41
    reactor.stop()
 
42
 
 
43
 
 
44
# pylint: enable=E1101
 
45
 
 
46
PLATFORM_QSS = ":/windows.qss"