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
This commit is contained in:
Руслан Ижбулатов 2018-03-08 00:26:39 +00:00
parent 7ccf6a7df7
commit 139a627a85
2 changed files with 6 additions and 11 deletions

View File

@ -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);
}

View File

@ -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);