[ibus-table/f18] update to latest upstream 1.4.99.20130110 from Caius ‘kaio’ Chance’s repository

Mike FABIAN mfabian at fedoraproject.org
Thu Jan 10 16:35:56 UTC 2013


commit 6eeef81ef328347f52fa6d18493b5ef2a3e6d421
Author: Mike FABIAN <mfabian at redhat.com>
Date:   Thu Jan 10 08:08:13 2013 +0100

    update to latest upstream 1.4.99.20130110 from Caius ‘kaio’ Chance’s repository
    
    - Resolves: #513901 ibus-table setup does not store config settings
    - When detecting the Chinese mode from the environment, also check LC_ALL
    - Fix typo in self._chinese_mode variable (The typo broke the SC/TC property)
    - Make cursor in lookup table always visible (became invisible after the port to GObjectIntrospection)
    - apply changes in values of dconf keys immediately

 .gitignore                                         |    1 +
 ...-dconf-values-now-get-applied-immediately.patch |  113 ++++++++++++++++++++
 ibus-table.spec                                    |   12 ++-
 sources                                            |    2 +-
 4 files changed, 126 insertions(+), 2 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index fca3ed7..e4da3e8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ ibus-table-1.3.0.20100621.tar.gz
 /ibus-table-1.4.99.20121113.tar.gz
 /ibus-table-1.4.99.20130103.tar.gz
 /ibus-table-1.4.99.20130108.tar.gz
+/ibus-table-1.4.99.20130110.tar.gz
diff --git a/0001-Changes-in-dconf-values-now-get-applied-immediately.patch b/0001-Changes-in-dconf-values-now-get-applied-immediately.patch
new file mode 100644
index 0000000..a2ef173
--- /dev/null
+++ b/0001-Changes-in-dconf-values-now-get-applied-immediately.patch
@@ -0,0 +1,113 @@
+From fdda5c156d851446497bb042e1614ef1c55d9e92 Mon Sep 17 00:00:00 2001
+From: Mike FABIAN <mfabian at redhat.com>
+Date: Thu, 10 Jan 2013 11:37:59 +0100
+Subject: [PATCH] Changes in dconf values now get applied immediately
+
+Changing values of dconf keys for example with
+
+   dconf write /desktop/ibus/engine/table/cangjie3/chinesemode 3
+
+was not applied immediately to the ibus-table engine, only
+when changing to a different input method and back this
+change was applied.
+
+This commit fixes this problem.
+---
+ engine/table.py | 72 ++++++++++++++++++++++++++++++++++++++++++---------------
+ 1 file changed, 53 insertions(+), 19 deletions(-)
+
+diff --git a/engine/table.py b/engine/table.py
+index e171949..24ca921 100644
+--- a/engine/table.py
++++ b/engine/table.py
+@@ -26,6 +26,7 @@ __all__ = (
+ )
+ 
+ import os
++import string
+ from gi.repository import IBus
+ from gi.repository import GLib
+ from curses import ascii
+@@ -1894,27 +1895,60 @@ class tabengine (IBus.Engine):
+             return True
+         return False
+ 
++    def config_section_normalize(self, section):
++        # This function replaces _: with - in the dconf
++        # section and converts to lower case to make
++        # the comparison of the dconf sections work correctly.
++        # I avoid using .lower() here because it is locale dependent,
++        # when using .lower() this would not achieve the desired
++        # effect of comparing the dconf sections case insentively
++        # in some locales, it would fail for example if Turkish
++        # locale (tr_TR.UTF-8) is set.
++        if type(section) == type(u''):
++            # translate() does not work in Python’s internal Unicode type
++            section = section.encode('utf-8')
++        return re.sub(r'[_:]', r'-', section).translate(
++            string.maketrans(string.ascii_uppercase, string.ascii_lowercase ))
++
+     def config_value_changed_cb (self, config, section, name, value):
++        if self.config_section_normalize(self._config_section) != self.config_section_normalize(section):
++            return
++        print "config value %(n)s for engine %(en)s changed" %{'n': name, 'en': self._name}
+         value = variant_to_value(value)
+-        if section == self._config_section:
+-            if name == u'AutoCommit':
+-                self._auto_commit = value
+-            elif name == u'ChineseMode':
+-                self._editor._chinese_mode = value
+-            elif name == u'EnDefFullWidthLetter':
+-                self._full_width_letter[0] = value
+-            elif name == u'EnDefFullWidthPunct':
+-                self._full_width_punct[0] = value
+-            elif name == u'LookupTableOrientation':
+-                self._editor._lookup_table.set_orientation (value)
+-            elif name == u'LookupTableSelectKeys':
+-                self._editor.set_select_keys (value)
+-            elif name == u'OneChar':
+-                self._editor._onechar = value
+-            elif name == u'TabDefFullWidthLetter':
+-                self._full_width_letter[1] = value
+-            elif name == u'TabDefFullWidthPunct':
+-                self._full_width_punct[1] = value
++        if name == u'autocommit':
++            self._auto_commit = value
++            self._refresh_properties()
++            return
++        elif name == u'chinesemode':
++            self._editor._chinese_mode = value
++            self._refresh_properties()
++            return
++        elif name == u'endeffullwidthletter':
++            self._full_width_letter[0] = value
++            self._refresh_properties()
++            return
++        elif name == u'endeffullwidthpunct':
++            self._full_width_punct[0] = value
++            self._refresh_properties()
++            return
++        elif name == u'lookuptableorientation':
++            self._editor._lookup_table.set_orientation (value)
++            return
++        elif name == u'lookuptableselectkeys':
++            self._editor.set_select_keys (value)
++            return
++        elif name == u'onechar':
++            self._editor._onechar = value
++            self._refresh_properties()
++            return
++        elif name == u'tabdeffullwidthletter':
++            self._full_width_letter[1] = value
++            self._refresh_properties()
++            return
++        elif name == u'tabdeffullwidthpunct':
++            self._full_width_punct[1] = value
++            self._refresh_properties()
++            return
+ 
+     # for further implementation :)
+     @classmethod
+-- 
+1.7.11.7
+
diff --git a/ibus-table.spec b/ibus-table.spec
index d4194c0..9e44560 100644
--- a/ibus-table.spec
+++ b/ibus-table.spec
@@ -1,5 +1,5 @@
 Name:       ibus-table
