PageRenderTime 30ms CodeModel.GetById 19ms app.highlight 6ms RepoModel.GetById 2ms app.codeStats 0ms

/python/helper/PinYinSetup/__init__.py

http://scim-python.googlecode.com/
Python | 51 lines | 19 code | 7 blank | 25 comment | 1 complexity | 8082692c5e77f883742a7f316232a1ad MD5 | raw file
 1# -*- coding: utf-8 -*-
 2# vim: set noet ts=4:
 3#
 4# scim-python
 5#
 6# Copyright (c) 2007-2008 Huang Peng <shawn.p.huang@gmail.com>
 7#
 8#
 9# This library is free software; you can redistribute it and/or
10# modify it under the terms of the GNU Lesser General Public
11# License as published by the Free Software Foundation; either
12# version 2 of the License, or (at your option) any later version.
13#
14# This library is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17# GNU Lesser General Public License for more details.
18#
19# You should have received a copy of the GNU Lesser General Public
20# License along with this program; if not, write to the
21# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
22# Boston, MA  02111-1307  USA
23#
24# $Id: $
25#
26import sys
27import scim
28
29from gettext import dgettext
30_ = lambda a : dgettext ("scim-python", a)
31
32__UUID__ = "eebeecd7-cb22-48f4-8ced-70e42dad1a79"
33__NAME__ = _("Python PinYin Setup")
34__ICON__ = "/usr/share/scim/icons/setup.png"
35__DESC__ = _("Python PinYin Setup Helper")
36__OPT__ = 0
37
38helper_info = (__UUID__, __NAME__, __ICON__, __DESC__, __OPT__)
39
40def get_info ():
41	return helper_info
42
43def run_helper (uuid, config, display):
44	if uuid != __UUID__:
45		return
46	display_arg = "--display=%s" % display
47	sys.argv.append (display_arg)
48	import SetupUI
49	SetupUI.SetupUI (helper_info).run (uuid, config, display)
50
51