Commit 8b6a832f authored by Manish Singh's avatar Manish Singh Committed by Manish Singh

deprecation cleanup

Sat Oct  5 16:11:22 2002  Manish Singh  <yosh@gimp.org>

        * gtk/gtkmisc.[ch] gtk/gtklabel.[ch] gtk/gtkimage.[ch]
        gtk/gtkdrawingarea.[ch] gtk/gtknotebook.[ch]: deprecation cleanup
parent 86322297
Sat Oct 5 16:11:22 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkmisc.[ch] gtk/gtklabel.[ch] gtk/gtkimage.[ch]
gtk/gtkdrawingarea.[ch] gtk/gtknotebook.[ch]: deprecation cleanup
Sat Oct 5 18:30:50 2002 Owen Taylor <otaylor@redhat.com>
* gtk/stock-icons/Makefile.am (pixbuf_csource): Use
......@@ -25,9 +30,9 @@ Sat Oct 5 16:47:03 2002 Soeren Sandmann <sandmann@daimi.au.dk>
Fri Oct 4 18:40:50 2002 Manish Singh <yosh@gimp.org>
* gtkcheckmenuitem.[ch] gtkimagemenuitem.[ch] gtkmenu.[ch]
gtkmenubar.[ch] gtkmenuitem.[ch] gtkmenushell.[ch]
gtkradiomenuitem.[ch]: Deprecation cleanup
* gtk/gtkcheckmenuitem.[ch] gtk/gtkimagemenuitem.[ch] gtk/gtkmenu.[ch]
gtk/gtkmenubar.[ch] gtk/gtkmenuitem.[ch] gtk/gtkmenushell.[ch]
gtk/gtkradiomenuitem.[ch]: Deprecation cleanup
Fri Oct 4 16:48:27 2002 Manish Singh <yosh@gimp.org>
......@@ -109,9 +114,9 @@ Fri Oct 4 11:43:47 2002 Owen Taylor <otaylor@redhat.com>
Fri Oct 4 00:57:53 2002 Manish Singh <yosh@gimp.org>
* gtkhscrollbar.[ch] gtkhseparator.[ch] gtkrange.[ch]
gtkscrollbar.[ch] gtkseparator.[ch] gtkseparatormenuitem.h
gtkvscrollbar.[ch] gtkvseparator.[ch]: Deprecation cleanup
* gtk/gtkhscrollbar.[ch] gtk/gtkhseparator.[ch] gtk/gtkrange.[ch]
gtk/gtkscrollbar.[ch] gtk/gtkseparator.[ch] gtk/gtkseparatormenuitem.h
gtk/gtkvscrollbar.[ch] gtk/gtkvseparator.[ch]: Deprecation cleanup
Thu Oct 3 22:38:12 2002 Manish Singh <yosh@gimp.org>
......@@ -235,7 +240,7 @@ Wed Oct 2 08:47:31 2002 Owen Taylor <otaylor@redhat.com>
Tue Oct 1 12:53:44 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkwindow-decorate.c gtkwindow.[ch]: Deprecation cleanup
* gtk/gtkwindow-decorate.c gtk/gtkwindow.[ch]: Deprecation cleanup
2002-10-01 jacob berkman <jacob@ximian.com>
......
Sat Oct 5 16:11:22 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkmisc.[ch] gtk/gtklabel.[ch] gtk/gtkimage.[ch]
gtk/gtkdrawingarea.[ch] gtk/gtknotebook.[ch]: deprecation cleanup
Sat Oct 5 18:30:50 2002 Owen Taylor <otaylor@redhat.com>
* gtk/stock-icons/Makefile.am (pixbuf_csource): Use
......@@ -25,9 +30,9 @@ Sat Oct 5 16:47:03 2002 Soeren Sandmann <sandmann@daimi.au.dk>
Fri Oct 4 18:40:50 2002 Manish Singh <yosh@gimp.org>
* gtkcheckmenuitem.[ch] gtkimagemenuitem.[ch] gtkmenu.[ch]
gtkmenubar.[ch] gtkmenuitem.[ch] gtkmenushell.[ch]
gtkradiomenuitem.[ch]: Deprecation cleanup
* gtk/gtkcheckmenuitem.[ch] gtk/gtkimagemenuitem.[ch] gtk/gtkmenu.[ch]
gtk/gtkmenubar.[ch] gtk/gtkmenuitem.[ch] gtk/gtkmenushell.[ch]
gtk/gtkradiomenuitem.[ch]: Deprecation cleanup
Fri Oct 4 16:48:27 2002 Manish Singh <yosh@gimp.org>
......@@ -109,9 +114,9 @@ Fri Oct 4 11:43:47 2002 Owen Taylor <otaylor@redhat.com>
Fri Oct 4 00:57:53 2002 Manish Singh <yosh@gimp.org>
* gtkhscrollbar.[ch] gtkhseparator.[ch] gtkrange.[ch]
gtkscrollbar.[ch] gtkseparator.[ch] gtkseparatormenuitem.h
gtkvscrollbar.[ch] gtkvseparator.[ch]: Deprecation cleanup
* gtk/gtkhscrollbar.[ch] gtk/gtkhseparator.[ch] gtk/gtkrange.[ch]
gtk/gtkscrollbar.[ch] gtk/gtkseparator.[ch] gtk/gtkseparatormenuitem.h
gtk/gtkvscrollbar.[ch] gtk/gtkvseparator.[ch]: Deprecation cleanup
Thu Oct 3 22:38:12 2002 Manish Singh <yosh@gimp.org>
......@@ -235,7 +240,7 @@ Wed Oct 2 08:47:31 2002 Owen Taylor <otaylor@redhat.com>
Tue Oct 1 12:53:44 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkwindow-decorate.c gtkwindow.[ch]: Deprecation cleanup
* gtk/gtkwindow-decorate.c gtk/gtkwindow.[ch]: Deprecation cleanup
2002-10-01 jacob berkman <jacob@ximian.com>
......
Sat Oct 5 16:11:22 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkmisc.[ch] gtk/gtklabel.[ch] gtk/gtkimage.[ch]
gtk/gtkdrawingarea.[ch] gtk/gtknotebook.[ch]: deprecation cleanup
Sat Oct 5 18:30:50 2002 Owen Taylor <otaylor@redhat.com>
* gtk/stock-icons/Makefile.am (pixbuf_csource): Use
......@@ -25,9 +30,9 @@ Sat Oct 5 16:47:03 2002 Soeren Sandmann <sandmann@daimi.au.dk>
Fri Oct 4 18:40:50 2002 Manish Singh <yosh@gimp.org>
* gtkcheckmenuitem.[ch] gtkimagemenuitem.[ch] gtkmenu.[ch]
gtkmenubar.[ch] gtkmenuitem.[ch] gtkmenushell.[ch]
gtkradiomenuitem.[ch]: Deprecation cleanup
* gtk/gtkcheckmenuitem.[ch] gtk/gtkimagemenuitem.[ch] gtk/gtkmenu.[ch]
gtk/gtkmenubar.[ch] gtk/gtkmenuitem.[ch] gtk/gtkmenushell.[ch]
gtk/gtkradiomenuitem.[ch]: Deprecation cleanup
Fri Oct 4 16:48:27 2002 Manish Singh <yosh@gimp.org>
......@@ -109,9 +114,9 @@ Fri Oct 4 11:43:47 2002 Owen Taylor <otaylor@redhat.com>
Fri Oct 4 00:57:53 2002 Manish Singh <yosh@gimp.org>
* gtkhscrollbar.[ch] gtkhseparator.[ch] gtkrange.[ch]
gtkscrollbar.[ch] gtkseparator.[ch] gtkseparatormenuitem.h
gtkvscrollbar.[ch] gtkvseparator.[ch]: Deprecation cleanup
* gtk/gtkhscrollbar.[ch] gtk/gtkhseparator.[ch] gtk/gtkrange.[ch]
gtk/gtkscrollbar.[ch] gtk/gtkseparator.[ch] gtk/gtkseparatormenuitem.h
gtk/gtkvscrollbar.[ch] gtk/gtkvseparator.[ch]: Deprecation cleanup
Thu Oct 3 22:38:12 2002 Manish Singh <yosh@gimp.org>
......@@ -235,7 +240,7 @@ Wed Oct 2 08:47:31 2002 Owen Taylor <otaylor@redhat.com>
Tue Oct 1 12:53:44 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkwindow-decorate.c gtkwindow.[ch]: Deprecation cleanup
* gtk/gtkwindow-decorate.c gtk/gtkwindow.[ch]: Deprecation cleanup
2002-10-01 jacob berkman <jacob@ximian.com>
......
Sat Oct 5 16:11:22 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkmisc.[ch] gtk/gtklabel.[ch] gtk/gtkimage.[ch]
gtk/gtkdrawingarea.[ch] gtk/gtknotebook.[ch]: deprecation cleanup
Sat Oct 5 18:30:50 2002 Owen Taylor <otaylor@redhat.com>
* gtk/stock-icons/Makefile.am (pixbuf_csource): Use
......@@ -25,9 +30,9 @@ Sat Oct 5 16:47:03 2002 Soeren Sandmann <sandmann@daimi.au.dk>
Fri Oct 4 18:40:50 2002 Manish Singh <yosh@gimp.org>
* gtkcheckmenuitem.[ch] gtkimagemenuitem.[ch] gtkmenu.[ch]
gtkmenubar.[ch] gtkmenuitem.[ch] gtkmenushell.[ch]
gtkradiomenuitem.[ch]: Deprecation cleanup
* gtk/gtkcheckmenuitem.[ch] gtk/gtkimagemenuitem.[ch] gtk/gtkmenu.[ch]
gtk/gtkmenubar.[ch] gtk/gtkmenuitem.[ch] gtk/gtkmenushell.[ch]
gtk/gtkradiomenuitem.[ch]: Deprecation cleanup
Fri Oct 4 16:48:27 2002 Manish Singh <yosh@gimp.org>
......@@ -109,9 +114,9 @@ Fri Oct 4 11:43:47 2002 Owen Taylor <otaylor@redhat.com>
Fri Oct 4 00:57:53 2002 Manish Singh <yosh@gimp.org>
* gtkhscrollbar.[ch] gtkhseparator.[ch] gtkrange.[ch]
gtkscrollbar.[ch] gtkseparator.[ch] gtkseparatormenuitem.h
gtkvscrollbar.[ch] gtkvseparator.[ch]: Deprecation cleanup
* gtk/gtkhscrollbar.[ch] gtk/gtkhseparator.[ch] gtk/gtkrange.[ch]
gtk/gtkscrollbar.[ch] gtk/gtkseparator.[ch] gtk/gtkseparatormenuitem.h
gtk/gtkvscrollbar.[ch] gtk/gtkvseparator.[ch]: Deprecation cleanup
Thu Oct 3 22:38:12 2002 Manish Singh <yosh@gimp.org>
......@@ -235,7 +240,7 @@ Wed Oct 2 08:47:31 2002 Owen Taylor <otaylor@redhat.com>
Tue Oct 1 12:53:44 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkwindow-decorate.c gtkwindow.[ch]: Deprecation cleanup
* gtk/gtkwindow-decorate.c gtk/gtkwindow.[ch]: Deprecation cleanup
2002-10-01 jacob berkman <jacob@ximian.com>
......
Sat Oct 5 16:11:22 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkmisc.[ch] gtk/gtklabel.[ch] gtk/gtkimage.[ch]
gtk/gtkdrawingarea.[ch] gtk/gtknotebook.[ch]: deprecation cleanup
Sat Oct 5 18:30:50 2002 Owen Taylor <otaylor@redhat.com>
* gtk/stock-icons/Makefile.am (pixbuf_csource): Use
......@@ -25,9 +30,9 @@ Sat Oct 5 16:47:03 2002 Soeren Sandmann <sandmann@daimi.au.dk>
Fri Oct 4 18:40:50 2002 Manish Singh <yosh@gimp.org>
* gtkcheckmenuitem.[ch] gtkimagemenuitem.[ch] gtkmenu.[ch]
gtkmenubar.[ch] gtkmenuitem.[ch] gtkmenushell.[ch]
gtkradiomenuitem.[ch]: Deprecation cleanup
* gtk/gtkcheckmenuitem.[ch] gtk/gtkimagemenuitem.[ch] gtk/gtkmenu.[ch]
gtk/gtkmenubar.[ch] gtk/gtkmenuitem.[ch] gtk/gtkmenushell.[ch]
gtk/gtkradiomenuitem.[ch]: Deprecation cleanup
Fri Oct 4 16:48:27 2002 Manish Singh <yosh@gimp.org>
......@@ -109,9 +114,9 @@ Fri Oct 4 11:43:47 2002 Owen Taylor <otaylor@redhat.com>
Fri Oct 4 00:57:53 2002 Manish Singh <yosh@gimp.org>
* gtkhscrollbar.[ch] gtkhseparator.[ch] gtkrange.[ch]
gtkscrollbar.[ch] gtkseparator.[ch] gtkseparatormenuitem.h
gtkvscrollbar.[ch] gtkvseparator.[ch]: Deprecation cleanup
* gtk/gtkhscrollbar.[ch] gtk/gtkhseparator.[ch] gtk/gtkrange.[ch]
gtk/gtkscrollbar.[ch] gtk/gtkseparator.[ch] gtk/gtkseparatormenuitem.h
gtk/gtkvscrollbar.[ch] gtk/gtkvseparator.[ch]: Deprecation cleanup
Thu Oct 3 22:38:12 2002 Manish Singh <yosh@gimp.org>
......@@ -235,7 +240,7 @@ Wed Oct 2 08:47:31 2002 Owen Taylor <otaylor@redhat.com>
Tue Oct 1 12:53:44 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkwindow-decorate.c gtkwindow.[ch]: Deprecation cleanup
* gtk/gtkwindow-decorate.c gtk/gtkwindow.[ch]: Deprecation cleanup
2002-10-01 jacob berkman <jacob@ximian.com>
......
Sat Oct 5 16:11:22 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkmisc.[ch] gtk/gtklabel.[ch] gtk/gtkimage.[ch]
gtk/gtkdrawingarea.[ch] gtk/gtknotebook.[ch]: deprecation cleanup
Sat Oct 5 18:30:50 2002 Owen Taylor <otaylor@redhat.com>
* gtk/stock-icons/Makefile.am (pixbuf_csource): Use
......@@ -25,9 +30,9 @@ Sat Oct 5 16:47:03 2002 Soeren Sandmann <sandmann@daimi.au.dk>
Fri Oct 4 18:40:50 2002 Manish Singh <yosh@gimp.org>
* gtkcheckmenuitem.[ch] gtkimagemenuitem.[ch] gtkmenu.[ch]
gtkmenubar.[ch] gtkmenuitem.[ch] gtkmenushell.[ch]
gtkradiomenuitem.[ch]: Deprecation cleanup
* gtk/gtkcheckmenuitem.[ch] gtk/gtkimagemenuitem.[ch] gtk/gtkmenu.[ch]
gtk/gtkmenubar.[ch] gtk/gtkmenuitem.[ch] gtk/gtkmenushell.[ch]
gtk/gtkradiomenuitem.[ch]: Deprecation cleanup
Fri Oct 4 16:48:27 2002 Manish Singh <yosh@gimp.org>
......@@ -109,9 +114,9 @@ Fri Oct 4 11:43:47 2002 Owen Taylor <otaylor@redhat.com>
Fri Oct 4 00:57:53 2002 Manish Singh <yosh@gimp.org>
* gtkhscrollbar.[ch] gtkhseparator.[ch] gtkrange.[ch]
gtkscrollbar.[ch] gtkseparator.[ch] gtkseparatormenuitem.h
gtkvscrollbar.[ch] gtkvseparator.[ch]: Deprecation cleanup
* gtk/gtkhscrollbar.[ch] gtk/gtkhseparator.[ch] gtk/gtkrange.[ch]
gtk/gtkscrollbar.[ch] gtk/gtkseparator.[ch] gtk/gtkseparatormenuitem.h
gtk/gtkvscrollbar.[ch] gtk/gtkvseparator.[ch]: Deprecation cleanup
Thu Oct 3 22:38:12 2002 Manish Singh <yosh@gimp.org>
......@@ -235,7 +240,7 @@ Wed Oct 2 08:47:31 2002 Owen Taylor <otaylor@redhat.com>
Tue Oct 1 12:53:44 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkwindow-decorate.c gtkwindow.[ch]: Deprecation cleanup
* gtk/gtkwindow-decorate.c gtk/gtkwindow.[ch]: Deprecation cleanup
2002-10-01 jacob berkman <jacob@ximian.com>
......
......@@ -35,26 +35,29 @@ static void gtk_drawing_area_size_allocate (GtkWidget *widget,
static void gtk_drawing_area_send_configure (GtkDrawingArea *darea);
GtkType
GType
gtk_drawing_area_get_type (void)
{
static GtkType drawing_area_type = 0;
static GType drawing_area_type = 0;
if (!drawing_area_type)
{
static const GtkTypeInfo drawing_area_info =
static const GTypeInfo drawing_area_info =
{
"GtkDrawingArea",
sizeof (GtkDrawingArea),
sizeof (GtkDrawingAreaClass),
(GtkClassInitFunc) gtk_drawing_area_class_init,
(GtkObjectInitFunc) gtk_drawing_area_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc) gtk_drawing_area_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GtkDrawingArea),
0, /* n_preallocs */
(GInstanceInitFunc) gtk_drawing_area_init,
};
drawing_area_type = gtk_type_unique (GTK_TYPE_WIDGET, &drawing_area_info);
drawing_area_type =
g_type_register_static (GTK_TYPE_WIDGET, "GtkDrawingArea",
&drawing_area_info, 0);
}
return drawing_area_type;
......@@ -79,7 +82,7 @@ gtk_drawing_area_init (GtkDrawingArea *darea)
GtkWidget*
gtk_drawing_area_new (void)
{
return GTK_WIDGET (gtk_type_new (GTK_TYPE_DRAWING_AREA));
return g_object_new (GTK_TYPE_DRAWING_AREA, NULL);
}
void
......
......@@ -38,11 +38,11 @@ extern "C" {
#define GTK_TYPE_DRAWING_AREA (gtk_drawing_area_get_type ())
#define GTK_DRAWING_AREA(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_DRAWING_AREA, GtkDrawingArea))
#define GTK_DRAWING_AREA_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_DRAWING_AREA, GtkDrawingAreaClass))
#define GTK_IS_DRAWING_AREA(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_DRAWING_AREA))
#define GTK_IS_DRAWING_AREA_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DRAWING_AREA))
#define GTK_DRAWING_AREA_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_DRAWING_AREA, GtkDrawingAreaClass))
#define GTK_DRAWING_AREA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_DRAWING_AREA, GtkDrawingArea))
#define GTK_DRAWING_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_DRAWING_AREA, GtkDrawingAreaClass))
#define GTK_IS_DRAWING_AREA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_DRAWING_AREA))
#define GTK_IS_DRAWING_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DRAWING_AREA))
#define GTK_DRAWING_AREA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_DRAWING_AREA, GtkDrawingAreaClass))
typedef struct _GtkDrawingArea GtkDrawingArea;
......@@ -67,7 +67,7 @@ struct _GtkDrawingAreaClass
};
GtkType gtk_drawing_area_get_type (void) G_GNUC_CONST;
GType gtk_drawing_area_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_drawing_area_new (void);
#ifndef GTK_DISABLE_DEPRECATED
......
......@@ -75,26 +75,28 @@ enum
PROP_STORAGE_TYPE
};
GtkType
GType
gtk_image_get_type (void)
{
static GtkType image_type = 0;
static GType image_type = 0;
if (!image_type)
{
static const GtkTypeInfo image_info =
static const GTypeInfo image_info =
{
"GtkImage",
sizeof (GtkImage),
sizeof (GtkImageClass),
(GtkClassInitFunc) gtk_image_class_init,
(GtkObjectInitFunc) gtk_image_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc) gtk_image_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GtkImage),
0, /* n_preallocs */
(GInstanceInitFunc) gtk_image_init,
};
image_type = gtk_type_unique (GTK_TYPE_MISC, &image_info);
image_type = g_type_register_static (GTK_TYPE_MISC, "GtkImage",
&image_info, 0);
}
return image_type;
......@@ -271,7 +273,7 @@ gtk_image_set_property (GObject *object,
mask = g_value_get_object (value);
if (mask)
g_object_ref (G_OBJECT (mask));
g_object_ref (mask);
gtk_image_reset (image);
......@@ -410,7 +412,7 @@ gtk_image_new_from_pixmap (GdkPixmap *pixmap,
{
GtkImage *image;
image = gtk_type_new (GTK_TYPE_IMAGE);
image = g_object_new (GTK_TYPE_IMAGE, NULL);
gtk_image_set_from_pixmap (image, pixmap, mask);
......@@ -437,7 +439,7 @@ gtk_image_new_from_image (GdkImage *gdk_image,
{
GtkImage *image;
image = gtk_type_new (GTK_TYPE_IMAGE);
image = g_object_new (GTK_TYPE_IMAGE, NULL);
gtk_image_set_from_image (image, gdk_image, mask);
......@@ -472,7 +474,7 @@ gtk_image_new_from_file (const gchar *filename)
{
GtkImage *image;
image = gtk_type_new (GTK_TYPE_IMAGE);
image = g_object_new (GTK_TYPE_IMAGE, NULL);
gtk_image_set_from_file (image, filename);
......@@ -499,7 +501,7 @@ gtk_image_new_from_pixbuf (GdkPixbuf *pixbuf)
{
GtkImage *image;
image = gtk_type_new (GTK_TYPE_IMAGE);
image = g_object_new (GTK_TYPE_IMAGE, NULL);
gtk_image_set_from_pixbuf (image, pixbuf);
......@@ -526,7 +528,7 @@ gtk_image_new_from_stock (const gchar *stock_id,
{
GtkImage *image;
image = gtk_type_new (GTK_TYPE_IMAGE);
image = g_object_new (GTK_TYPE_IMAGE, NULL);
gtk_image_set_from_stock (image, stock_id, size);
......@@ -559,7 +561,7 @@ gtk_image_new_from_icon_set (GtkIconSet *icon_set,
{
GtkImage *image;
image = gtk_type_new (GTK_TYPE_IMAGE);
image = g_object_new (GTK_TYPE_IMAGE, NULL);
gtk_image_set_from_icon_set (image, icon_set, size);
......@@ -584,7 +586,7 @@ gtk_image_new_from_animation (GdkPixbufAnimation *animation)
g_return_val_if_fail (GDK_IS_PIXBUF_ANIMATION (animation), NULL);
image = gtk_type_new (GTK_TYPE_IMAGE);
image = g_object_new (GTK_TYPE_IMAGE, NULL);
gtk_image_set_from_animation (image, animation);
......@@ -614,10 +616,10 @@ gtk_image_set_from_pixmap (GtkImage *image,
g_object_freeze_notify (G_OBJECT (image));
if (pixmap)
g_object_ref (G_OBJECT (pixmap));
g_object_ref (pixmap);
if (mask)
g_object_ref (G_OBJECT (mask));
g_object_ref (mask);
gtk_image_reset (image);
......@@ -666,10 +668,10 @@ gtk_image_set_from_image (GtkImage *image,
g_object_freeze_notify (G_OBJECT (image));
if (gdk_image)
g_object_ref (G_OBJECT (gdk_image));
g_object_ref (gdk_image);
if (mask)
g_object_ref (G_OBJECT (mask));
g_object_ref (mask);
gtk_image_reset (image);
......@@ -686,7 +688,7 @@ gtk_image_set_from_image (GtkImage *image,
{
/* Clean up the mask if gdk_image was NULL */
if (mask)
g_object_unref (G_OBJECT (mask));
g_object_unref (mask);
}
g_object_notify (G_OBJECT (image), "image");
......@@ -747,7 +749,7 @@ gtk_image_set_from_file (GtkImage *image,
gtk_image_set_from_animation (image, anim);
}
g_object_unref (G_OBJECT (anim));
g_object_unref (anim);
g_object_thaw_notify (G_OBJECT (image));
}
......@@ -771,7 +773,7 @@ gtk_image_set_from_pixbuf (GtkImage *image,
g_object_freeze_notify (G_OBJECT (image));
if (pixbuf)
g_object_ref (G_OBJECT (pixbuf));
g_object_ref (pixbuf);
gtk_image_reset (image);
......@@ -895,7 +897,7 @@ gtk_image_set_from_animation (GtkImage *image,
g_object_freeze_notify (G_OBJECT (image));
if (animation)
g_object_ref (G_OBJECT (animation));
g_object_ref (animation);
gtk_image_reset (image);
......@@ -1152,7 +1154,7 @@ gtk_image_reset_anim_iter (GtkImage *image)
if (image->data.anim.iter)
{
g_object_unref (G_OBJECT (image->data.anim.iter));
g_object_unref (image->data.anim.iter);
image->data.anim.iter = NULL;
}
}
......@@ -1313,7 +1315,7 @@ gtk_image_expose (GtkWidget *widget,
else
{
pixbuf = image->data.pixbuf.pixbuf;
g_object_ref (G_OBJECT (pixbuf));
g_object_ref (pixbuf);
}
break;
......@@ -1373,7 +1375,7 @@ gtk_image_expose (GtkWidget *widget,
*/
pixbuf = gdk_pixbuf_animation_iter_get_pixbuf (image->data.anim.iter);
g_object_ref (G_OBJECT (pixbuf));
g_object_ref (pixbuf);
}
break;
......@@ -1418,7 +1420,7 @@ gtk_image_expose (GtkWidget *widget,
gtk_icon_source_free (source);
g_object_unref (G_OBJECT (pixbuf));
g_object_unref (pixbuf);
pixbuf = rendered;
}
......@@ -1436,7 +1438,7 @@ gtk_image_expose (GtkWidget *widget,
GDK_RGB_DITHER_NORMAL,
0, 0);
g_object_unref (G_OBJECT (pixbuf));
g_object_unref (pixbuf);
pixbuf = NULL;
}
}
......@@ -1494,7 +1496,7 @@ gtk_image_clear (GtkImage *image)
if (image->mask)
{
g_object_unref (G_OBJECT (image->mask));
g_object_unref (image->mask);
image->mask = NULL;
g_object_notify (G_OBJECT (image), "mask");
}
......@@ -1510,7 +1512,7 @@ gtk_image_clear (GtkImage *image)
case GTK_IMAGE_PIXMAP:
if (image->data.pixmap.pixmap)
g_object_unref (G_OBJECT (image->data.pixmap.pixmap));
g_object_unref (image->data.pixmap.pixmap);
image->data.pixmap.pixmap = NULL;
g_object_notify (G_OBJECT (image), "pixmap");
......@@ -1520,7 +1522,7 @@ gtk_image_clear (GtkImage *image)
case GTK_IMAGE_IMAGE:
if (image->data.image.image)
g_object_unref (G_OBJECT (image->data.image.image));
g_object_unref (image->data.image.image);
image->data.image.image = NULL;
g_object_notify (G_OBJECT (image), "image");
......@@ -1530,7 +1532,7 @@ gtk_image_clear (GtkImage *image)
case GTK_IMAGE_PIXBUF:
if (image->data.pixbuf.pixbuf)
g_object_unref (G_OBJECT (image->data.pixbuf.pixbuf));
g_object_unref (image->data.pixbuf.pixbuf);
g_object_notify (G_OBJECT (image), "pixbuf");
......@@ -1558,7 +1560,7 @@ gtk_image_clear (GtkImage *image)
g_source_remove (image->data.anim.frame_timeout);
if (image->data.anim.anim)
g_object_unref (G_OBJECT (image->data.anim.anim));
g_object_unref (image->data.anim.anim);
image->data.anim.frame_timeout = 0;
image->data.anim.anim = NULL;
......@@ -1631,7 +1633,7 @@ gtk_image_size_request (GtkWidget *widget,
GTK_WIDGET (image)->requisition.width = gdk_pixbuf_get_width (pixbuf) + GTK_MISC (image)->xpad * 2;
GTK_WIDGET (image)->requisition.height = gdk_pixbuf_get_height (pixbuf) + GTK_MISC (image)->ypad * 2;
g_object_unref (G_OBJECT (pixbuf));
g_object_unref (pixbuf);
}
/* Chain up to default that simply reads current requisition */
......
......@@ -37,11 +37,11 @@ extern "C" {
#endif /* __cplusplus */
#define GTK_TYPE_IMAGE (gtk_image_get_type ())
#define GTK_IMAGE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_IMAGE, GtkImage))
#define GTK_IMAGE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_IMAGE, GtkImageClass))
#define GTK_IS_IMAGE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_IMAGE))
#define GTK_IS_IMAGE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_IMAGE))
#define GTK_IMAGE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_IMAGE, GtkImageClass))
#define GTK_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_IMAGE, GtkImage))
#define GTK_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_IMAGE, GtkImageClass))
#define GTK_IS_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_IMAGE))
#define GTK_IS_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_IMAGE))
#define GTK_IMAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_IMAGE, GtkImageClass))
typedef struct _GtkImage GtkImage;
......@@ -131,7 +131,7 @@ struct _GtkImageClass
void (*_gtk_reserved4) (void);
};
GtkType gtk_image_get_type (void) G_GNUC_CONST;
GType gtk_image_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_image_new (void);
GtkWidget* gtk_image_new_from_pixmap (GdkPixmap *pixmap,
......
......@@ -28,7 +28,6 @@
#include "gtklabel.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
#include "gtksignal.h"
#include "gtkwindow.h"
#include "gdk/gdkkeysyms.h"
#include "gtkclipboard.h"
......@@ -165,10 +164,10 @@ static gint gtk_label_move_backward_word (GtkLabel *label,
static GtkMiscClass *parent_class = NULL;
GtkType
GType
gtk_label_get_type (void)
{
static GtkType label_type = 0;
static GType label_type = 0;
if (!label_type)
{
......@@ -185,7 +184,8 @@ gtk_label_get_type (void)
(GInstanceInitFunc) gtk_label_init,
};
label_type = g_type_register_static (GTK_TYPE_MISC, "GtkLabel", &label_info, 0);
label_type = g_type_register_static (GTK_TYPE_MISC, "GtkLabel",
&label_info, 0);
}
return label_type;
......@@ -202,16 +202,16 @@ add_move_binding (GtkBindingSet *binding_set,
gtk_binding_entry_add_signal (binding_set, keyval, modmask,
"move_cursor", 3,
GTK_TYPE_ENUM, step,
G_TYPE_ENUM, step,
G_TYPE_INT, count,
G_TYPE_BOOLEAN, FALSE);
G_TYPE_BOOLEAN, FALSE);
/* Selection-extending version */
gtk_binding_entry_add_signal (binding_set, keyval, modmask | GDK_SHIFT_MASK,
"move_cursor", 3,
GTK_TYPE_ENUM, step,
G_TYPE_ENUM, step,
G_TYPE_INT, count,
G_TYPE_BOOLEAN, TRUE);
G_TYPE_BOOLEAN, TRUE);
}
static void
......@@ -222,7 +222,7 @@ gtk_label_class_init (GtkLabelClass *class)
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
GtkBindingSet *binding_set;
parent_class = gtk_type_class (GTK_TYPE_MISC);
parent_class = g_type_class_peek_parent (class);
gobject_class->set_property = gtk_label_set_property;
gobject_class->get_property = gtk_label_get_property;
......@@ -251,30 +251,37 @@ gtk_label_class_init (GtkLabelClass *class)
class->copy_clipboard = gtk_label_copy_clipboard;
signals[MOVE_CURSOR] =
gtk_signal_new ("move_cursor",
GTK_RUN_LAST | GTK_RUN_ACTION,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkLabelClass, move_cursor),
_gtk_marshal_VOID__ENUM_INT_BOOLEAN,
GTK_TYPE_NONE, 3, GTK_TYPE_MOVEMENT_STEP, GTK_TYPE_INT, GTK_TYPE_BOOL);
g_signal_new ("move_cursor",
G_OBJECT_CLASS_TYPE (gobject_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (GtkLabelClass, move_cursor),
NULL, NULL,
_gtk_marshal_VOID__ENUM_INT_BOOLEAN,
G_TYPE_NONE, 3,
GTK_TYPE_MOVEMENT_STEP,
G_TYPE_INT,
G_TYPE_BOOLEAN);
signals[COPY_CLIPBOARD] =
gtk_signal_new ("copy_clipboard",
GTK_RUN_LAST | GTK_RUN_ACTION,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkLabelClass, copy_clipboard),
_gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
g_signal_new ("copy_clipboard",
G_OBJECT_CLASS_TYPE (gobject_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (GtkLabelClass, copy_clipboard),
NULL, NULL,
_gtk_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[POPULATE_POPUP] =
gtk_signal_new ("populate_popup",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkLabelClass, populate_popup),
_gtk_marshal_VOID__OBJECT,
GTK_TYPE_NONE, 1, GTK_TYPE_MENU);
g_object_class_install_property (G_OBJECT_CLASS(object_class),
g_signal_new ("populate_popup",
G_OBJECT_CLASS_TYPE (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkLabelClass, populate_popup),
NULL, NULL,
_gtk_marshal_VOID__OBJECT,
G_TYPE_NONE, 1,
GTK_TYPE_MENU);
g_object_class_install_property (gobject_class,
PROP_LABEL,
g_param_spec_string ("label",
_("Label"),
......@@ -601,7 +608,7 @@ gtk_label_new (const gchar *str)
{
GtkLabel *label;
label = gtk_type_new (GTK_TYPE_LABEL);
label = g_object_new (GTK_TYPE_LABEL, NULL);
if (str && *str)
gtk_label_set_text (label, str);
......@@ -637,7 +644,7 @@ gtk_label_new_with_mnemonic (const gchar *str)
{
GtkLabel *label;
label = gtk_type_new (GTK_TYPE_LABEL);
label = g_object_new (GTK_TYPE_LABEL, NULL);
if (str && *str)
gtk_label_set_text_with_mnemonic (label, str);
......@@ -1321,7 +1328,7 @@ gtk_label_finalize (GObject *object)
g_free (label->text);
if (label->layout)
g_object_unref (G_OBJECT (label->layout));
g_object_unref (label->layout);
if (label->attrs)
pango_attr_list_unref (label->attrs);
......@@ -1339,7 +1346,7 @@ gtk_label_clear_layout (GtkLabel *label)
{
if (label->layout)
{
g_object_unref (G_OBJECT (label->layout));
g_object_unref (label->layout);
label->layout = NULL;
}
}
......@@ -3110,8 +3117,8 @@ static void