diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-09-06 13:14:55 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-09-06 17:11:34 -0400 |
commit | d92a02f7a40c83417a32d91aba7c0e2033246099 (patch) | |
tree | 365d6efd8976814cb0379ecb4956f35c1216848a /gtk/gtkimmodule.c | |
parent | fd682a58de2ab07600c4007ac063e0ee635f814d (diff) | |
download | gtk+-d92a02f7a40c83417a32d91aba7c0e2033246099.tar.gz |
im module: Remvoe an unneeded variable
The G_DEFINE_TYPE macros automate the parent_class handling.
Diffstat (limited to 'gtk/gtkimmodule.c')
-rw-r--r-- | gtk/gtkimmodule.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/gtk/gtkimmodule.c b/gtk/gtkimmodule.c index 1367ffa8f4..a7f7b979d0 100644 --- a/gtk/gtkimmodule.c +++ b/gtk/gtkimmodule.c @@ -117,8 +117,6 @@ static gint n_loaded_contexts = 0; static GHashTable *contexts_hash = NULL; static GSList *modules_list = NULL; -static GObjectClass *parent_class = NULL; - static gboolean gtk_im_module_load (GTypeModule *module) { @@ -176,6 +174,8 @@ gtk_im_module_unload (GTypeModule *module) } } +G_DEFINE_TYPE (GtkIMModule, gtk_im_module, G_TYPE_TYPE_MODULE) + /* This only will ever be called if an error occurs during * initialization */ @@ -186,19 +186,15 @@ gtk_im_module_finalize (GObject *object) g_free (module->path); - parent_class->finalize (object); + G_OBJECT_CLASS (gtk_im_module_parent_class)->finalize (object); } -G_DEFINE_TYPE (GtkIMModule, gtk_im_module, G_TYPE_TYPE_MODULE) - static void gtk_im_module_class_init (GtkIMModuleClass *class) { GTypeModuleClass *module_class = G_TYPE_MODULE_CLASS (class); GObjectClass *gobject_class = G_OBJECT_CLASS (class); - parent_class = G_OBJECT_CLASS (g_type_class_peek_parent (class)); - module_class->load = gtk_im_module_load; module_class->unload = gtk_im_module_unload; |