Update to 1.4.0-1.
This commit is contained in:
parent
6c0a2ef204
commit
476e880925
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ ibus-hangul-1.3.0.20100329.tar.gz
|
||||
/ibus-hangul-1.3.0.20100329.tar.gz
|
||||
/ibus-hangul-1.3.1.tar.gz
|
||||
/ibus-hangul-1.3.2.tar.gz
|
||||
/ibus-hangul-1.4.0.tar.gz
|
||||
|
@ -1,142 +0,0 @@
|
||||
Patch to follow ibus 1.4 config API change.
|
||||
Index: ibus-hangul-1.3.1/src/engine.c
|
||||
===================================================================
|
||||
--- ibus-hangul-1.3.1.orig/src/engine.c
|
||||
+++ ibus-hangul-1.3.1/src/engine.c
|
||||
@@ -111,7 +111,11 @@ static void ibus_hangul_engine_update_lo
|
||||
static void ibus_config_value_changed (IBusConfig *config,
|
||||
const gchar *section,
|
||||
const gchar *name,
|
||||
+#if IBUS_CHECK_VERSION(1,3,99)
|
||||
+ GVariant *value,
|
||||
+#else
|
||||
GValue *value,
|
||||
+#endif /* !IBUS_CHECK_VERSION(1,3,99) */
|
||||
gpointer user_data);
|
||||
|
||||
static void lookup_table_set_visible (IBusLookupTable *table,
|
||||
@@ -136,6 +140,11 @@ static gboolean hanja_key_list_match
|
||||
static gboolean hanja_key_list_has_modifier (HanjaKeyList *list,
|
||||
guint keyval);
|
||||
|
||||
+static gboolean config_get_string (IBusConfig *config,
|
||||
+ const gchar *section,
|
||||
+ const gchar *name,
|
||||
+ gchar **result);
|
||||
+
|
||||
static IBusEngineClass *parent_class = NULL;
|
||||
static HanjaTable *hanja_table = NULL;
|
||||
static HanjaTable *symbol_table = NULL;
|
||||
@@ -176,7 +185,7 @@ void
|
||||
ibus_hangul_init (IBusBus *bus)
|
||||
{
|
||||
gboolean res;
|
||||
- GValue value = { 0, };
|
||||
+ gchar *str;
|
||||
|
||||
hanja_table = hanja_table_load (NULL);
|
||||
|
||||
@@ -187,22 +196,20 @@ ibus_hangul_init (IBusBus *bus)
|
||||
g_object_ref_sink (config);
|
||||
|
||||
hangul_keyboard = g_string_new_len ("2", 8);
|
||||
- res = ibus_config_get_value (config, "engine/Hangul",
|
||||
- "HangulKeyboard", &value);
|
||||
+ str = NULL;
|
||||
+ res = config_get_string (config, "engine/Hangul", "HangulKeyboard", &str);
|
||||
if (res) {
|
||||
- const gchar* str = g_value_get_string (&value);
|
||||
g_string_assign (hangul_keyboard, str);
|
||||
- g_value_unset(&value);
|
||||
+ g_free (str);
|
||||
}
|
||||
|
||||
hanja_key_list_init(&hanja_keys);
|
||||
|
||||
- res = ibus_config_get_value (config, "engine/Hangul",
|
||||
- "HanjaKeys", &value);
|
||||
+ str = NULL;
|
||||
+ res = config_get_string (config, "engine/Hangul", "HanjaKeys", &str);
|
||||
if (res) {
|
||||
- const gchar* str = g_value_get_string (&value);
|
||||
hanja_key_list_set_from_string(&hanja_keys, str);
|
||||
- g_value_unset(&value);
|
||||
+ g_free (str);
|
||||
} else {
|
||||
hanja_key_list_append(&hanja_keys, IBUS_Hangul_Hanja, 0);
|
||||
hanja_key_list_append(&hanja_keys, IBUS_F9, 0);
|
||||
@@ -963,27 +970,71 @@ ibus_hangul_engine_property_activate (IB
|
||||
}
|
||||
}
|
||||
|
||||
+static gboolean
|
||||
+config_get_string (IBusConfig *config,
|
||||
+ const gchar *section,
|
||||
+ const gchar *name,
|
||||
+ gchar **result)
|
||||
+{
|
||||
+#if IBUS_CHECK_VERSION(1,3,99)
|
||||
+ GVariant *value = NULL;
|
||||
+
|
||||
+ g_return_val_if_fail (result != NULL, FALSE);
|
||||
+
|
||||
+ value = ibus_config_get_value (config, section, name);
|
||||
+ if (value) {
|
||||
+ *result = g_strdup (g_variant_get_string (value, NULL));
|
||||
+ g_variant_unref (value);
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ return FALSE;
|
||||
+#else
|
||||
+ GValue value = { 0 };
|
||||
+
|
||||
+ g_return_val_if_fail (result != NULL, FALSE);
|
||||
+
|
||||
+ if (ibus_config_get_value (config, section, name, &value)) {
|
||||
+ *result = g_strdup (g_value_get_string (&value));
|
||||
+ g_value_unset (&value);
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ return FALSE;
|
||||
+#endif /* !IBUS_CHECK_VERSION(1,3,99) */
|
||||
+}
|
||||
+
|
||||
+#if IBUS_CHECK_VERSION(1,3,99)
|
||||
+#define _g_variant_get_string g_variant_get_string
|
||||
+#define _g_variant_get_int32 g_variant_get_int32
|
||||
+#else
|
||||
+#define _g_variant_get_string(value, length) g_value_get_string(value)
|
||||
+#define _g_variant_get_int32 g_value_get_int
|
||||
+#endif /* !IBUS_CHECK_VERSION(1,3,99) */
|
||||
+
|
||||
static void
|
||||
ibus_config_value_changed (IBusConfig *config,
|
||||
const gchar *section,
|
||||
const gchar *name,
|
||||
+#if IBUS_CHECK_VERSION(1,3,99)
|
||||
+ GVariant *value,
|
||||
+#else
|
||||
GValue *value,
|
||||
+#endif /* !IBUS_CHECK_VERSION(1,3,99) */
|
||||
gpointer user_data)
|
||||
{
|
||||
IBusHangulEngine *hangul = (IBusHangulEngine *) user_data;
|
||||
|
||||
if (strcmp(section, "engine/Hangul") == 0) {
|
||||
if (strcmp(name, "HangulKeyboard") == 0) {
|
||||
- const gchar *str = g_value_get_string (value);
|
||||
+ const gchar *str = _g_variant_get_string (value, NULL);
|
||||
g_string_assign (hangul_keyboard, str);
|
||||
hangul_ic_select_keyboard (hangul->context, hangul_keyboard->str);
|
||||
} else if (strcmp(name, "HanjaKeys") == 0) {
|
||||
- const gchar* str = g_value_get_string (value);
|
||||
+ const gchar* str = _g_variant_get_string (value, NULL);
|
||||
hanja_key_list_set_from_string(&hanja_keys, str);
|
||||
}
|
||||
} else if (strcmp(section, "panel") == 0) {
|
||||
if (strcmp(name, "lookup_table_orientation") == 0) {
|
||||
- lookup_table_orientation = g_value_get_int (value);
|
||||
+ lookup_table_orientation = _g_variant_get_int32 (value);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
%global require_ibus_version 1.2.99
|
||||
%global require_libhangul_version 0.0.10
|
||||
%global require_ibus_version 1.3.99
|
||||
%global require_libhangul_version 0.1.0
|
||||
%if 0%{?fedora} > 15
|
||||
%define have_bridge_hotkey 1
|
||||
%else
|
||||
@ -11,7 +11,7 @@
|
||||
%endif
|
||||
|
||||
Name: ibus-hangul
|
||||
Version: 1.3.2
|
||||
Version: 1.4.0
|
||||
Release: 1%{?dist}
|
||||
Summary: The Hangul engine for IBus input platform
|
||||
License: GPLv2+
|
||||
@ -20,7 +20,6 @@ URL: http://code.google.com/p/ibus/
|
||||
Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz
|
||||
# dummy source to keep quilt series file
|
||||
Source1: series
|
||||
Patch0: ibus-hangul-ibus-1.4.patch
|
||||
Patch1: ibus-hangul-xx-icon-symbol.patch
|
||||
|
||||
BuildRequires: gettext-devel
|
||||
@ -32,6 +31,7 @@ BuildRequires: ibus-devel >= %{require_ibus_version}
|
||||
%if %have_bridge_hotkey
|
||||
BuildRequires: ibus
|
||||
%endif
|
||||
BuildRequires: desktop-file-utils
|
||||
|
||||
Requires: ibus >= %{require_ibus_version}
|
||||
Requires: libhangul >= %{require_libhangul_version}
|
||||
@ -42,7 +42,6 @@ libhangul.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .ibus-1.4
|
||||
%patch1 -p1 -b .icon-symbol
|
||||
|
||||
%build
|
||||
@ -52,20 +51,29 @@ autoreconf
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
make DESTDIR=${RPM_BUILD_ROOT} install
|
||||
make DESTDIR=${RPM_BUILD_ROOT} install INSTALL="install -p"
|
||||
|
||||
desktop-file-validate ${RPM_BUILD_ROOT}%{_datadir}/applications/ibus-setup-hangul.desktop
|
||||
|
||||
%find_lang %{name}
|
||||
|
||||
%files -f %{name}.lang
|
||||
%defattr(-,root,root,-)
|
||||
%doc AUTHORS COPYING README
|
||||
%{_libexecdir}/ibus-engine-hangul
|
||||
%{_libexecdir}/ibus-setup-hangul
|
||||
%{_bindir}/ibus-setup-hangul
|
||||
%{_datadir}/ibus-hangul
|
||||
%{_datadir}/ibus/component/*
|
||||
%{_libdir}/ibus-hangul/setup/*
|
||||
%{_datadir}/applications/ibus-setup-hangul.desktop
|
||||
|
||||
%changelog
|
||||
* Thu Jan 12 2012 Daiki Ueno <dueno@redhat.com> - 1.4.0-1
|
||||
- Update version to 1.4.0.
|
||||
- Remove ibus-hangul-ibus-1.4.patch.
|
||||
- Drop %%defattr(-,root,root,-) from %%files.
|
||||
- Pass -p to install to preserve file timestamps.
|
||||
- Install ibus-setup-hangul.desktop properly.
|
||||
|
||||
* Thu Nov 24 2011 Daiki Ueno <dueno@redhat.com> - 1.3.2-1
|
||||
- Update version to 1.3.2.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user