summaryrefslogtreecommitdiff
path: root/gtk/gtkvscale.c
diff options
context:
space:
mode:
authorManish Singh <yosh@gimp.org>2002-10-04 22:49:28 +0000
committerManish Singh <yosh@src.gnome.org>2002-10-04 22:49:28 +0000
commit2aa899147773436da85d0b43711c526c3ee8cf99 (patch)
tree620113290ff719826a224d9dd5a1b6a181264343 /gtk/gtkvscale.c
parentfc7534bbcbf839799a145dcf106d3a9f7eb8a570 (diff)
downloadgtk+-2aa899147773436da85d0b43711c526c3ee8cf99.tar.gz
Deprecation cleanup
Fri Oct 4 15:47:06 2002 Manish Singh <yosh@gimp.org> * gtkbbox.[ch] gtkhbbox.[ch] gtkhscale.[ch] gtkscale.[ch] gtkvscale.[ch] gtkvbbox.[ch]: Deprecation cleanup
Diffstat (limited to 'gtk/gtkvscale.c')
-rw-r--r--gtk/gtkvscale.c39
1 files changed, 16 insertions, 23 deletions
diff --git a/gtk/gtkvscale.c b/gtk/gtkvscale.c
index 9fa56f76ef..ae28fddfdc 100644
--- a/gtk/gtkvscale.c
+++ b/gtk/gtkvscale.c
@@ -28,7 +28,6 @@
#include <stdio.h>
#include <stdlib.h>
#include "gtkvscale.h"
-#include "gtksignal.h"
#include "gtkintl.h"
#define VALUE_SPACING 2
@@ -40,26 +39,28 @@ static void gtk_vscale_init (GtkVScale *vscale);
static gboolean gtk_vscale_expose (GtkWidget *widget,
GdkEventExpose *event);
-GtkType
+GType
gtk_vscale_get_type (void)
{
- static GtkType vscale_type = 0;
+ static GType vscale_type = 0;
if (!vscale_type)
{
- static const GtkTypeInfo vscale_info =
+ static const GTypeInfo vscale_info =
{
- "GtkVScale",
- sizeof (GtkVScale),
- sizeof (GtkVScaleClass),
- (GtkClassInitFunc) gtk_vscale_class_init,
- (GtkObjectInitFunc) gtk_vscale_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
+ sizeof (GtkVScaleClass),
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) gtk_vscale_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (GtkVScale),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) gtk_vscale_init,
};
- vscale_type = gtk_type_unique (GTK_TYPE_SCALE, &vscale_info);
+ vscale_type = g_type_register_static (GTK_TYPE_SCALE, "GtkVScale",
+ &vscale_info, 0);
}
return vscale_type;
@@ -68,11 +69,9 @@ gtk_vscale_get_type (void)
static void
gtk_vscale_class_init (GtkVScaleClass *class)
{
- GObjectClass *gobject_class;
GtkWidgetClass *widget_class;
GtkRangeClass *range_class;
- gobject_class = G_OBJECT_CLASS (class);
widget_class = GTK_WIDGET_CLASS (class);
range_class = GTK_RANGE_CLASS (class);
@@ -96,13 +95,7 @@ gtk_vscale_init (GtkVScale *vscale)
GtkWidget*
gtk_vscale_new (GtkAdjustment *adjustment)
{
- GtkWidget *vscale;
-
- vscale = gtk_widget_new (GTK_TYPE_VSCALE,
- "adjustment", adjustment,
- NULL);
-
- return vscale;
+ return g_object_new (GTK_TYPE_VSCALE, "adjustment", adjustment, NULL);
}
@@ -235,7 +228,7 @@ gtk_vscale_expose (GtkWidget *widget,
x, y,
layout);
- g_object_unref (G_OBJECT (layout));
+ g_object_unref (layout);
}
return FALSE;