|
Packit Service |
1d8f1c |
# vim:set et sts=4 sw=4:
|
|
Packit Service |
1d8f1c |
#
|
|
Packit Service |
1d8f1c |
# ibus - The Input Bus
|
|
Packit Service |
1d8f1c |
#
|
|
Packit Service |
1d8f1c |
# Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com>
|
|
Packit Service |
1d8f1c |
# Copyright (c) 2007-2008 Red Hat, Inc.
|
|
Packit Service |
1d8f1c |
#
|
|
Packit Service |
1d8f1c |
# This library is free software; you can redistribute it and/or
|
|
Packit Service |
1d8f1c |
# modify it under the terms of the GNU Lesser General Public
|
|
Packit Service |
1d8f1c |
# License as published by the Free Software Foundation; either
|
|
Packit Service |
1d8f1c |
# version 2.1 of the License, or (at your option) any later version.
|
|
Packit Service |
1d8f1c |
#
|
|
Packit Service |
1d8f1c |
# This library is distributed in the hope that it will be useful,
|
|
Packit Service |
1d8f1c |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
1d8f1c |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
1d8f1c |
# Lesser General Public License for more details.
|
|
Packit Service |
1d8f1c |
#
|
|
Packit Service |
1d8f1c |
# You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
1d8f1c |
# License along with this library; if not, write to the Free Software
|
|
Packit Service |
1d8f1c |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
|
Packit Service |
1d8f1c |
# USA
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
__all__ = (
|
|
Packit Service |
1d8f1c |
"get_version",
|
|
Packit Service |
1d8f1c |
"get_copyright",
|
|
Packit Service |
1d8f1c |
"get_license",
|
|
Packit Service |
1d8f1c |
"get_ICON_KEYBOARD",
|
|
Packit Service |
1d8f1c |
"LIBIBUS_SONAME",
|
|
Packit Service |
1d8f1c |
"ISOCODES_PREFIX",
|
|
Packit Service |
1d8f1c |
"_"
|
|
Packit Service |
1d8f1c |
)
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
import gettext
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
_ = lambda a: gettext.dgettext("@GETTEXT_PACKAGE@", a)
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
def get_version():
|
|
Packit Service |
1d8f1c |
return '@PACKAGE_VERSION@'
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
def get_copyright():
|
|
Packit Service |
1d8f1c |
return _('''Copyright (c) 2007-2010 Peng Huang
|
|
Packit Service |
1d8f1c |
Copyright (c) 2007-2010 Red Hat, Inc.''')
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
def get_license():
|
|
Packit Service |
1d8f1c |
return 'LGPL'
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
def get_ICON_KEYBOARD():
|
|
Packit Service |
1d8f1c |
import gtk
|
|
Packit Service |
1d8f1c |
icon = '@IBUS_ICON_KEYBOARD@'
|
|
Packit Service |
1d8f1c |
fallback_icon = 'ibus-keyboard'
|
|
Packit Service |
1d8f1c |
settings = gtk.settings_get_default()
|
|
Packit Service |
1d8f1c |
if settings.get_property('gtk-icon-theme-name') != 'gnome':
|
|
Packit Service |
1d8f1c |
return fallback_icon
|
|
Packit Service |
1d8f1c |
theme = gtk.icon_theme_get_default()
|
|
Packit Service |
1d8f1c |
if not theme.lookup_icon(icon, 18, 0):
|
|
Packit Service |
1d8f1c |
return fallback_icon
|
|
Packit Service |
1d8f1c |
return icon
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
LIBIBUS_SONAME='libibus-@IBUS_API_VERSION@.so.@LT_CURRENT_MINUS_AGE@'
|
|
Packit Service |
1d8f1c |
ISOCODES_PREFIX='@ISOCODES_PREFIX@'
|