summaryrefslogtreecommitdiff
path: root/gtk/gtkimmodule.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2006-05-03 17:07:09 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-05-03 17:07:09 +0000
commite272345b5d41bfe7272f72cccc7073442db49b8d (patch)
tree9e291c6c4e43d40017560b130607f5d597e66e83 /gtk/gtkimmodule.c
parent7f399f19f975dbf667f9df205ca1af3807c80511 (diff)
downloadgtk+-e272345b5d41bfe7272f72cccc7073442db49b8d.tar.gz
More G_DEFINE_TYPE conversion.
2006-05-03 Matthias Clasen <mclasen@redhat.com> * gtk/gtkaccessible.c: * gtk/gtkclipboard.c: * gtk/gtkfilefilter.c: * gtk/gtkimmodule.c: * gtk/gtkmenubar.c: More G_DEFINE_TYPE conversion.
Diffstat (limited to 'gtk/gtkimmodule.c')
-rw-r--r--gtk/gtkimmodule.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/gtk/gtkimmodule.c b/gtk/gtkimmodule.c
index 618e2f9496..3b126e8f44 100644
--- a/gtk/gtkimmodule.c
+++ b/gtk/gtkimmodule.c
@@ -154,6 +154,8 @@ gtk_im_module_finalize (GObject *object)
parent_class->finalize (object);
}
+G_DEFINE_TYPE (GtkIMModule, gtk_im_module, G_TYPE_TYPE_MODULE);
+
static void
gtk_im_module_class_init (GtkIMModuleClass *class)
{
@@ -168,20 +170,9 @@ gtk_im_module_class_init (GtkIMModuleClass *class)
gobject_class->finalize = gtk_im_module_finalize;
}
-static GType
-gtk_im_module_get_type (void)
+static void
+gtk_im_module_init (GtkIMModule* object)
{
- static GType im_module_type = 0;
-
- if (!im_module_type)
- im_module_type =
- g_type_register_static_simple (G_TYPE_TYPE_MODULE, I_("GtkIMModule"),
- sizeof (GtkIMModuleClass),
- (GClassInitFunc)gtk_im_module_class_init,
- sizeof (GtkIMModule),
- NULL, 0);
-
- return im_module_type;
}
static void
@@ -260,7 +251,7 @@ correct_libdir_prefix (gchar **path)
static void
-gtk_im_module_init (void)
+gtk_im_module_initialize (void)
{
GString *line_buf = g_string_new (NULL);
GString *tmp_buf = g_string_new (NULL);
@@ -424,7 +415,7 @@ _gtk_im_module_list (const GtkIMContextInfo ***contexts,
};
if (!contexts_hash)
- gtk_im_module_init ();
+ gtk_im_module_initialize ();
if (n_contexts)
*n_contexts = (n_loaded_contexts + 1);
@@ -471,7 +462,7 @@ _gtk_im_module_create (const gchar *context_id)
GtkIMContext *context = NULL;
if (!contexts_hash)
- gtk_im_module_init ();
+ gtk_im_module_initialize ();
if (strcmp (context_id, SIMPLE_ID) != 0)
{
@@ -545,7 +536,7 @@ _gtk_im_module_get_default_context_id (const gchar *locale)
const gchar *envvar;
if (!contexts_hash)
- gtk_im_module_init ();
+ gtk_im_module_initialize ();
envvar = g_getenv ("GTK_IM_MODULE");
if (envvar &&