Exemplo n.º 1
0
    "multiwildcardchar": u'',
}

SCALE_WIDGETS = {
    "lookuptablepagesize",
}

ENTRY_WIDGETS = {
    "singlewildcardchar",
    "multiwildcardchar",
}

db_dir = os.path.join(ibus_table_location.data(), 'tables')
icon_dir = os.path.join(ibus_table_location.data(), 'icons')
setup_cmd = os.path.join(ibus_table_location.lib(), "ibus-setup-table")
logfile = os.path.join(ibus_table_location.cache_home(), 'setup-debug.log')

opt = optparse.OptionParser()
opt.set_usage('%prog [options]')
opt.add_option(
    '-n',
    '--engine-name',
    action='store',
    type='string',
    dest='engine_name',
    default='',
    help=('Set the name of the engine, for example "table:cangjie3". ' +
          'Default: "%default"'))
opt.add_option('-q',
               '--no-debug',
               action='store_false',
Exemplo n.º 2
0
from signal import signal, SIGTERM, SIGINT

from gi import require_version
require_version('IBus', '1.0')
from gi.repository import IBus
from gi.repository import GLib

import factory
import tabsqlitedb
import ibus_table_location

DB_DIR = os.path.join(ibus_table_location.data(), 'tables')
BYO_DB_DIR = os.path.join(ibus_table_location.data_home(), "byo-tables")
ICON_DIR = os.path.join(ibus_table_location.data(), 'icons')
SETUP_CMD = os.path.join(ibus_table_location.lib(), "ibus-setup-table")
LOGFILE = os.path.join(ibus_table_location.cache_home(), 'debug.log')

_OPTION_PARSER = optparse.OptionParser()

_OPTION_PARSER.set_usage('%prog --table a_table.db')
_OPTION_PARSER.add_option(
    '--table', '-t',
    action='store',
    type='string',
    dest='db',
    default='',
    help='Set the IME table file, default: %default')
_OPTION_PARSER.add_option(
    '--daemon', '-d',
    action='store_true',
    dest='daemon',
Exemplo n.º 3
0
    "multiwildcardchar": u'',
}

SCALE_WIDGETS = {
    "lookuptablepagesize",
}

ENTRY_WIDGETS = {
    "singlewildcardchar",
    "multiwildcardchar",
}

db_dir = os.path.join (ibus_table_location.data(), 'tables')
icon_dir = os.path.join (ibus_table_location.data(), 'icons')
setup_cmd = os.path.join(ibus_table_location.lib(), "ibus-setup-table")
logfile = os.path.join(ibus_table_location.cache_home(), 'setup-debug.log')

opt = optparse.OptionParser()
opt.set_usage ('%prog [options]')
opt.add_option(
    '-n', '--engine-name',
    action = 'store',
    type = 'string',
    dest = 'engine_name',
    default = '',
    help = ('Set the name of the engine, for example "table:cangjie3". '
            + 'Default: "%default"'))
opt.add_option(
    '-q', '--no-debug',
    action = 'store_false',
    dest = 'debug',