summaryrefslogtreecommitdiff
path: root/gtk/gtkpixmap.c
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2006-05-02 23:56:43 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-05-02 23:56:43 +0000
commitf26aad1916445d25c99878138dfc384de67a2060 (patch)
treeb72263ecb326e82a49f1e8d1871ec4288b8aa299 /gtk/gtkpixmap.c
parent33cddd12d78abb2efe6facba9c859017f8df9819 (diff)
downloadgtk+-f26aad1916445d25c99878138dfc384de67a2060.tar.gz
Boilerplate reduction
Diffstat (limited to 'gtk/gtkpixmap.c')
-rw-r--r--gtk/gtkpixmap.c33
1 files changed, 2 insertions, 31 deletions
diff --git a/gtk/gtkpixmap.c b/gtk/gtkpixmap.c
index 0b1d48261e..3f211d08a1 100644
--- a/gtk/gtkpixmap.c
+++ b/gtk/gtkpixmap.c
@@ -38,40 +38,12 @@
#include "gtkalias.h"
-static void gtk_pixmap_class_init (GtkPixmapClass *klass);
-static void gtk_pixmap_init (GtkPixmap *pixmap);
static gint gtk_pixmap_expose (GtkWidget *widget,
GdkEventExpose *event);
static void gtk_pixmap_finalize (GObject *object);
static void build_insensitive_pixmap (GtkPixmap *gtkpixmap);
-static GtkWidgetClass *parent_class;
-
-GtkType
-gtk_pixmap_get_type (void)
-{
- static GtkType pixmap_type = 0;
-
- if (!pixmap_type)
- {
- static const GtkTypeInfo pixmap_info =
- {
- "GtkPixmap",
- sizeof (GtkPixmap),
- sizeof (GtkPixmapClass),
- (GtkClassInitFunc) gtk_pixmap_class_init,
- (GtkObjectInitFunc) gtk_pixmap_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- I_("GtkPixmap");
- pixmap_type = gtk_type_unique (GTK_TYPE_MISC, &pixmap_info);
- }
-
- return pixmap_type;
-}
+G_DEFINE_TYPE (GtkPixmap, gtk_pixmap, GTK_TYPE_MISC);
static void
gtk_pixmap_class_init (GtkPixmapClass *class)
@@ -80,7 +52,6 @@ gtk_pixmap_class_init (GtkPixmapClass *class)
GtkWidgetClass *widget_class;
widget_class = (GtkWidgetClass*) class;
- parent_class = gtk_type_class (gtk_misc_get_type ());
gobject_class->finalize = gtk_pixmap_finalize;
@@ -117,7 +88,7 @@ gtk_pixmap_finalize (GObject *object)
{
gtk_pixmap_set (GTK_PIXMAP (object), NULL, NULL);
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtk_pixmap_parent_class)->finalize (object);
}
void