diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-10-19 19:28:27 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-10-19 19:28:27 +0000 |
commit | effa390541fec858ea0d19027bfa6bfcaaa33a58 (patch) | |
tree | c065d2b5e9a40dfce0c02883aab72e2894e5c25f /gtk/gtkimcontextsimple.c | |
parent | fcc879074823616ea2017f927cecd344f35c1858 (diff) | |
download | gtk+-effa390541fec858ea0d19027bfa6bfcaaa33a58.tar.gz |
Make GtkIMContext derive from GObject, not GtkObject. (#62621)
Fri Oct 19 15:08:30 2001 Owen Taylor <otaylor@redhat.com>
* gtk/{gtkimcontext.c,gtkimcontextsimple.c,gtkimmulticontext.c}
modules/input/{gtkimcontextxim.c,imcyrillic-translit.c,iminuktitut.c,
imipa.c,imthai-broken.c,imviqr.c}: Make GtkIMContext derive from
GObject, not GtkObject. (#62621)
Diffstat (limited to 'gtk/gtkimcontextsimple.c')
-rw-r--r-- | gtk/gtkimcontextsimple.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c index 45b104faf2..0f3304ac48 100644 --- a/gtk/gtkimcontextsimple.c +++ b/gtk/gtkimcontextsimple.c @@ -761,19 +761,22 @@ gtk_im_context_simple_get_type (void) if (!im_context_simple_type) { - static const GtkTypeInfo im_context_simple_info = + static const GTypeInfo im_context_simple_info = { - "GtkIMContextSimple", - sizeof (GtkIMContextSimple), - sizeof (GtkIMContextSimpleClass), - (GtkClassInitFunc) gtk_im_context_simple_class_init, - (GtkObjectInitFunc) gtk_im_context_simple_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, + sizeof (GtkIMContextSimpleClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) gtk_im_context_simple_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (GtkIMContextSimple), + 0, /* n_preallocs */ + (GInstanceInitFunc) gtk_im_context_simple_init, }; - - im_context_simple_type = gtk_type_unique (GTK_TYPE_IM_CONTEXT, &im_context_simple_info); + + im_context_simple_type = g_type_register_static (GTK_TYPE_IM_CONTEXT, + "GtkIMContextSimple", + &im_context_simple_info, 0); } return im_context_simple_type; @@ -817,7 +820,7 @@ gtk_im_context_simple_finalize (GObject *obj) GtkIMContext * gtk_im_context_simple_new (void) { - return GTK_IM_CONTEXT (gtk_type_new (GTK_TYPE_IM_CONTEXT_SIMPLE)); + return GTK_IM_CONTEXT (g_object_new (GTK_TYPE_IM_CONTEXT_SIMPLE, NULL)); } static void @@ -840,11 +843,10 @@ gtk_im_context_simple_commit_char (GtkIMContext *context, { context_simple->tentative_match = 0; context_simple->tentative_match_len = 0; - gtk_signal_emit_by_name (GTK_OBJECT (context_simple), - "preedit_changed"); + g_signal_emit_by_name (context_simple, "preedit_changed"); } - gtk_signal_emit_by_name (GTK_OBJECT (context), "commit", &buf); + g_signal_emit_by_name (context, "commit", &buf); } static int @@ -912,8 +914,7 @@ check_table (GtkIMContextSimple *context_simple, context_simple->tentative_match = value; context_simple->tentative_match_len = n_compose; - gtk_signal_emit_by_name (GTK_OBJECT (context_simple), - "preedit_changed"); + g_signal_emit_by_name (context_simple, "preedit_changed"); return TRUE; } @@ -992,8 +993,7 @@ check_hex (GtkIMContextSimple *context_simple, context_simple->tentative_match = n; context_simple->tentative_match_len = n_compose; - gtk_signal_emit_by_name (GTK_OBJECT (context_simple), - "preedit-changed"); + g_signal_emit_by_name (context_simple, "preedit-changed"); return TRUE; } |