~ubuntu-branches/ubuntu/saucy/ibus/saucy-updates

« back to all changes in this revision

Viewing changes to conf/gconf/main.c

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha, Jeremy Bicha, William Hua
  • Date: 2013-07-28 19:27:13 UTC
  • mfrom: (1.5.1) (17.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130728192713-qg0wzsqj2qnng5m7
Tags: 1.5.3-0ubuntu1
[ Jeremy Bicha ]
* Merge from Debian unstable. Remaining changes:
  - debian/control:
    + Recommend ibus-gtk | ibus-qt4, ibus-gtk3 | ibus-qt4 instead of
      recommending all of them
    + Suggest ibus-clutter instead of recommending it
    + Depend on dconf-cli instead of dconf-tools
  - debian/rules:
    + Build with dh_translations. Add dh-translations build dependency.
    + Use --disable-silent-rules
  - Add 02_title_update.patch: Rename "IBus Preferences" to "Keyboard Input
    Methods"
  - add ibus-530711-preload-sys.patch: Set default IMEngine.
  - debian/libibus-1.0-5.symbols: Add symbols for above patch
* New upstream release. Applied patches dropped:
  - the 0001 - 0017 backport patches
  - the format-security patches
* Dropped changes:
  - debian/patches/05_appindicator.patch and python-appindicator recommends:
    + For Saucy, we'll be using indicator-keyboard instead.

[ William Hua ]
* debian/patches/ibus-541492-xkb.patch:
  - Patch from Fedora, needed for the 530711 patch to apply cleanly
* debian/patches/ibus-530711-preload-sys.patch: Refreshed (from Fedora)
* debian/patches/disable-input-trigger.patch:
  - Prevent IBus from capturing input source key bindings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
 
2
/* vim:set et sts=4: */
 
3
 
 
4
#include <ibus.h>
 
5
#include <stdlib.h>
 
6
#include <locale.h>
 
7
#include "config.h"
 
8
 
 
9
static IBusBus *bus = NULL;
 
10
static IBusConfigGConf *config = NULL;
 
11
 
 
12
/* options */
 
13
static gboolean ibus = FALSE;
 
14
static gboolean verbose = FALSE;
 
15
 
 
16
static const GOptionEntry entries[] =
 
17
{
 
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 },
 
20
    { NULL },
 
21
};
 
22
 
 
23
 
 
24
static void
 
25
ibus_disconnected_cb (IBusBus  *bus,
 
26
                      gpointer  user_data)
 
27
{
 
28
    ibus_quit ();
 
29
}
 
30
 
 
31
static void
 
32
ibus_gconf_start (void)
 
33
{
 
34
    ibus_init ();
 
35
    bus = ibus_bus_new ();
 
36
    if (!ibus_bus_is_connected (bus)) {
 
37
        exit (-1);
 
38
    }
 
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);
 
42
    ibus_main ();
 
43
}
 
44
 
 
45
gint
 
46
main (gint argc, gchar **argv)
 
47
{
 
48
    GError *error = NULL;
 
49
    GOptionContext *context;
 
50
 
 
51
    setlocale (LC_ALL, "");
 
52
 
 
53
    context = g_option_context_new ("- ibus gconf component");
 
54
 
 
55
    g_option_context_add_main_entries (context, entries, "ibus-gconf");
 
56
 
 
57
    if (!g_option_context_parse (context, &argc, &argv, &error)) {
 
58
        g_print ("Option parsing failed: %s\n", error->message);
 
59
        g_error_free (error);
 
60
        exit (-1);
 
61
    }
 
62
 
 
63
    ibus_gconf_start ();
 
64
 
 
65
    return 0;
 
66
}