PageRenderTime 33ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/python/helper/ZhengJuSetup/__init__.py

http://scim-python.googlecode.com/
Python | 51 lines | 19 code | 7 blank | 25 comment | 1 complexity | a5b0c3a5542da6b84948fe7375832e91 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. #
  26. import sys
  27. import scim
  28. from gettext import dgettext
  29. _ = lambda a : dgettext ("scim-python", a)
  30. __UUID__ = "61af6de6-c29d-421e-9e1b-e34a29c68c76"
  31. __NAME__ = _("ZhengJu Setup")
  32. __ICON__ = "/usr/share/scim/icons/setup.png"
  33. __DESC__ = _("ZhengJu Setup Helper")
  34. __OPT__ = 0
  35. helper_info = (__UUID__, __NAME__, __ICON__, __DESC__, __OPT__)
  36. def get_info ():
  37. return helper_info
  38. def run_helper (uuid, config, display):
  39. if uuid != __UUID__:
  40. return
  41. display_arg = "--display=%s" % display
  42. sys.argv.append (display_arg)
  43. import ZhengJuUI
  44. ZhengJuUI.ZhengJuSetupUI (helper_info).run (uuid, config, display)