[gnome-flashback/wip/segeiger/inputmethods: 6/7] input-sources: add gf_ibus_manager_get_ibus_manager



commit 302e7fdefecf9d300060da2342e1d9de37513b6e
Author: Sebastian Geiger <sbastig gmx net>
Date:   Fri Sep 18 02:57:43 2015 +0200

    input-sources: add gf_ibus_manager_get_ibus_manager

 gnome-flashback/libinput-sources/gf-ibus-manager.c |    9 +++++++++
 gnome-flashback/libinput-sources/gf-ibus-manager.h |    2 ++
 2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/gnome-flashback/libinput-sources/gf-ibus-manager.c 
b/gnome-flashback/libinput-sources/gf-ibus-manager.c
index 831f349..9443cc4 100644
--- a/gnome-flashback/libinput-sources/gf-ibus-manager.c
+++ b/gnome-flashback/libinput-sources/gf-ibus-manager.c
@@ -359,6 +359,15 @@ gf_ibus_manager_new (void)
   return g_object_new (GF_TYPE_IBUS_MANAGER, NULL);
 }
 
+GfIBusManager *gf_ibus_manager_get_ibus_manager (void)
+{
+  static GfIBusManager* manager = NULL;
+  if (manager == NULL) {
+    manager = gf_ibus_manager_new ();
+  }
+  return manager;
+}
+
 void
 gf_ibus_manager_preload_engines (GfIBusManager  *manager,
                                  gchar         **ids)
diff --git a/gnome-flashback/libinput-sources/gf-ibus-manager.h 
b/gnome-flashback/libinput-sources/gf-ibus-manager.h
index ff7a6d9..f59e0f9 100644
--- a/gnome-flashback/libinput-sources/gf-ibus-manager.h
+++ b/gnome-flashback/libinput-sources/gf-ibus-manager.h
@@ -27,6 +27,8 @@ G_DECLARE_FINAL_TYPE (GfIBusManager, gf_ibus_manager,
 
 GfIBusManager  *gf_ibus_manager_new                    (void);
 
+GfIBusManager  *gf_ibus_manager_get_ibus_manager       (void);
+
 void            gf_ibus_manager_preload_engines        (GfIBusManager        *manager,
                                                         gchar               **ids);
 


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