[gnome-flashback/gnome-3-18] input-sources: change GfCandidatePopup parent class to GfPopupWindow



commit 9462c6c2c4fc59c7f053120ad847b3e314b54915
Author: Sebastian Geiger <sbastig gmx net>
Date:   Mon Jan 18 13:26:52 2016 +0100

    input-sources: change GfCandidatePopup parent class to GfPopupWindow

 .../libinput-sources/gf-candidate-popup.c          |    4 ++--
 .../libinput-sources/gf-candidate-popup.h          |    4 ++--
 gnome-flashback/libinput-sources/gf-ibus-manager.c |    7 ++++++-
 3 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/gnome-flashback/libinput-sources/gf-candidate-popup.c 
b/gnome-flashback/libinput-sources/gf-candidate-popup.c
index 32d6a63..a0c1a5c 100644
--- a/gnome-flashback/libinput-sources/gf-candidate-popup.c
+++ b/gnome-flashback/libinput-sources/gf-candidate-popup.c
@@ -21,12 +21,12 @@
 
 struct _GfCandidatePopup
 {
-  GObject           parent;
+  GfPopupWindow     parent;
 
   IBusPanelService *service;
 };
 
-G_DEFINE_TYPE (GfCandidatePopup, gf_candidate_popup, G_TYPE_OBJECT)
+G_DEFINE_TYPE (GfCandidatePopup, gf_candidate_popup, GF_TYPE_POPUP_WINDOW)
 
 static void
 set_cursor_location_cb (IBusPanelService *service,
diff --git a/gnome-flashback/libinput-sources/gf-candidate-popup.h 
b/gnome-flashback/libinput-sources/gf-candidate-popup.h
index 8a79979..788125f 100644
--- a/gnome-flashback/libinput-sources/gf-candidate-popup.h
+++ b/gnome-flashback/libinput-sources/gf-candidate-popup.h
@@ -18,14 +18,14 @@
 #ifndef GF_CANDIDATE_POPUP_H
 #define GF_CANDIDATE_POPUP_H
 
-#include <glib-object.h>
 #include <ibus-1.0/ibus.h>
+#include <libcommon/gf-popup-window.h>
 
 G_BEGIN_DECLS
 
 #define GF_TYPE_CANDIDATE_POPUP gf_candidate_popup_get_type ()
 G_DECLARE_FINAL_TYPE (GfCandidatePopup, gf_candidate_popup,
-                      GF, CANDIDATE_POPUP, GObject)
+                      GF, CANDIDATE_POPUP, GfPopupWindow)
 
 GfCandidatePopup *gf_candidate_popup_new               (void);
 
diff --git a/gnome-flashback/libinput-sources/gf-ibus-manager.c 
b/gnome-flashback/libinput-sources/gf-ibus-manager.c
index 99b5aac..c122e8a 100644
--- a/gnome-flashback/libinput-sources/gf-ibus-manager.c
+++ b/gnome-flashback/libinput-sources/gf-ibus-manager.c
@@ -387,7 +387,12 @@ gf_ibus_manager_dispose (GObject *object)
 
   manager = GF_IBUS_MANAGER (object);
 
-  g_clear_object (&manager->candidate_popup);
+  if (manager->candidate_popup != NULL)
+    {
+      gtk_widget_destroy (GTK_WIDGET (manager->candidate_popup));
+      manager->candidate_popup = NULL;
+    }
+
   g_clear_object (&manager->subprocess);
 
   if (manager->engines != NULL)


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