mirror of https://github.com/GNOME/gimp.git
libgimp/gimpbrushselect.c libgimp/gimpfontselect.c
2004-07-28 Michael Natterer <mitch@gimp.org> * libgimp/gimpbrushselect.c * libgimp/gimpfontselect.c * libgimp/gimpgradientselect.c * libgimp/gimppalettemenu.c * libgimp/gimppaletteselect.c * libgimp/gimppatternselect.c (gimp_*_select_destroy): don't leak the selected object's name and its data (brush mask etc). * libgimp/gimpfontmenu.c: moved the icon to the left side of the button. * libgimp/gimppalettemenu.c: ditto. Added "Since: GIMP 2.2" to API docs.
This commit is contained in:
parent
9a153f6e58
commit
80a40f0b96
16
ChangeLog
16
ChangeLog
|
@ -1,3 +1,19 @@
|
||||||
|
2004-07-28 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* libgimp/gimpbrushselect.c
|
||||||
|
* libgimp/gimpfontselect.c
|
||||||
|
* libgimp/gimpgradientselect.c
|
||||||
|
* libgimp/gimppalettemenu.c
|
||||||
|
* libgimp/gimppaletteselect.c
|
||||||
|
* libgimp/gimppatternselect.c (gimp_*_select_destroy): don't
|
||||||
|
leak the selected object's name and its data (brush mask etc).
|
||||||
|
|
||||||
|
* libgimp/gimpfontmenu.c: moved the icon to the left side of the
|
||||||
|
button.
|
||||||
|
|
||||||
|
* libgimp/gimppalettemenu.c: ditto. Added "Since: GIMP 2.2" to
|
||||||
|
API docs.
|
||||||
|
|
||||||
2004-07-28 Michael Natterer <mitch@gimp.org>
|
2004-07-28 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* app/widgets/gimpactiongroup.c
|
* app/widgets/gimpactiongroup.c
|
||||||
|
|
|
@ -144,11 +144,10 @@ gimp_brush_select_destroy (const gchar *brush_callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (brush_data->idle_id)
|
if (brush_data->idle_id)
|
||||||
{
|
|
||||||
g_source_remove (brush_data->idle_id);
|
g_source_remove (brush_data->idle_id);
|
||||||
|
|
||||||
g_free (brush_data->brush_name);
|
g_free (brush_data->brush_name);
|
||||||
g_free (brush_data->brush_mask_data);
|
g_free (brush_data->brush_mask_data);
|
||||||
}
|
|
||||||
|
|
||||||
if (brush_data->brush_callback)
|
if (brush_data->brush_callback)
|
||||||
gimp_brushes_close_popup (brush_data->brush_callback);
|
gimp_brushes_close_popup (brush_data->brush_callback);
|
||||||
|
|
|
@ -109,14 +109,14 @@ gimp_font_select_widget_new (const gchar *title,
|
||||||
gtk_container_add (GTK_CONTAINER (font_sel->button), hbox);
|
gtk_container_add (GTK_CONTAINER (font_sel->button), hbox);
|
||||||
gtk_widget_show (hbox);
|
gtk_widget_show (hbox);
|
||||||
|
|
||||||
|
image = gtk_image_new_from_stock (GIMP_STOCK_FONT, GTK_ICON_SIZE_BUTTON);
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
|
||||||
|
gtk_widget_show (image);
|
||||||
|
|
||||||
font_sel->label = gtk_label_new (font_name);
|
font_sel->label = gtk_label_new (font_name);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), font_sel->label, TRUE, TRUE, 4);
|
gtk_box_pack_start (GTK_BOX (hbox), font_sel->label, TRUE, TRUE, 4);
|
||||||
gtk_widget_show (font_sel->label);
|
gtk_widget_show (font_sel->label);
|
||||||
|
|
||||||
image = gtk_image_new_from_stock (GIMP_STOCK_FONT, GTK_ICON_SIZE_BUTTON);
|
|
||||||
gtk_box_pack_end (GTK_BOX (hbox), image, FALSE, FALSE, 4);
|
|
||||||
gtk_widget_show (image);
|
|
||||||
|
|
||||||
g_object_set_data (G_OBJECT (font_sel->button),
|
g_object_set_data (G_OBJECT (font_sel->button),
|
||||||
FONT_SELECT_DATA_KEY, font_sel);
|
FONT_SELECT_DATA_KEY, font_sel);
|
||||||
|
|
||||||
|
|
|
@ -127,10 +127,9 @@ gimp_font_select_destroy (const gchar *font_callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (font_data->idle_id)
|
if (font_data->idle_id)
|
||||||
{
|
|
||||||
g_source_remove (font_data->idle_id);
|
g_source_remove (font_data->idle_id);
|
||||||
|
|
||||||
g_free (font_data->font_name);
|
g_free (font_data->font_name);
|
||||||
}
|
|
||||||
|
|
||||||
if (font_data->font_callback)
|
if (font_data->font_callback)
|
||||||
gimp_fonts_close_popup (font_data->font_callback);
|
gimp_fonts_close_popup (font_data->font_callback);
|
||||||
|
|
|
@ -109,14 +109,14 @@ gimp_font_select_widget_new (const gchar *title,
|
||||||
gtk_container_add (GTK_CONTAINER (font_sel->button), hbox);
|
gtk_container_add (GTK_CONTAINER (font_sel->button), hbox);
|
||||||
gtk_widget_show (hbox);
|
gtk_widget_show (hbox);
|
||||||
|
|
||||||
|
image = gtk_image_new_from_stock (GIMP_STOCK_FONT, GTK_ICON_SIZE_BUTTON);
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
|
||||||
|
gtk_widget_show (image);
|
||||||
|
|
||||||
font_sel->label = gtk_label_new (font_name);
|
font_sel->label = gtk_label_new (font_name);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), font_sel->label, TRUE, TRUE, 4);
|
gtk_box_pack_start (GTK_BOX (hbox), font_sel->label, TRUE, TRUE, 4);
|
||||||
gtk_widget_show (font_sel->label);
|
gtk_widget_show (font_sel->label);
|
||||||
|
|
||||||
image = gtk_image_new_from_stock (GIMP_STOCK_FONT, GTK_ICON_SIZE_BUTTON);
|
|
||||||
gtk_box_pack_end (GTK_BOX (hbox), image, FALSE, FALSE, 4);
|
|
||||||
gtk_widget_show (image);
|
|
||||||
|
|
||||||
g_object_set_data (G_OBJECT (font_sel->button),
|
g_object_set_data (G_OBJECT (font_sel->button),
|
||||||
FONT_SELECT_DATA_KEY, font_sel);
|
FONT_SELECT_DATA_KEY, font_sel);
|
||||||
|
|
||||||
|
|
|
@ -136,11 +136,10 @@ gimp_gradient_select_destroy (const gchar *gradient_callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gradient_data->idle_id)
|
if (gradient_data->idle_id)
|
||||||
{
|
|
||||||
g_source_remove (gradient_data->idle_id);
|
g_source_remove (gradient_data->idle_id);
|
||||||
|
|
||||||
g_free (gradient_data->gradient_name);
|
g_free (gradient_data->gradient_name);
|
||||||
g_free (gradient_data->gradient_data);
|
g_free (gradient_data->gradient_data);
|
||||||
}
|
|
||||||
|
|
||||||
if (gradient_data->gradient_callback)
|
if (gradient_data->gradient_callback)
|
||||||
gimp_gradients_close_popup (gradient_data->gradient_callback);
|
gimp_gradients_close_popup (gradient_data->gradient_callback);
|
||||||
|
|
|
@ -72,6 +72,8 @@ static void gimp_palette_select_widget_destroy (GtkWidget *widget,
|
||||||
* plug-in dialog.
|
* plug-in dialog.
|
||||||
*
|
*
|
||||||
* Returns: A #GtkWidget that you can use in your UI.
|
* Returns: A #GtkWidget that you can use in your UI.
|
||||||
|
*
|
||||||
|
* Since: GIMP 2.2
|
||||||
*/
|
*/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gimp_palette_select_widget_new (const gchar *title,
|
gimp_palette_select_widget_new (const gchar *title,
|
||||||
|
@ -109,14 +111,14 @@ gimp_palette_select_widget_new (const gchar *title,
|
||||||
gtk_container_add (GTK_CONTAINER (palette_sel->button), hbox);
|
gtk_container_add (GTK_CONTAINER (palette_sel->button), hbox);
|
||||||
gtk_widget_show (hbox);
|
gtk_widget_show (hbox);
|
||||||
|
|
||||||
|
image = gtk_image_new_from_stock (GIMP_STOCK_PALETTE, GTK_ICON_SIZE_BUTTON);
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
|
||||||
|
gtk_widget_show (image);
|
||||||
|
|
||||||
palette_sel->label = gtk_label_new (palette_name);
|
palette_sel->label = gtk_label_new (palette_name);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), palette_sel->label, TRUE, TRUE, 4);
|
gtk_box_pack_start (GTK_BOX (hbox), palette_sel->label, TRUE, TRUE, 4);
|
||||||
gtk_widget_show (palette_sel->label);
|
gtk_widget_show (palette_sel->label);
|
||||||
|
|
||||||
image = gtk_image_new_from_stock (GIMP_STOCK_PALETTE, GTK_ICON_SIZE_BUTTON);
|
|
||||||
gtk_box_pack_end (GTK_BOX (hbox), image, FALSE, FALSE, 4);
|
|
||||||
gtk_widget_show (image);
|
|
||||||
|
|
||||||
g_object_set_data (G_OBJECT (palette_sel->button),
|
g_object_set_data (G_OBJECT (palette_sel->button),
|
||||||
PALETTE_SELECT_DATA_KEY, palette_sel);
|
PALETTE_SELECT_DATA_KEY, palette_sel);
|
||||||
|
|
||||||
|
@ -128,6 +130,8 @@ gimp_palette_select_widget_new (const gchar *title,
|
||||||
* @widget: A palette select widget.
|
* @widget: A palette select widget.
|
||||||
*
|
*
|
||||||
* Closes the popup window associated with @widget.
|
* Closes the popup window associated with @widget.
|
||||||
|
*
|
||||||
|
* Since: GIMP 2.2
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gimp_palette_select_widget_close (GtkWidget *widget)
|
gimp_palette_select_widget_close (GtkWidget *widget)
|
||||||
|
@ -153,6 +157,8 @@ gimp_palette_select_widget_close (GtkWidget *widget)
|
||||||
* Sets the current palette for the palette select widget. Calls the
|
* Sets the current palette for the palette select widget. Calls the
|
||||||
* callback function if one was supplied in the call to
|
* callback function if one was supplied in the call to
|
||||||
* gimp_palette_select_widget_new().
|
* gimp_palette_select_widget_new().
|
||||||
|
*
|
||||||
|
* Since: GIMP 2.2
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gimp_palette_select_widget_set (GtkWidget *widget,
|
gimp_palette_select_widget_set (GtkWidget *widget,
|
||||||
|
|
|
@ -128,10 +128,9 @@ gimp_palette_select_destroy (const gchar *palette_callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (palette_data->idle_id)
|
if (palette_data->idle_id)
|
||||||
{
|
|
||||||
g_source_remove (palette_data->idle_id);
|
g_source_remove (palette_data->idle_id);
|
||||||
|
|
||||||
g_free (palette_data->palette_name);
|
g_free (palette_data->palette_name);
|
||||||
}
|
|
||||||
|
|
||||||
if (palette_data->palette_callback)
|
if (palette_data->palette_callback)
|
||||||
gimp_palettes_close_popup (palette_data->palette_callback);
|
gimp_palettes_close_popup (palette_data->palette_callback);
|
||||||
|
|
|
@ -138,11 +138,10 @@ gimp_pattern_select_destroy (const gchar *pattern_callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pattern_data->idle_id)
|
if (pattern_data->idle_id)
|
||||||
{
|
|
||||||
g_source_remove (pattern_data->idle_id);
|
g_source_remove (pattern_data->idle_id);
|
||||||
|
|
||||||
g_free (pattern_data->pattern_name);
|
g_free (pattern_data->pattern_name);
|
||||||
g_free (pattern_data->pattern_mask_data);
|
g_free (pattern_data->pattern_mask_data);
|
||||||
}
|
|
||||||
|
|
||||||
if (pattern_data->pattern_callback)
|
if (pattern_data->pattern_callback)
|
||||||
gimp_patterns_close_popup (pattern_data->pattern_callback);
|
gimp_patterns_close_popup (pattern_data->pattern_callback);
|
||||||
|
|
Loading…
Reference in New Issue