Fix FTBFS with ibus 1.4.0 (Closes: #662586)
Add patches/bug117_fix_ftbfs_ibus1.4.0.patch.
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@debian.org>
Nobuhiro Iwamatsu
12 years ago
0 | Description: Fix FTBFS with ibus 1.4.0 | |
1 | Forwarded: not-needed | |
2 | Origin: http://code.google.com/p/mozc/issues/detail?id=117 | |
3 | Author: ichelm610x@gmail.com | |
4 | Last-Update: 2012-02-06 | |
5 | ||
6 | --- a/unix/ibus/mozc_engine.cc | |
7 | +++ b/unix/ibus/mozc_engine.cc | |
8 | @@ -620,8 +620,15 @@ | |
9 | ||
10 | #ifndef OS_CHROMEOS | |
11 | if (prop_mozc_tool_) { | |
12 | +#if IBUS_CHECK_VERSION(1, 4, 0) | |
13 | + while ((prop = ibus_prop_list_get( | |
14 | + const_cast<IBusPropList*>( | |
15 | + ibus_property_get_sub_props(prop_mozc_tool_)), i++))) { | |
16 | + if (!g_strcmp0(property_name, ibus_property_get_key(prop))) { | |
17 | +#else | |
18 | while ((prop = ibus_prop_list_get(prop_mozc_tool_->sub_props, i++))) { | |
19 | - if (!g_strcmp0(property_name, prop->key)) { | |
20 | + if (!g_strcmp0(property_name, prop->key)) { | |
21 | +#endif | |
22 | const MozcEngineToolProperty *entry = | |
23 | reinterpret_cast<const MozcEngineToolProperty*>( | |
24 | g_object_get_data(G_OBJECT(prop), kGObjectDataKey)); | |
25 | @@ -640,8 +647,15 @@ | |
26 | } | |
27 | ||
28 | i = 0; | |
29 | +#if IBUS_CHECK_VERSION(1, 4, 0) | |
30 | + while ((prop = ibus_prop_list_get( | |
31 | + const_cast<IBusPropList*>( | |
32 | + ibus_property_get_sub_props(prop_composition_mode_)), i++))) { | |
33 | + if (!g_strcmp0(property_name, ibus_property_get_key(prop))) { | |
34 | +#else | |
35 | while ((prop = ibus_prop_list_get(prop_composition_mode_->sub_props, i++))) { | |
36 | - if (!g_strcmp0(property_name, prop->key)) { | |
37 | + if (!g_strcmp0(property_name, prop->key)) { | |
38 | +#endif | |
39 | const MozcEngineProperty *entry = | |
40 | reinterpret_cast<const MozcEngineProperty*>( | |
41 | g_object_get_data(G_OBJECT(prop), kGObjectDataKey)); | |
42 | @@ -1096,8 +1110,15 @@ | |
43 | ||
44 | size_t i = 0; | |
45 | IBusProperty *prop = NULL; | |
46 | +#if IBUS_CHECK_VERSION(1, 4, 0) | |
47 | + while ((prop = ibus_prop_list_get( | |
48 | + const_cast<IBusPropList*>( | |
49 | + ibus_property_get_sub_props(prop_composition_mode_)), i++))) { | |
50 | + if (!g_strcmp0(entry->key, ibus_property_get_key(prop))) { | |
51 | +#else | |
52 | while ((prop = ibus_prop_list_get(prop_composition_mode_->sub_props, i++))) { | |
53 | if (!g_strcmp0(entry->key, prop->key)) { | |
54 | +#endif | |
55 | // Update the language panel. | |
56 | ibus_property_set_icon(prop_composition_mode_, | |
57 | GetIconPath(entry->icon).c_str()); |