File jamin-gtk-type-fix.patch of Package jamin

---
 src/gtkmeter.c      |   32 +++-----------------------------
 src/gtkmeter.h      |    2 +-
 src/gtkmeterscale.c |   33 +++------------------------------
 src/gtkmeterscale.h |    2 +-
 4 files changed, 8 insertions(+), 61 deletions(-)

--- a/src/gtkmeter.c
+++ b/src/gtkmeter.c
@@ -54,31 +54,7 @@ static int meter_count = 0;
 
 /* Local data */
 
-static GtkWidgetClass *parent_class = NULL;
-
-guint
-gtk_meter_get_type ()
-{
-  static guint meter_type = 0;
-
-  if (!meter_type)
-    {
-      GtkTypeInfo meter_info =
-      {
-	"GtkMeter",
-	sizeof (GtkMeter),
-	sizeof (GtkMeterClass),
-	(GtkClassInitFunc) gtk_meter_class_init,
-	(GtkObjectInitFunc) gtk_meter_init,
-	/*(GtkArgSetFunc)*/ NULL,
-	/*(GtkArgGetFunc)*/ NULL,
-      };
-
-      meter_type = gtk_type_unique (gtk_widget_get_type (), &meter_info);
-    }
-
-  return meter_type;
-}
+G_DEFINE_TYPE (GtkMeter, gtk_meter, GTK_TYPE_WIDGET);
 
 static void
 gtk_meter_class_init (GtkMeterClass *class)
@@ -89,8 +65,6 @@ gtk_meter_class_init (GtkMeterClass *cla
   object_class = (GtkObjectClass*) class;
   widget_class = (GtkWidgetClass*) class;
 
-  parent_class = gtk_type_class (gtk_widget_get_type ());
-
   object_class->destroy = gtk_meter_destroy;
 
   widget_class->realize = gtk_meter_realize;
@@ -145,8 +119,8 @@ gtk_meter_destroy (GtkObject *object)
   if (meter->adjustment)
     gtk_object_unref (GTK_OBJECT (meter->adjustment));
 
-  if (GTK_OBJECT_CLASS (parent_class)->destroy)
-    (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+  if (GTK_OBJECT_CLASS (gtk_meter_parent_class)->destroy)
+    (* GTK_OBJECT_CLASS (gtk_meter_parent_class)->destroy) (object);
 }
 
 GtkAdjustment*
--- a/src/gtkmeterscale.c
+++ b/src/gtkmeterscale.c
@@ -43,32 +43,7 @@ static void meterscale_draw_notch(GtkMet
 
 /* Local data */
 
-static GtkWidgetClass *parent_class = NULL;
-
-guint
-gtk_meterscale_get_type ()
-{
-  static guint meterscale_type = 0;
-
-  if (!meterscale_type)
-    {
-      GtkTypeInfo meterscale_info =
-      {
-	"GtkMeterScale",
-	sizeof (GtkMeterScale),
-	sizeof (GtkMeterScaleClass),
-	(GtkClassInitFunc) gtk_meterscale_class_init,
-	(GtkObjectInitFunc) gtk_meterscale_init,
-	/*(GtkArgSetFunc)*/ NULL,
-	/*(GtkArgGetFunc)*/ NULL,
-      };
-
-      meterscale_type = gtk_type_unique (gtk_widget_get_type (),
-		      &meterscale_info);
-    }
-
-  return meterscale_type;
-}
+G_DEFINE_TYPE (GtkMeterScale, gtk_meterscale, GTK_TYPE_WIDGET);
 
 static void
 gtk_meterscale_class_init (GtkMeterScaleClass *class)
@@ -79,8 +54,6 @@ gtk_meterscale_class_init (GtkMeterScale
   object_class = (GtkObjectClass*) class;
   widget_class = (GtkWidgetClass*) class;
 
-  parent_class = gtk_type_class (gtk_widget_get_type ());
-
   object_class->destroy = gtk_meterscale_destroy;
 
   widget_class->realize = gtk_meterscale_realize;
@@ -127,8 +100,8 @@ gtk_meterscale_destroy (GtkObject *objec
 
   meterscale = GTK_METERSCALE (object);
 
-  if (GTK_OBJECT_CLASS (parent_class)->destroy)
-    (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+  if (GTK_OBJECT_CLASS (gtk_meterscale_parent_class)->destroy)
+    (* GTK_OBJECT_CLASS (gtk_meterscale_parent_class)->destroy) (object);
 }
 
 static void
--- a/src/gtkmeter.h
+++ b/src/gtkmeter.h
@@ -87,7 +87,7 @@ struct _GtkMeterClass
 GtkWidget*     gtk_meter_new                    (GtkAdjustment *adjustment,
 						 gint direction);
 
-guint          gtk_meter_get_type               (void);
+GtkType        gtk_meter_get_type               (void);
 GtkAdjustment* gtk_meter_get_adjustment         (GtkMeter     *meter);
 
 void           gtk_meter_set_adjustment         (GtkMeter     *meter,
--- a/src/gtkmeterscale.h
+++ b/src/gtkmeterscale.h
@@ -67,7 +67,7 @@ GtkWidget*     gtk_meterscale_new
 						 gfloat min,
 						 gfloat max);
 
-guint          gtk_meterscale_get_type          (void);
+GtkType        gtk_meterscale_get_type          (void);
 
 #ifdef __cplusplus
 }