[gtk+] im module: Remvoe an unneeded variable
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] im module: Remvoe an unneeded variable
- Date: Sun, 6 Sep 2015 21:14:35 +0000 (UTC)
commit d92a02f7a40c83417a32d91aba7c0e2033246099
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Sep 6 13:14:55 2015 -0400
im module: Remvoe an unneeded variable
The G_DEFINE_TYPE macros automate the parent_class handling.
gtk/gtkimmodule.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkimmodule.c b/gtk/gtkimmodule.c
index 1367ffa..a7f7b97 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]