[gnome-initial-setup] keyboard: Add the default input source regardless of type



commit 2c0234c3fd69bc7dcacbe3c6725500afc3274c55
Author: Rui Matos <tiagomatos gmail com>
Date:   Tue Sep 16 19:24:53 2014 +0200

    keyboard: Add the default input source regardless of type
    
    Some locales suggest an IBus engine as default input source. We should
    add it to the list and if we haven't been able to fetch the engine
    descriptions from IBus yet we use the id as label. Note that as soon
    as we connect to IBus and get the descriptions we'll update the label,
    see update_ibus_active_sources() .
    
    https://bugzilla.gnome.org/show_bug.cgi?id=736764

 .../pages/keyboard/cc-input-chooser.c              |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/gnome-initial-setup/pages/keyboard/cc-input-chooser.c 
b/gnome-initial-setup/pages/keyboard/cc-input-chooser.c
index 469ac0a..c071790 100644
--- a/gnome-initial-setup/pages/keyboard/cc-input-chooser.c
+++ b/gnome-initial-setup/pages/keyboard/cc-input-chooser.c
@@ -205,7 +205,10 @@ input_widget_new (CcInputChooser *chooser,
        }
 #ifdef HAVE_IBUS
         else if (g_str_equal (type, INPUT_SOURCE_TYPE_IBUS)) {
-               name = engine_get_display_name (g_hash_table_lookup (priv->ibus_engines, id));
+                if (priv->ibus_engines)
+                        name = engine_get_display_name (g_hash_table_lookup (priv->ibus_engines, id));
+                else
+                        name = id;
        }
 #endif
        else {
@@ -367,9 +370,8 @@ get_locale_infos (CcInputChooser *chooser)
        gchar *lang, *country;
        GList *list;
 
-       if (gnome_get_input_source_from_locale (priv->locale, &type, &id)) { 
-               if (g_str_equal (type, INPUT_SOURCE_TYPE_XKB))
-                       add_row_to_list (chooser, type, id);
+       if (gnome_get_input_source_from_locale (priv->locale, &type, &id)) {
+                add_row_to_list (chooser, type, id);
                if (!priv->id) {
                        priv->id = g_strdup (id);
                        priv->type = g_strdup (type);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]