-Version:    1.4.99.20130108
+Version:    1.4.99.20130110
 Release:    1%{?dist}
 Summary:    The Table engine for IBus platform
 License:    LGPLv2+
@@ -7,6 +7,7 @@ Group:      System Environment/Libraries
 URL:        http://code.google.com/p/ibus/
 Source0:    http://mfabian.fedorapeople.org/ibus-table/%{name}-%{version}.tar.gz
 Patch1:     ibus-table-1.3.9.20110827-uppercase-umlauts.patch
+Patch2:     0001-Changes-in-dconf-values-now-get-applied-immediately.patch
 
 Requires:       ibus > 1.3.0
 BuildRequires:  ibus-devel > 1.3.0
@@ -30,6 +31,7 @@ Development files for %{name}.
 %prep
 %setup -q
 %patch1 -p1 -b .uppercase-umlauts
+%patch2 -p1 -b .apply-dconf-changes
 
 %build
 %configure --disable-static --disable-additional
@@ -100,6 +102,14 @@ Development files for %{name}.
 %{_datadir}/pkgconfig/%{name}.pc
 
 %changelog
+* Thu Jan 10 2013 Mike FABIAN <mfabian at redhat.com> - 1.4.99.20130110-1
+- Resolves: #513901 ibus-table setup does not store config settings
+- update to latest upstream 1.4.99.20130110 from Caius ‘kaio’ Chance’s repository, 1.5.0 branch
+- When detecting the Chinese mode from the environment, also check LC_ALL
+- Fix typo in self._chinese_mode variable (The typo broke the SC/TC property)
+- Make cursor in lookup table always visible (became invisible after the port to GObjectIntrospection)
+- apply changes in values of dconf keys immediately
+
 * Tue Jan 08 2013 Mike FABIAN <mfabian at redhat.com> - 1.4.99.20130108-1
 - update to latest upstream 1.4.99.20130108 from Caius ‘kaio’ Chance’s repository, 1.5.0 branch
 - includes port to GObjectIntrospection now
diff --git a/sources b/sources
index be0818d..7477d5a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-8b1f3d14a3a9eb8b926a097464fd1006  ibus-table-1.4.99.20130108.tar.gz
+50745b4b20215012127577df9c73f7f1  ibus-table-1.4.99.20130110.tar.gz


More information about the scm-commits mailing list