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



commit 63fa61bd6a8e0a10d4deeca4001dd3f179595fbc
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 9e47de2..f46a118 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;
@@ -61,6 +96,11 @@ gf_input_sources_init (GfInputSources *sources)
   sources->input_source_manager = gf_input_source_manager_new (sources->ibus_manager);
 
   gf_input_source_manager_reload (sources->input_source_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]