~kissiel/checkbox/automated-test-page

« back to all changes in this revision

Viewing changes to checkbox-touch/py/checkbox_touch.py

  • Committer: Daniel Manrique
  • Author(s): Zygmunt Krynicki
  • Date: 2014-08-12 21:37:46 UTC
  • mfrom: (3189.1.8 launchpad/touch-app)
  • Revision ID: daniel_manrique-20140812213746-i1eike7890blxdee
"automatic merge by tarmac [r=roadmr][bug=][author=zkrynicki]"

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# This file is part of Checkbox.
 
2
#
 
3
# Copyright 2012 Canonical Ltd.
 
4
# Written by:
 
5
#   Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
 
6
#
 
7
# Checkbox is free software: you can redistribute it and/or modify
 
8
# it under the terms of the GNU General Public License version 3,
 
9
# as published by the Free Software Foundation.
 
10
#
 
11
# Checkbox is distributed in the hope that it will be useful,
 
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
# GNU General Public License for more details.
 
15
#
 
16
# You should have received a copy of the GNU General Public License
 
17
# along with Checkbox.  If not, see <http://www.gnu.org/licenses/>.
 
18
"""
 
19
:mod:`checkbox_touch` -- touch specific APIs
 
20
============================================
 
21
 
 
22
This module contains APIs specific to the implementation of checkbox-touch.
 
23
"""
 
24
 
 
25
from gettext import gettext as _
 
26
 
 
27
try:
 
28
    import pyotherside
 
29
except ImportError:
 
30
    raise SystemExit(
 
31
        ("Please don't try to import or this module directly,"
 
32
         " it only works when imported from QML"))
 
33
 
 
34
 
 
35
def get_welcome_text():
 
36
    """
 
37
    Get the replacement for the "Welcome text" message
 
38
    """
 
39
    return _("Welcome text (python loaded)")
 
40
 
 
41
 
 
42
# NOTE: this is just an example, it's not really needed for anything
 
43
pyotherside.send("python-core-loaded")