[gnome-flashback/wip/segeiger/inputmethods: 6/8] input-sources: setup GfIBusManager in GfInputSources and add some debug warnings



commit 2cdc497dd8a15c84ff6e1eceaf17dfa574f7ee36
Author: Sebastian Geiger <sbastig gmx net>
Date:   Fri Sep 18 20:44:00 2015 +0200

    input-sources: setup GfIBusManager in GfInputSources and add some debug warnings

 .../libinput-sources/gf-input-sources.c            |   40 ++++++++++++++++++++
 1 files changed, 40 insertions(+), 0 deletions(-)
---
diff --git a/gnome-flashback/libinput-sources/gf-input-sources.c 
b/gnome-flashback/libinput-sources/gf-input-sources.c
index 66e68e6..fec55bb 100644
--- a/gnome-flashback/libinput-sources/gf-input-sources.c
+++ b/gnome-flashback/libinput-sources/gf-input-sources.c
@@ -32,6 +32,41 @@ struct _GfInputSources
 G_DEFINE_TYPE (GfInputSources, gf_input_sources, G_TYPE_OBJECT)
 
 static void
+ready_callback (GfIBusManager *manager,
+                gboolean ready,
+                gpointer user_data)
+{
+    g_warning ("ready_callback: %s", ready ? "true" : "false");
+}
+
+static void
+properties_registered (GfIBusManager *manager,
+                       gchar* currentEngineName,
+                       IBusPropList *propertyList,
+                       gpointer user_data)
+{
+    g_warning ("properties_registered");
+}
+
+static void
+property_updated (GfIBusManager *manager,
+                  gchar *currentEngineName,
+                  IBusProperty *property,
+                  gpointer user_data)
+{
+    g_warning ("property_updated");
+}
+
+static void
+set_content_type (GfIBusManager *manager,
+                  guint purpose,
+                  guint hint,
+                  gpointer user_data)
+{
+    g_warning ("set_content_type");
+}
+
+static void
 gf_input_sources_dispose (GObject *object)
 {
   GfInputSources *sources;
@@ -59,6 +94,11 @@ gf_input_sources_init (GfInputSources *sources)
 {
   sources->ibus_manager = gf_ibus_manager_new ();
   sources->input_source_manager = gf_input_source_manager_new (sources->ibus_manager);
+
+  g_signal_connect(sources->ibus_manager, "ready", G_CALLBACK (ready_callback), sources);
+  g_signal_connect(sources->ibus_manager, "properties-registered", G_CALLBACK (properties_registered), 
sources);
+  g_signal_connect(sources->ibus_manager, "property-updated", G_CALLBACK (property_updated), sources);
+  g_signal_connect(sources->ibus_manager, "set-content-type", G_CALLBACK (set_content_type), sources);
 }
 
 GfInputSources *


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