[gnome-initial-setup] Fix building without IBus



commit 28f38bf2148e1b8d5d45b999cd5db615cdd8cff0
Author: Marcus Karlsson <mk acc umu se>
Date:   Tue Sep 2 21:07:31 2014 +0200

    Fix building without IBus
    
    It is not possible to successfully build cc-input-chooser.c when
    HAVE_IBUS is undefined. Make sure that all code fragments which depends
    on IBus are wrapped within ifdefs. Also remove the second include of
    cc-ibus-utils.h since it is included twice and the first include is
    already protected by an ifdef.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=730305

 .../pages/keyboard/cc-input-chooser.c              |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gnome-initial-setup/pages/keyboard/cc-input-chooser.c 
b/gnome-initial-setup/pages/keyboard/cc-input-chooser.c
index a48dcec..12eaa1c 100644
--- a/gnome-initial-setup/pages/keyboard/cc-input-chooser.c
+++ b/gnome-initial-setup/pages/keyboard/cc-input-chooser.c
@@ -39,7 +39,6 @@
 
 #include "cc-common-language.h"
 #include "cc-util.h"
-#include "cc-ibus-utils.h"
 
 #include <glib-object.h>
 
@@ -203,9 +202,12 @@ input_widget_new (CcInputChooser *chooser,
 
        if (g_str_equal (type, INPUT_SOURCE_TYPE_XKB)) {
                gnome_xkb_info_get_layout_info (priv->xkb_info, id, &name, NULL, NULL, NULL);
-       } else if (g_str_equal (type, INPUT_SOURCE_TYPE_IBUS)) {
+       }
+#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));
        }
+#endif
        else {
                name = "ERROR";
        }
@@ -659,7 +661,6 @@ fetch_ibus_engines_result (GObject       *object,
 
         sync_all_checkmarks (chooser);
 }
-#endif
 
 static void
 fetch_ibus_engines (CcInputChooser *chooser)
@@ -693,6 +694,7 @@ maybe_start_ibus (void)
                                               NULL,
                                               NULL));
 }
+#endif
 
 static void
 cc_input_chooser_constructed (GObject *object)


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