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



commit f0946755ac245e831ffb3be400bbc169a8d7f8ec
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            |   48 +++++++++++++++++++-
 1 files changed, 46 insertions(+), 2 deletions(-)
---
diff --git a/gnome-flashback/libinput-sources/gf-input-sources.c 
b/gnome-flashback/libinput-sources/gf-input-sources.c
index bd02248..6926ffe 100644
--- a/gnome-flashback/libinput-sources/gf-input-sources.c
+++ b/gnome-flashback/libinput-sources/gf-input-sources.c
@@ -18,22 +18,66 @@
 #include "config.h"
 
 #include "gf-input-sources.h"
+#include "gf-ibus-manager.h"
 
 struct _GfInputSources
 {
   GObject parent;
+
+  GfIBusManager *manager;
 };
 
 G_DEFINE_TYPE (GfInputSources, gf_input_sources, G_TYPE_OBJECT)
 
 static void
-gf_input_sources_class_init (GfInputSourcesClass *input_sources_class)
+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
-gf_input_sources_init (GfInputSources *input_sources)
+set_content_type (GfIBusManager *manager,
+                  guint purpose,
+                  guint hint,
+                  gpointer user_data)
 {
+    g_warning ("set_content_type");
+}
+
+
+static void
+gf_input_sources_class_init (GfInputSourcesClass *sources_class)
+{
+}
+
+static void
+gf_input_sources_init (GfInputSources *sources) {
+  sources->manager = gf_ibus_manager_new ();
+
+  g_signal_connect(sources->manager, "ready", G_CALLBACK (ready_callback), sources);
+  g_signal_connect(sources->manager, "properties-registered", G_CALLBACK (properties_registered), sources);
+  g_signal_connect(sources->manager, "property-updated", G_CALLBACK (property_updated), sources);
+  g_signal_connect(sources->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]