~ubuntu-branches/ubuntu/quantal/ibus/quantal

« back to all changes in this revision

Viewing changes to debian/patches/06_locale_parser.patch

  • Committer: Bazaar Package Importer
  • Author(s): Barry Warsaw
  • Date: 2011-08-11 17:00:57 UTC
  • mfrom: (6.2.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110811170057-6dmbfs4s3cchzl7x
Tags: 1.3.99.20110419-1ubuntu1
* Merge with Debian unstable.  Remaining Ubuntu changes:
  - Indicator support:
    + Add 05_appindicator.patch: Use an indicator rather than a notification
      icon.
    + debian/control: Recommend python-appindicator.
  - debian/control: Install im-switch instead of im-config by default.
  - debian/README.source: Removed, it was outdated and no longer correct
  - debian/patches/01_ubuntu_desktop: Fix "Desktop entry needs the
    X-Ubuntu-Gettext-Domain key"  (LP: #457632)
  - debian/patches/02_title_update.patch: Rename "IBus Preferences" to
    "Keyboard Input Methods"
  - debian/patches/06_locale_parser.patch: Cherry-picked from upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
## Description: Use LC_MESSAGES instead of LC_ALL in bus_ibus_impl_set_default_preload_engines
2
2
## Origin/Author: Yusuke Sato <yusukes@chromium.org>
3
3
## Bug: http://code.google.com/p/ibus/issues/detail?id=1204
4
 
Index: ibus-1.3.9/bus/ibusimpl.c
5
 
===================================================================
6
 
--- ibus-1.3.9.orig/bus/ibusimpl.c      2011-02-19 23:11:57.780435000 +0900
7
 
+++ ibus-1.3.9/bus/ibusimpl.c   2011-02-19 23:13:11.220435000 +0900
8
 
@@ -329,6 +329,11 @@
9
 
     return - ((gint) desc1->rank) + ((gint) desc2->rank);
 
4
--- a/bus/ibusimpl.c
 
5
+++ b/bus/ibusimpl.c
 
6
@@ -284,6 +284,11 @@
 
7
     g_object_unref (panel);
10
8
 }
11
9
 
12
10
+/**
15
13
+ * If the "preload_engines" config variable is not set yet, set the default value which is determined based on a current locale.
16
14
+ */
17
15
 static void
18
 
 bus_ibus_impl_set_default_preload_engines (BusIBusImpl *ibus)
19
 
 {
20
 
@@ -351,7 +356,14 @@
21
 
     }
22
 
 
23
 
     done = TRUE;
24
 
-    lang = g_strdup (setlocale (LC_ALL, NULL));
25
 
+
26
 
+    /* The setlocale call first checks LC_ALL. If it's not available, checks
27
 
+     * LC_CTYPE. If it's also not available, checks LANG. */
28
 
+    lang = g_strdup (setlocale (LC_CTYPE, NULL));
29
 
+    if (lang == NULL) {
30
 
+        return;
31
 
+    }
32
 
+
33
 
     p = index (lang, '.');
34
 
     if (p) {
35
 
         *p = '\0';
 
16
 bus_ibus_impl_set_hotkey (BusIBusImpl *ibus,
 
17
                           GQuark       hotkey,