+2001-01-24 <alexl@redhat.com>
+
+ * gtk/gtkimage.c:
+ Splitted gtk_image_clear into gtk_image_clear() and
+ gtk_image_reset(). Call gtk_image_clear() in ::destroy
+ to avoid leaks.
+
+ * gtk/gtklabel.c (set_markup):
+ Don't leak text.
+
+ * gtk/gtktextlayout.c:
+ Always free display->shaped_objects.
+
+ * gtk/testgtk.c (create_clist):
+ Don't leak custom style.
+
2001-01-23 <alexl@redhat.com>
* gtk/gtkcolorsel.c (grab_color_at_mouse):
+2001-01-24 <alexl@redhat.com>
+
+ * gtk/gtkimage.c:
+ Splitted gtk_image_clear into gtk_image_clear() and
+ gtk_image_reset(). Call gtk_image_clear() in ::destroy
+ to avoid leaks.
+
+ * gtk/gtklabel.c (set_markup):
+ Don't leak text.
+
+ * gtk/gtktextlayout.c:
+ Always free display->shaped_objects.
+
+ * gtk/testgtk.c (create_clist):
+ Don't leak custom style.
+
2001-01-23 <alexl@redhat.com>
* gtk/gtkcolorsel.c (grab_color_at_mouse):
+2001-01-24 <alexl@redhat.com>
+
+ * gtk/gtkimage.c:
+ Splitted gtk_image_clear into gtk_image_clear() and
+ gtk_image_reset(). Call gtk_image_clear() in ::destroy
+ to avoid leaks.
+
+ * gtk/gtklabel.c (set_markup):
+ Don't leak text.
+
+ * gtk/gtktextlayout.c:
+ Always free display->shaped_objects.
+
+ * gtk/testgtk.c (create_clist):
+ Don't leak custom style.
+
2001-01-23 <alexl@redhat.com>
* gtk/gtkcolorsel.c (grab_color_at_mouse):
+2001-01-24 <alexl@redhat.com>
+
+ * gtk/gtkimage.c:
+ Splitted gtk_image_clear into gtk_image_clear() and
+ gtk_image_reset(). Call gtk_image_clear() in ::destroy
+ to avoid leaks.
+
+ * gtk/gtklabel.c (set_markup):
+ Don't leak text.
+
+ * gtk/gtktextlayout.c:
+ Always free display->shaped_objects.
+
+ * gtk/testgtk.c (create_clist):
+ Don't leak custom style.
+
2001-01-23 <alexl@redhat.com>
* gtk/gtkcolorsel.c (grab_color_at_mouse):
+2001-01-24 <alexl@redhat.com>
+
+ * gtk/gtkimage.c:
+ Splitted gtk_image_clear into gtk_image_clear() and
+ gtk_image_reset(). Call gtk_image_clear() in ::destroy
+ to avoid leaks.
+
+ * gtk/gtklabel.c (set_markup):
+ Don't leak text.
+
+ * gtk/gtktextlayout.c:
+ Always free display->shaped_objects.
+
+ * gtk/testgtk.c (create_clist):
+ Don't leak custom style.
+
2001-01-23 <alexl@redhat.com>
* gtk/gtkcolorsel.c (grab_color_at_mouse):
+2001-01-24 <alexl@redhat.com>
+
+ * gtk/gtkimage.c:
+ Splitted gtk_image_clear into gtk_image_clear() and
+ gtk_image_reset(). Call gtk_image_clear() in ::destroy
+ to avoid leaks.
+
+ * gtk/gtklabel.c (set_markup):
+ Don't leak text.
+
+ * gtk/gtktextlayout.c:
+ Always free display->shaped_objects.
+
+ * gtk/testgtk.c (create_clist):
+ Don't leak custom style.
+
2001-01-23 <alexl@redhat.com>
* gtk/gtkcolorsel.c (grab_color_at_mouse):
+2001-01-24 <alexl@redhat.com>
+
+ * gtk/gtkimage.c:
+ Splitted gtk_image_clear into gtk_image_clear() and
+ gtk_image_reset(). Call gtk_image_clear() in ::destroy
+ to avoid leaks.
+
+ * gtk/gtklabel.c (set_markup):
+ Don't leak text.
+
+ * gtk/gtktextlayout.c:
+ Always free display->shaped_objects.
+
+ * gtk/testgtk.c (create_clist):
+ Don't leak custom style.
+
2001-01-23 <alexl@redhat.com>
* gtk/gtkcolorsel.c (grab_color_at_mouse):
GdkEventExpose *event);
static void gtk_image_size_request (GtkWidget *widget,
GtkRequisition *requisition);
+static void gtk_image_destroy (GtkObject *object);
static void gtk_image_clear (GtkImage *image);
+static void gtk_image_reset (GtkImage *image);
static void gtk_image_update_size (GtkImage *image,
gint image_width,
gint image_height);
static void
gtk_image_class_init (GtkImageClass *class)
{
+ GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
parent_class = g_type_class_peek_parent (class);
+
+ object_class = (GtkObjectClass *) class;
+ object_class->destroy = gtk_image_destroy;
+
widget_class = (GtkWidgetClass*) class;
widget_class->expose_event = gtk_image_expose;
image->storage_type = GTK_IMAGE_EMPTY;
}
+static void
+gtk_image_destroy (GtkObject *object)
+{
+ GtkImage *image = GTK_IMAGE (object);
+
+ gtk_image_clear (image);
+
+ GTK_OBJECT_CLASS (parent_class)->destroy (object);
+}
+
+
GtkWidget*
gtk_image_new_from_pixmap (GdkPixmap *pixmap,
GdkBitmap *mask)
if (mask)
g_object_ref (G_OBJECT (mask));
- gtk_image_clear (image);
+ gtk_image_reset (image);
if (pixmap)
{
if (mask)
g_object_ref (G_OBJECT (mask));
- gtk_image_clear (image);
+ gtk_image_reset (image);
if (gdk_image)
{
g_return_if_fail (GTK_IS_IMAGE (image));
g_return_if_fail (filename != NULL);
- gtk_image_clear (image);
+ gtk_image_reset (image);
if (filename == NULL)
return;
if (pixbuf)
g_object_ref (G_OBJECT (pixbuf));
- gtk_image_clear (image);
+ gtk_image_reset (image);
if (pixbuf != NULL)
{
{
g_return_if_fail (GTK_IS_IMAGE (image));
- gtk_image_clear (image);
+ gtk_image_reset (image);
if (stock_id)
{
if (icon_set)
gtk_icon_set_ref (icon_set);
- gtk_image_clear (image);
+ gtk_image_reset (image);
if (icon_set)
{
}
image->storage_type = GTK_IMAGE_EMPTY;
+}
+static void
+gtk_image_reset (GtkImage *image)
+{
+ gtk_image_clear (image);
+
GTK_WIDGET (image)->requisition.width = 0;
GTK_WIDGET (image)->requisition.height = 0;
}
if (text)
- gtk_label_set_text (label, text);
+ gtk_label_set_text_internal (label, text);
if (attrs)
{
{
g_slist_foreach (display->cursors, (GFunc)g_free, NULL);
g_slist_free (display->cursors);
- g_slist_free (display->shaped_objects);
}
+ g_slist_free (display->shaped_objects);
g_free (display);
}
}
}
+ gtk_style_unref (style);
+
separator = gtk_hseparator_new ();
gtk_box_pack_start (GTK_BOX (vbox), separator, FALSE, TRUE, 0);
}
}
+ gtk_style_unref (style);
+
separator = gtk_hseparator_new ();
gtk_box_pack_start (GTK_BOX (vbox), separator, FALSE, TRUE, 0);