2
# -*- coding: utf-8 -*-
4
# Authors: Natalia B Bidart <natalia.bidart@canonical.com>
5
# Eric Casteleijn <eric.casteleijn@canonical.com>
7
# Copyright 2010 Canonical Ltd.
9
# This program is free software: you can redistribute it and/or modify it
10
# under the terms of the GNU General Public License version 3, as published
11
# by the Free Software Foundation.
13
# This program is distributed in the hope that it will be useful, but
14
# WITHOUT ANY WARRANTY; without even the implied warranties of
15
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
16
# PURPOSE. See the GNU General Public License for more details.
18
# You should have received a copy of the GNU General Public License along
19
# with this program. If not, see <http://www.gnu.org/licenses/>.
20
"""Execute the graphical interface for the Ubuntu One control panel."""
22
# Invalid name "ubuntuone-control-panel-qt", pylint: disable=C0103
27
from optparse import OptionParser
29
from ubuntuone.controlpanel import TRANSLATION_DOMAIN
31
gettext.textdomain(TRANSLATION_DOMAIN)
32
# import the GUI after the translation domain has been set
33
from ubuntuone.controlpanel.gui.qt import main
37
"""Parse command line parameters."""
38
usage = "Usage: %prog [option]"
39
result = OptionParser(usage=usage)
40
result.add_option("", "--switch-to", dest="switch_to", type="string",
41
metavar="PANEL_NAME", default="",
42
help="Start the Ubuntu One Control Panel (QT) in the "
43
"PANEL_NAME tab. Possible values are: "
44
"dashboard, volumes, devices, applications")
45
result.add_option("-a", "--alert", dest="alert", action="store_true",
46
default=False, help="Start the Ubuntu One Control Panel "
47
"(QT) alerting the user to its presence.")
51
if __name__ == "__main__":
52
parser = parser_options()
53
(options, args) = parser.parse_args(sys.argv)
54
main.main(switch_to=options.switch_to, alert=options.alert)