forked from AuroraMiddleware/gtk
Splitted gtk_image_clear into gtk_image_clear() and gtk_image_reset().
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.
This commit is contained in:
parent
892cd31691
commit
9234d91146
16
ChangeLog
16
ChangeLog
@ -1,3 +1,19 @@
|
||||
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):
|
||||
|
@ -1,3 +1,19 @@
|
||||
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):
|
||||
|
@ -1,3 +1,19 @@
|
||||
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):
|
||||
|
@ -1,3 +1,19 @@
|
||||
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):
|
||||
|
@ -1,3 +1,19 @@
|
||||
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):
|
||||
|
@ -1,3 +1,19 @@
|
||||
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):
|
||||
|
@ -1,3 +1,19 @@
|
||||
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):
|
||||
|
@ -34,7 +34,9 @@ static gint gtk_image_expose (GtkWidget *widget,
|
||||
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);
|
||||
@ -69,10 +71,15 @@ gtk_image_get_type (void)
|
||||
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;
|
||||
@ -87,6 +94,17 @@ gtk_image_init (GtkImage *image)
|
||||
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)
|
||||
@ -180,7 +198,7 @@ gtk_image_set_from_pixmap (GtkImage *image,
|
||||
if (mask)
|
||||
g_object_ref (G_OBJECT (mask));
|
||||
|
||||
gtk_image_clear (image);
|
||||
gtk_image_reset (image);
|
||||
|
||||
if (pixmap)
|
||||
{
|
||||
@ -222,7 +240,7 @@ gtk_image_set_from_image (GtkImage *image,
|
||||
if (mask)
|
||||
g_object_ref (G_OBJECT (mask));
|
||||
|
||||
gtk_image_clear (image);
|
||||
gtk_image_reset (image);
|
||||
|
||||
if (gdk_image)
|
||||
{
|
||||
@ -250,7 +268,7 @@ gtk_image_set_from_file (GtkImage *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;
|
||||
@ -276,7 +294,7 @@ gtk_image_set_from_pixbuf (GtkImage *image,
|
||||
if (pixbuf)
|
||||
g_object_ref (G_OBJECT (pixbuf));
|
||||
|
||||
gtk_image_clear (image);
|
||||
gtk_image_reset (image);
|
||||
|
||||
if (pixbuf != NULL)
|
||||
{
|
||||
@ -297,7 +315,7 @@ gtk_image_set_from_stock (GtkImage *image,
|
||||
{
|
||||
g_return_if_fail (GTK_IS_IMAGE (image));
|
||||
|
||||
gtk_image_clear (image);
|
||||
gtk_image_reset (image);
|
||||
|
||||
if (stock_id)
|
||||
{
|
||||
@ -323,7 +341,7 @@ gtk_image_set_from_icon_set (GtkImage *image,
|
||||
if (icon_set)
|
||||
gtk_icon_set_ref (icon_set);
|
||||
|
||||
gtk_image_clear (image);
|
||||
gtk_image_reset (image);
|
||||
|
||||
if (icon_set)
|
||||
{
|
||||
@ -697,7 +715,13 @@ gtk_image_clear (GtkImage *image)
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
|
@ -276,7 +276,7 @@ set_markup (GtkLabel *label,
|
||||
}
|
||||
|
||||
if (text)
|
||||
gtk_label_set_text (label, text);
|
||||
gtk_label_set_text_internal (label, text);
|
||||
|
||||
if (attrs)
|
||||
{
|
||||
|
@ -1903,8 +1903,8 @@ gtk_text_layout_free_line_display (GtkTextLayout *layout,
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
@ -4747,6 +4747,8 @@ create_clist (void)
|
||||
}
|
||||
}
|
||||
|
||||
gtk_style_unref (style);
|
||||
|
||||
separator = gtk_hseparator_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), separator, FALSE, TRUE, 0);
|
||||
|
||||
|
@ -4747,6 +4747,8 @@ create_clist (void)
|
||||
}
|
||||
}
|
||||
|
||||
gtk_style_unref (style);
|
||||
|
||||
separator = gtk_hseparator_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), separator, FALSE, TRUE, 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user