1
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
2
/* vim:set et sts=4: */
9
static IBusBus *bus = NULL;
10
static IBusConfigGConf *config = NULL;
13
static gboolean ibus = FALSE;
14
static gboolean verbose = FALSE;
16
static const GOptionEntry entries[] =
18
{ "ibus", 'i', 0, G_OPTION_ARG_NONE, &ibus, "component is executed by ibus", NULL },
19
{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, "verbose", NULL },
25
ibus_disconnected_cb (IBusBus *bus,
32
ibus_gconf_start (void)
35
bus = ibus_bus_new ();
36
if (!ibus_bus_is_connected (bus)) {
39
g_signal_connect (bus, "disconnected", G_CALLBACK (ibus_disconnected_cb), NULL);
40
config = ibus_config_gconf_new (ibus_bus_get_connection (bus));
41
ibus_bus_request_name (bus, IBUS_SERVICE_CONFIG, 0);
46
main (gint argc, gchar **argv)
49
GOptionContext *context;
51
setlocale (LC_ALL, "");
53
context = g_option_context_new ("- ibus gconf component");
55
g_option_context_add_main_entries (context, entries, "ibus-gconf");
57
if (!g_option_context_parse (context, &argc, &argv, &error)) {
58
g_print ("Option parsing failed: %s\n", error->message);