[gtk] gtkimcontextime: fix to compile again
- From: LRN <ruslanizhb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] gtkimcontextime: fix to compile again
- Date: Wed, 28 Mar 2018 09:30:04 +0000 (UTC)
commit 139a627a85c07c4f838681f73e95ec86da3d7ecd
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date: Thu Mar 8 00:26:39 2018 +0000
gtkimcontextime: fix to compile again
This makes the code compile again, though obviously there have been
some substantial changes in how IM contexts work, so it's possible
that IME IM context doesn't work now.
https://bugzilla.gnome.org/show_bug.cgi?id=773299
gtk/gtkimcontextime.c | 13 +++----------
gtk/gtkimcontextime.h | 4 +++-
2 files changed, 6 insertions(+), 11 deletions(-)
---
diff --git a/gtk/gtkimcontextime.c b/gtk/gtkimcontextime.c
index a3c8150a1a..de202faa46 100644
--- a/gtk/gtkimcontextime.c
+++ b/gtk/gtkimcontextime.c
@@ -34,7 +34,7 @@
#include "gdk/gdkkeysyms.h"
#include "gdk/win32/gdkwin32.h"
-#include "gdk/gdkkeysyms.h"
+#include "gtk/gtkimmodule.h"
#include <pango/pango.h>
@@ -81,8 +81,6 @@ struct _GtkIMContextIMEPrivate
/* GObject class methods */
-static void gtk_im_context_ime_class_init (GtkIMContextIMEClass *class);
-static void gtk_im_context_ime_init (GtkIMContextIME *context_ime);
static void gtk_im_context_ime_dispose (GObject *obj);
static void gtk_im_context_ime_finalize (GObject *obj);
@@ -126,9 +124,6 @@ static void cb_client_widget_hierarchy_changed (GtkWidget *widget,
GtkWidget *widget2,
GtkIMContextIME *context_ime);
-#define GTK_TYPE_IM_CONTEXT_IME (gtk_im_context_ime_get_type ())
-#define GTK_IM_CONTEXT_IME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_IM_CONTEXT_IME,
GtkIMContextIME))
-
G_DEFINE_TYPE_WITH_CODE (GtkIMContextIME, gtk_im_context_ime, GTK_TYPE_IM_CONTEXT,
gtk_im_module_ensure_extension_point ();
g_io_extension_point_implement (GTK_IM_MODULE_EXTENSION_POINT_NAME,
@@ -193,8 +188,7 @@ gtk_im_context_ime_dispose (GObject *obj)
FREE_PREEDIT_BUFFER (context_ime);
- if (G_OBJECT_CLASS (parent_class)->dispose)
- G_OBJECT_CLASS (parent_class)->dispose (obj);
+ G_OBJECT_CLASS (gtk_im_context_ime_parent_class)->dispose (obj);
}
@@ -207,8 +201,7 @@ gtk_im_context_ime_finalize (GObject *obj)
g_free (context_ime->priv);
context_ime->priv = NULL;
- if (G_OBJECT_CLASS (parent_class)->finalize)
- G_OBJECT_CLASS (parent_class)->finalize (obj);
+ G_OBJECT_CLASS (gtk_im_context_ime_parent_class)->finalize (obj);
}
diff --git a/gtk/gtkimcontextime.h b/gtk/gtkimcontextime.h
index 55ca6d57a5..4d0a99e5d6 100644
--- a/gtk/gtkimcontextime.h
+++ b/gtk/gtkimcontextime.h
@@ -21,7 +21,7 @@
#include <gtk/gtk.h>
-#define GTK_TYPE_IM_CONTEXT_IME gtk_type_im_context_ime
+#define GTK_TYPE_IM_CONTEXT_IME (gtk_im_context_ime_get_type ())
#define GTK_IM_CONTEXT_IME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_IM_CONTEXT_IME,
GtkIMContextIME))
#define GTK_IM_CONTEXT_IME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_IM_CONTEXT_IME,
GtkIMContextIMEClass))
#define GTK_IS_IM_CONTEXT_IME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_IM_CONTEXT_IME))
@@ -53,6 +53,8 @@ struct _GtkIMContextIMEClass
GtkIMContextClass parent_class;
};
+GDK_AVAILABLE_IN_ALL
+GType gtk_im_context_ime_get_type (void) G_GNUC_CONST;
void gtk_im_context_ime_register_type (GTypeModule * type_module);
GtkIMContext *gtk_im_context_ime_new (void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]