libgimp: clean up the instance private code in all select buttons
This commit is contained in:
@ -81,8 +81,6 @@ struct _GimpBrushSelectButtonPrivate
|
|||||||
GtkWidget *popup;
|
GtkWidget *popup;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GET_PRIVATE(obj) (((GimpBrushSelectButton *) (obj))->priv)
|
|
||||||
|
|
||||||
|
|
||||||
/* local function prototypes */
|
/* local function prototypes */
|
||||||
|
|
||||||
@ -282,8 +280,7 @@ gimp_brush_select_button_init (GimpBrushSelectButton *button)
|
|||||||
|
|
||||||
button->priv = gimp_brush_select_button_get_instance_private (button);
|
button->priv = gimp_brush_select_button_get_instance_private (button);
|
||||||
|
|
||||||
|
priv = button->priv;
|
||||||
priv = GET_PRIVATE (button);
|
|
||||||
|
|
||||||
priv->brush_name = gimp_context_get_brush ();
|
priv->brush_name = gimp_context_get_brush ();
|
||||||
gimp_brush_get_pixels (priv->brush_name,
|
gimp_brush_get_pixels (priv->brush_name,
|
||||||
@ -369,22 +366,18 @@ gimp_brush_select_button_get_brush (GimpBrushSelectButton *button,
|
|||||||
gint *spacing,
|
gint *spacing,
|
||||||
GimpLayerMode *paint_mode)
|
GimpLayerMode *paint_mode)
|
||||||
{
|
{
|
||||||
GimpBrushSelectButtonPrivate *priv;
|
|
||||||
|
|
||||||
g_return_val_if_fail (GIMP_IS_BRUSH_SELECT_BUTTON (button), NULL);
|
g_return_val_if_fail (GIMP_IS_BRUSH_SELECT_BUTTON (button), NULL);
|
||||||
|
|
||||||
priv = GET_PRIVATE (button);
|
|
||||||
|
|
||||||
if (opacity)
|
if (opacity)
|
||||||
*opacity = priv->opacity;
|
*opacity = button->priv->opacity;
|
||||||
|
|
||||||
if (spacing)
|
if (spacing)
|
||||||
*spacing = priv->spacing;
|
*spacing = button->priv->spacing;
|
||||||
|
|
||||||
if (paint_mode)
|
if (paint_mode)
|
||||||
*paint_mode = priv->paint_mode;
|
*paint_mode = button->priv->paint_mode;
|
||||||
|
|
||||||
return priv->brush_name;
|
return button->priv->brush_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -475,11 +468,11 @@ gimp_brush_select_button_set_brush (GimpBrushSelectButton *button,
|
|||||||
static void
|
static void
|
||||||
gimp_brush_select_button_finalize (GObject *object)
|
gimp_brush_select_button_finalize (GObject *object)
|
||||||
{
|
{
|
||||||
GimpBrushSelectButtonPrivate *priv = GET_PRIVATE (object);
|
GimpBrushSelectButton *button = GIMP_BRUSH_SELECT_BUTTON (object);
|
||||||
|
|
||||||
g_clear_pointer (&priv->brush_name, g_free);
|
g_clear_pointer (&button->priv->brush_name, g_free);
|
||||||
g_clear_pointer (&priv->mask_data, g_free);
|
g_clear_pointer (&button->priv->mask_data, g_free);
|
||||||
g_clear_pointer (&priv->title, g_free);
|
g_clear_pointer (&button->priv->title, g_free);
|
||||||
|
|
||||||
G_OBJECT_CLASS (gimp_brush_select_button_parent_class)->finalize (object);
|
G_OBJECT_CLASS (gimp_brush_select_button_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
@ -491,7 +484,6 @@ gimp_brush_select_button_set_property (GObject *object,
|
|||||||
GParamSpec *pspec)
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
GimpBrushSelectButton *button = GIMP_BRUSH_SELECT_BUTTON (object);
|
GimpBrushSelectButton *button = GIMP_BRUSH_SELECT_BUTTON (object);
|
||||||
GimpBrushSelectButtonPrivate *priv = GET_PRIVATE (button);
|
|
||||||
gdouble opacity;
|
gdouble opacity;
|
||||||
gint32 spacing;
|
gint32 spacing;
|
||||||
gint32 paint_mode;
|
gint32 paint_mode;
|
||||||
@ -499,28 +491,33 @@ gimp_brush_select_button_set_property (GObject *object,
|
|||||||
switch (property_id)
|
switch (property_id)
|
||||||
{
|
{
|
||||||
case PROP_TITLE:
|
case PROP_TITLE:
|
||||||
priv->title = g_value_dup_string (value);
|
button->priv->title = g_value_dup_string (value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_BRUSH_NAME:
|
case PROP_BRUSH_NAME:
|
||||||
gimp_brush_select_button_set_brush (button,
|
gimp_brush_select_button_set_brush (button,
|
||||||
g_value_get_string (value),
|
g_value_get_string (value),
|
||||||
-1.0, -1, -1);
|
-1.0, -1, -1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_BRUSH_OPACITY:
|
case PROP_BRUSH_OPACITY:
|
||||||
opacity = g_value_get_double (value);
|
opacity = g_value_get_double (value);
|
||||||
if (opacity >= 0.0)
|
if (opacity >= 0.0)
|
||||||
priv->opacity = opacity;
|
button->priv->opacity = opacity;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_BRUSH_SPACING:
|
case PROP_BRUSH_SPACING:
|
||||||
spacing = g_value_get_int (value);
|
spacing = g_value_get_int (value);
|
||||||
if (spacing != -1)
|
if (spacing != -1)
|
||||||
priv->spacing = spacing;
|
button->priv->spacing = spacing;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_BRUSH_PAINT_MODE:
|
case PROP_BRUSH_PAINT_MODE:
|
||||||
paint_mode = g_value_get_int (value);
|
paint_mode = g_value_get_int (value);
|
||||||
if (paint_mode != -1)
|
if (paint_mode != -1)
|
||||||
priv->paint_mode = paint_mode;
|
button->priv->paint_mode = paint_mode;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||||
break;
|
break;
|
||||||
@ -534,25 +531,29 @@ gimp_brush_select_button_get_property (GObject *object,
|
|||||||
GParamSpec *pspec)
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
GimpBrushSelectButton *button = GIMP_BRUSH_SELECT_BUTTON (object);
|
GimpBrushSelectButton *button = GIMP_BRUSH_SELECT_BUTTON (object);
|
||||||
GimpBrushSelectButtonPrivate *priv = GET_PRIVATE (button);
|
|
||||||
|
|
||||||
switch (property_id)
|
switch (property_id)
|
||||||
{
|
{
|
||||||
case PROP_TITLE:
|
case PROP_TITLE:
|
||||||
g_value_set_string (value, priv->title);
|
g_value_set_string (value, button->priv->title);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_BRUSH_NAME:
|
case PROP_BRUSH_NAME:
|
||||||
g_value_set_string (value, priv->brush_name);
|
g_value_set_string (value, button->priv->brush_name);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_BRUSH_OPACITY:
|
case PROP_BRUSH_OPACITY:
|
||||||
g_value_set_double (value, priv->opacity);
|
g_value_set_double (value, button->priv->opacity);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_BRUSH_SPACING:
|
case PROP_BRUSH_SPACING:
|
||||||
g_value_set_int (value, priv->spacing);
|
g_value_set_int (value, button->priv->spacing);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_BRUSH_PAINT_MODE:
|
case PROP_BRUSH_PAINT_MODE:
|
||||||
g_value_set_int (value, priv->paint_mode);
|
g_value_set_int (value, button->priv->paint_mode);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||||
break;
|
break;
|
||||||
@ -571,21 +572,20 @@ gimp_brush_select_button_callback (const gchar *name,
|
|||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GimpBrushSelectButton *button = GIMP_BRUSH_SELECT_BUTTON (data);
|
GimpBrushSelectButton *button = GIMP_BRUSH_SELECT_BUTTON (data);
|
||||||
GimpBrushSelectButtonPrivate *priv = GET_PRIVATE (button);
|
|
||||||
GimpSelectButton *select_button = GIMP_SELECT_BUTTON (button);
|
GimpSelectButton *select_button = GIMP_SELECT_BUTTON (button);
|
||||||
|
|
||||||
g_free (priv->brush_name);
|
g_free (button->priv->brush_name);
|
||||||
g_free (priv->mask_data);
|
g_free (button->priv->mask_data);
|
||||||
|
|
||||||
priv->brush_name = g_strdup (name);
|
button->priv->brush_name = g_strdup (name);
|
||||||
priv->width = width;
|
button->priv->width = width;
|
||||||
priv->height = height;
|
button->priv->height = height;
|
||||||
priv->mask_data = g_memdup (mask_data, width * height);
|
button->priv->mask_data = g_memdup (mask_data, width * height);
|
||||||
priv->opacity = opacity;
|
button->priv->opacity = opacity;
|
||||||
priv->spacing = spacing;
|
button->priv->spacing = spacing;
|
||||||
priv->paint_mode = paint_mode;
|
button->priv->paint_mode = paint_mode;
|
||||||
|
|
||||||
gimp_brush_select_preview_update (priv->preview,
|
gimp_brush_select_preview_update (button->priv->preview,
|
||||||
width, height, mask_data);
|
width, height, mask_data);
|
||||||
|
|
||||||
if (dialog_closing)
|
if (dialog_closing)
|
||||||
@ -600,23 +600,25 @@ gimp_brush_select_button_callback (const gchar *name,
|
|||||||
static void
|
static void
|
||||||
gimp_brush_select_button_clicked (GimpBrushSelectButton *button)
|
gimp_brush_select_button_clicked (GimpBrushSelectButton *button)
|
||||||
{
|
{
|
||||||
GimpBrushSelectButtonPrivate *priv = GET_PRIVATE (button);
|
|
||||||
GimpSelectButton *select_button = GIMP_SELECT_BUTTON (button);
|
GimpSelectButton *select_button = GIMP_SELECT_BUTTON (button);
|
||||||
|
|
||||||
if (select_button->temp_callback)
|
if (select_button->temp_callback)
|
||||||
{
|
{
|
||||||
/* calling gimp_brushes_set_popup() raises the dialog */
|
/* calling gimp_brushes_set_popup() raises the dialog */
|
||||||
gimp_brushes_set_popup (select_button->temp_callback,
|
gimp_brushes_set_popup (select_button->temp_callback,
|
||||||
priv->brush_name,
|
button->priv->brush_name,
|
||||||
priv->opacity,
|
button->priv->opacity,
|
||||||
priv->spacing,
|
button->priv->spacing,
|
||||||
priv->paint_mode);
|
button->priv->paint_mode);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
select_button->temp_callback =
|
select_button->temp_callback =
|
||||||
gimp_brush_select_new (priv->title, priv->brush_name,
|
gimp_brush_select_new (button->priv->title,
|
||||||
priv->opacity, priv->spacing, priv->paint_mode,
|
button->priv->brush_name,
|
||||||
|
button->priv->opacity,
|
||||||
|
button->priv->spacing,
|
||||||
|
button->priv->paint_mode,
|
||||||
gimp_brush_select_button_callback,
|
gimp_brush_select_button_callback,
|
||||||
button, NULL);
|
button, NULL);
|
||||||
}
|
}
|
||||||
@ -625,13 +627,12 @@ gimp_brush_select_button_clicked (GimpBrushSelectButton *button)
|
|||||||
static void
|
static void
|
||||||
gimp_brush_select_preview_resize (GimpBrushSelectButton *button)
|
gimp_brush_select_preview_resize (GimpBrushSelectButton *button)
|
||||||
{
|
{
|
||||||
GimpBrushSelectButtonPrivate *priv = GET_PRIVATE (button);
|
if (button->priv->width > 0 &&
|
||||||
|
button->priv->height > 0)
|
||||||
if (priv->width > 0 && priv->height > 0)
|
gimp_brush_select_preview_update (button->priv->preview,
|
||||||
gimp_brush_select_preview_update (priv->preview,
|
button->priv->width,
|
||||||
priv->width,
|
button->priv->height,
|
||||||
priv->height,
|
button->priv->mask_data);
|
||||||
priv->mask_data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@ -639,10 +640,9 @@ gimp_brush_select_preview_events (GtkWidget *widget,
|
|||||||
GdkEvent *event,
|
GdkEvent *event,
|
||||||
GimpBrushSelectButton *button)
|
GimpBrushSelectButton *button)
|
||||||
{
|
{
|
||||||
GimpBrushSelectButtonPrivate *priv = GET_PRIVATE (button);
|
|
||||||
GdkEventButton *bevent;
|
GdkEventButton *bevent;
|
||||||
|
|
||||||
if (priv->mask_data)
|
if (button->priv->mask_data)
|
||||||
{
|
{
|
||||||
switch (event->type)
|
switch (event->type)
|
||||||
{
|
{
|
||||||
@ -749,7 +749,7 @@ gimp_brush_select_button_open_popup (GimpBrushSelectButton *button,
|
|||||||
gint x,
|
gint x,
|
||||||
gint y)
|
gint y)
|
||||||
{
|
{
|
||||||
GimpBrushSelectButtonPrivate *priv = GET_PRIVATE (button);
|
GimpBrushSelectButtonPrivate *priv = button->priv;
|
||||||
GtkWidget *frame;
|
GtkWidget *frame;
|
||||||
GtkWidget *preview;
|
GtkWidget *preview;
|
||||||
GdkMonitor *monitor;
|
GdkMonitor *monitor;
|
||||||
@ -804,13 +804,7 @@ gimp_brush_select_button_open_popup (GimpBrushSelectButton *button,
|
|||||||
static void
|
static void
|
||||||
gimp_brush_select_button_close_popup (GimpBrushSelectButton *button)
|
gimp_brush_select_button_close_popup (GimpBrushSelectButton *button)
|
||||||
{
|
{
|
||||||
GimpBrushSelectButtonPrivate *priv = GET_PRIVATE (button);
|
g_clear_pointer (&button->priv->popup, gtk_widget_destroy);
|
||||||
|
|
||||||
if (priv->popup)
|
|
||||||
{
|
|
||||||
gtk_widget_destroy (priv->popup);
|
|
||||||
priv->popup = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -855,7 +849,7 @@ gimp_brush_select_drag_data_received (GimpBrushSelectButton *button,
|
|||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
gimp_brush_select_button_create_inside (GimpBrushSelectButton *brush_button)
|
gimp_brush_select_button_create_inside (GimpBrushSelectButton *brush_button)
|
||||||
{
|
{
|
||||||
GimpBrushSelectButtonPrivate *priv = GET_PRIVATE (brush_button);
|
GimpBrushSelectButtonPrivate *priv = brush_button->priv;
|
||||||
GtkWidget *hbox;
|
GtkWidget *hbox;
|
||||||
GtkWidget *frame;
|
GtkWidget *frame;
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
|
@ -68,8 +68,6 @@ struct _GimpFontSelectButtonPrivate
|
|||||||
GtkWidget *label;
|
GtkWidget *label;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GET_PRIVATE(obj) (((GimpFontSelectButton *) (obj))->priv)
|
|
||||||
|
|
||||||
|
|
||||||
/* local function prototypes */
|
/* local function prototypes */
|
||||||
|
|
||||||
@ -178,16 +176,10 @@ gimp_font_select_button_class_init (GimpFontSelectButtonClass *klass)
|
|||||||
static void
|
static void
|
||||||
gimp_font_select_button_init (GimpFontSelectButton *button)
|
gimp_font_select_button_init (GimpFontSelectButton *button)
|
||||||
{
|
{
|
||||||
GimpFontSelectButtonPrivate *priv;
|
|
||||||
|
|
||||||
button->priv = gimp_font_select_button_get_instance_private (button);
|
button->priv = gimp_font_select_button_get_instance_private (button);
|
||||||
|
|
||||||
priv = GET_PRIVATE (button);
|
button->priv->inside = gimp_font_select_button_create_inside (button);
|
||||||
|
gtk_container_add (GTK_CONTAINER (button), button->priv->inside);
|
||||||
priv->font_name = NULL;
|
|
||||||
|
|
||||||
priv->inside = gimp_font_select_button_create_inside (button);
|
|
||||||
gtk_container_add (GTK_CONTAINER (button), priv->inside);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -237,7 +229,7 @@ gimp_font_select_button_get_font (GimpFontSelectButton *button)
|
|||||||
{
|
{
|
||||||
g_return_val_if_fail (GIMP_IS_FONT_SELECT_BUTTON (button), NULL);
|
g_return_val_if_fail (GIMP_IS_FONT_SELECT_BUTTON (button), NULL);
|
||||||
|
|
||||||
return GET_PRIVATE (button)->font_name;
|
return button->priv->font_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -271,10 +263,10 @@ gimp_font_select_button_set_font (GimpFontSelectButton *button,
|
|||||||
static void
|
static void
|
||||||
gimp_font_select_button_finalize (GObject *object)
|
gimp_font_select_button_finalize (GObject *object)
|
||||||
{
|
{
|
||||||
GimpFontSelectButtonPrivate *priv = GET_PRIVATE (object);
|
GimpFontSelectButton *button = GIMP_FONT_SELECT_BUTTON (object);
|
||||||
|
|
||||||
g_clear_pointer (&priv->font_name, g_free);
|
g_clear_pointer (&button->priv->font_name, g_free);
|
||||||
g_clear_pointer (&priv->title, g_free);
|
g_clear_pointer (&button->priv->title, g_free);
|
||||||
|
|
||||||
G_OBJECT_CLASS (gimp_font_select_button_parent_class)->finalize (object);
|
G_OBJECT_CLASS (gimp_font_select_button_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
@ -286,13 +278,13 @@ gimp_font_select_button_set_property (GObject *object,
|
|||||||
GParamSpec *pspec)
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
GimpFontSelectButton *button = GIMP_FONT_SELECT_BUTTON (object);
|
GimpFontSelectButton *button = GIMP_FONT_SELECT_BUTTON (object);
|
||||||
GimpFontSelectButtonPrivate *priv = GET_PRIVATE (button);
|
|
||||||
|
|
||||||
switch (property_id)
|
switch (property_id)
|
||||||
{
|
{
|
||||||
case PROP_TITLE:
|
case PROP_TITLE:
|
||||||
priv->title = g_value_dup_string (value);
|
button->priv->title = g_value_dup_string (value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_FONT_NAME:
|
case PROP_FONT_NAME:
|
||||||
gimp_font_select_button_set_font (button,
|
gimp_font_select_button_set_font (button,
|
||||||
g_value_get_string (value));
|
g_value_get_string (value));
|
||||||
@ -311,15 +303,15 @@ gimp_font_select_button_get_property (GObject *object,
|
|||||||
GParamSpec *pspec)
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
GimpFontSelectButton *button = GIMP_FONT_SELECT_BUTTON (object);
|
GimpFontSelectButton *button = GIMP_FONT_SELECT_BUTTON (object);
|
||||||
GimpFontSelectButtonPrivate *priv = GET_PRIVATE (button);
|
|
||||||
|
|
||||||
switch (property_id)
|
switch (property_id)
|
||||||
{
|
{
|
||||||
case PROP_TITLE:
|
case PROP_TITLE:
|
||||||
g_value_set_string (value, priv->title);
|
g_value_set_string (value, button->priv->title);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_FONT_NAME:
|
case PROP_FONT_NAME:
|
||||||
g_value_set_string (value, priv->font_name);
|
g_value_set_string (value, button->priv->font_name);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -334,7 +326,7 @@ gimp_font_select_button_callback (const gchar *font_name,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GimpFontSelectButton *button = GIMP_FONT_SELECT_BUTTON (user_data);
|
GimpFontSelectButton *button = GIMP_FONT_SELECT_BUTTON (user_data);
|
||||||
GimpFontSelectButtonPrivate *priv = GET_PRIVATE (button);
|
GimpFontSelectButtonPrivate *priv = button->priv;
|
||||||
GimpSelectButton *select_button = GIMP_SELECT_BUTTON (button);
|
GimpSelectButton *select_button = GIMP_SELECT_BUTTON (button);
|
||||||
|
|
||||||
g_free (priv->font_name);
|
g_free (priv->font_name);
|
||||||
@ -353,19 +345,19 @@ gimp_font_select_button_callback (const gchar *font_name,
|
|||||||
static void
|
static void
|
||||||
gimp_font_select_button_clicked (GimpFontSelectButton *button)
|
gimp_font_select_button_clicked (GimpFontSelectButton *button)
|
||||||
{
|
{
|
||||||
GimpFontSelectButtonPrivate *priv = GET_PRIVATE (button);
|
|
||||||
GimpSelectButton *select_button = GIMP_SELECT_BUTTON (button);
|
GimpSelectButton *select_button = GIMP_SELECT_BUTTON (button);
|
||||||
|
|
||||||
if (select_button->temp_callback)
|
if (select_button->temp_callback)
|
||||||
{
|
{
|
||||||
/* calling gimp_fonts_set_popup() raises the dialog */
|
/* calling gimp_fonts_set_popup() raises the dialog */
|
||||||
gimp_fonts_set_popup (select_button->temp_callback,
|
gimp_fonts_set_popup (select_button->temp_callback,
|
||||||
priv->font_name);
|
button->priv->font_name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
select_button->temp_callback =
|
select_button->temp_callback =
|
||||||
gimp_font_select_new (priv->title, priv->font_name,
|
gimp_font_select_new (button->priv->title,
|
||||||
|
button->priv->font_name,
|
||||||
gimp_font_select_button_callback,
|
gimp_font_select_button_callback,
|
||||||
button, NULL);
|
button, NULL);
|
||||||
}
|
}
|
||||||
@ -413,7 +405,7 @@ gimp_font_select_drag_data_received (GimpFontSelectButton *button,
|
|||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
gimp_font_select_button_create_inside (GimpFontSelectButton *font_button)
|
gimp_font_select_button_create_inside (GimpFontSelectButton *font_button)
|
||||||
{
|
{
|
||||||
GimpFontSelectButtonPrivate *priv = GET_PRIVATE (font_button);
|
GimpFontSelectButtonPrivate *priv = font_button->priv;
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
GtkWidget *hbox;
|
GtkWidget *hbox;
|
||||||
GtkWidget *image;
|
GtkWidget *image;
|
||||||
|
@ -75,8 +75,6 @@ struct _GimpGradientSelectButtonPrivate
|
|||||||
GtkWidget *preview;
|
GtkWidget *preview;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GET_PRIVATE(obj) (((GimpGradientSelectButton *) (obj))->priv)
|
|
||||||
|
|
||||||
|
|
||||||
/* local function prototypes */
|
/* local function prototypes */
|
||||||
|
|
||||||
@ -200,18 +198,14 @@ gimp_gradient_select_button_class_init (GimpGradientSelectButtonClass *klass)
|
|||||||
static void
|
static void
|
||||||
gimp_gradient_select_button_init (GimpGradientSelectButton *button)
|
gimp_gradient_select_button_init (GimpGradientSelectButton *button)
|
||||||
{
|
{
|
||||||
GimpGradientSelectButtonPrivate *priv;
|
|
||||||
|
|
||||||
button->priv = gimp_gradient_select_button_get_instance_private (button);
|
button->priv = gimp_gradient_select_button_get_instance_private (button);
|
||||||
|
|
||||||
priv = GET_PRIVATE (button);
|
button->priv->gradient_name = gimp_context_get_gradient ();
|
||||||
|
button->priv->sample_size = CELL_WIDTH;
|
||||||
|
button->priv->reverse = FALSE;
|
||||||
|
|
||||||
priv->gradient_name = gimp_context_get_gradient ();
|
button->priv->inside = gimp_gradient_select_button_create_inside (button);
|
||||||
priv->sample_size = CELL_WIDTH;
|
gtk_container_add (GTK_CONTAINER (button), button->priv->inside);
|
||||||
priv->reverse = FALSE;
|
|
||||||
|
|
||||||
priv->inside = gimp_gradient_select_button_create_inside (button);
|
|
||||||
gtk_container_add (GTK_CONTAINER (button), priv->inside);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -261,7 +255,7 @@ gimp_gradient_select_button_get_gradient (GimpGradientSelectButton *button)
|
|||||||
{
|
{
|
||||||
g_return_val_if_fail (GIMP_IS_GRADIENT_SELECT_BUTTON (button), NULL);
|
g_return_val_if_fail (GIMP_IS_GRADIENT_SELECT_BUTTON (button), NULL);
|
||||||
|
|
||||||
return GET_PRIVATE (button)->gradient_name;
|
return button->priv->gradient_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -277,12 +271,10 @@ void
|
|||||||
gimp_gradient_select_button_set_gradient (GimpGradientSelectButton *button,
|
gimp_gradient_select_button_set_gradient (GimpGradientSelectButton *button,
|
||||||
const gchar *gradient_name)
|
const gchar *gradient_name)
|
||||||
{
|
{
|
||||||
GimpGradientSelectButtonPrivate *priv;
|
|
||||||
GimpSelectButton *select_button;
|
GimpSelectButton *select_button;
|
||||||
|
|
||||||
g_return_if_fail (GIMP_IS_GRADIENT_SELECT_BUTTON (button));
|
g_return_if_fail (GIMP_IS_GRADIENT_SELECT_BUTTON (button));
|
||||||
|
|
||||||
priv = GET_PRIVATE (button);
|
|
||||||
select_button = GIMP_SELECT_BUTTON (button);
|
select_button = GIMP_SELECT_BUTTON (button);
|
||||||
|
|
||||||
if (select_button->temp_callback)
|
if (select_button->temp_callback)
|
||||||
@ -301,8 +293,8 @@ gimp_gradient_select_button_set_gradient (GimpGradientSelectButton *button,
|
|||||||
name = gimp_context_get_gradient ();
|
name = gimp_context_get_gradient ();
|
||||||
|
|
||||||
if (gimp_gradient_get_uniform_samples (name,
|
if (gimp_gradient_get_uniform_samples (name,
|
||||||
priv->sample_size,
|
button->priv->sample_size,
|
||||||
priv->reverse,
|
button->priv->reverse,
|
||||||
&n_samples,
|
&n_samples,
|
||||||
&samples))
|
&samples))
|
||||||
{
|
{
|
||||||
@ -323,11 +315,11 @@ gimp_gradient_select_button_set_gradient (GimpGradientSelectButton *button,
|
|||||||
static void
|
static void
|
||||||
gimp_gradient_select_button_finalize (GObject *object)
|
gimp_gradient_select_button_finalize (GObject *object)
|
||||||
{
|
{
|
||||||
GimpGradientSelectButtonPrivate *priv = GET_PRIVATE (object);
|
GimpGradientSelectButton *button = GIMP_GRADIENT_SELECT_BUTTON (object);
|
||||||
|
|
||||||
g_clear_pointer (&priv->gradient_name, g_free);
|
g_clear_pointer (&button->priv->gradient_name, g_free);
|
||||||
g_clear_pointer (&priv->gradient_data, g_free);
|
g_clear_pointer (&button->priv->gradient_data, g_free);
|
||||||
g_clear_pointer (&priv->title, g_free);
|
g_clear_pointer (&button->priv->title, g_free);
|
||||||
|
|
||||||
G_OBJECT_CLASS (gimp_gradient_select_button_parent_class)->finalize (object);
|
G_OBJECT_CLASS (gimp_gradient_select_button_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
@ -339,13 +331,13 @@ gimp_gradient_select_button_set_property (GObject *object,
|
|||||||
GParamSpec *pspec)
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
GimpGradientSelectButton *button = GIMP_GRADIENT_SELECT_BUTTON (object);
|
GimpGradientSelectButton *button = GIMP_GRADIENT_SELECT_BUTTON (object);
|
||||||
GimpGradientSelectButtonPrivate *priv = GET_PRIVATE (object);
|
|
||||||
|
|
||||||
switch (property_id)
|
switch (property_id)
|
||||||
{
|
{
|
||||||
case PROP_TITLE:
|
case PROP_TITLE:
|
||||||
priv->title = g_value_dup_string (value);
|
button->priv->title = g_value_dup_string (value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_GRADIENT_NAME:
|
case PROP_GRADIENT_NAME:
|
||||||
gimp_gradient_select_button_set_gradient (button,
|
gimp_gradient_select_button_set_gradient (button,
|
||||||
g_value_get_string (value));
|
g_value_get_string (value));
|
||||||
@ -363,15 +355,16 @@ gimp_gradient_select_button_get_property (GObject *object,
|
|||||||
GValue *value,
|
GValue *value,
|
||||||
GParamSpec *pspec)
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
GimpGradientSelectButtonPrivate *priv = GET_PRIVATE (object);
|
GimpGradientSelectButton *button = GIMP_GRADIENT_SELECT_BUTTON (object);
|
||||||
|
|
||||||
switch (property_id)
|
switch (property_id)
|
||||||
{
|
{
|
||||||
case PROP_TITLE:
|
case PROP_TITLE:
|
||||||
g_value_set_string (value, priv->title);
|
g_value_set_string (value, button->priv->title);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_GRADIENT_NAME:
|
case PROP_GRADIENT_NAME:
|
||||||
g_value_set_string (value, priv->gradient_name);
|
g_value_set_string (value, button->priv->gradient_name);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -388,17 +381,17 @@ gimp_gradient_select_button_callback (const gchar *gradient_name,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GimpGradientSelectButton *button = user_data;
|
GimpGradientSelectButton *button = user_data;
|
||||||
GimpGradientSelectButtonPrivate *priv = GET_PRIVATE (button);
|
|
||||||
GimpSelectButton *select_button = GIMP_SELECT_BUTTON (button);
|
GimpSelectButton *select_button = GIMP_SELECT_BUTTON (button);
|
||||||
|
|
||||||
g_free (priv->gradient_name);
|
g_free (button->priv->gradient_name);
|
||||||
g_free (priv->gradient_data);
|
g_free (button->priv->gradient_data);
|
||||||
|
|
||||||
priv->gradient_name = g_strdup (gradient_name);
|
button->priv->gradient_name = g_strdup (gradient_name);
|
||||||
priv->n_samples = n_samples;
|
button->priv->n_samples = n_samples;
|
||||||
priv->gradient_data = g_memdup (gradient_data, n_samples * sizeof (gdouble));
|
button->priv->gradient_data = g_memdup (gradient_data,
|
||||||
|
n_samples * sizeof (gdouble));
|
||||||
|
|
||||||
gtk_widget_queue_draw (priv->preview);
|
gtk_widget_queue_draw (button->priv->preview);
|
||||||
|
|
||||||
if (dialog_closing)
|
if (dialog_closing)
|
||||||
select_button->temp_callback = NULL;
|
select_button->temp_callback = NULL;
|
||||||
@ -411,20 +404,20 @@ gimp_gradient_select_button_callback (const gchar *gradient_name,
|
|||||||
static void
|
static void
|
||||||
gimp_gradient_select_button_clicked (GimpGradientSelectButton *button)
|
gimp_gradient_select_button_clicked (GimpGradientSelectButton *button)
|
||||||
{
|
{
|
||||||
GimpGradientSelectButtonPrivate *priv = GET_PRIVATE (button);
|
|
||||||
GimpSelectButton *select_button = GIMP_SELECT_BUTTON (button);
|
GimpSelectButton *select_button = GIMP_SELECT_BUTTON (button);
|
||||||
|
|
||||||
if (select_button->temp_callback)
|
if (select_button->temp_callback)
|
||||||
{
|
{
|
||||||
/* calling gimp_gradients_set_popup() raises the dialog */
|
/* calling gimp_gradients_set_popup() raises the dialog */
|
||||||
gimp_gradients_set_popup (select_button->temp_callback,
|
gimp_gradients_set_popup (select_button->temp_callback,
|
||||||
priv->gradient_name);
|
button->priv->gradient_name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
select_button->temp_callback =
|
select_button->temp_callback =
|
||||||
gimp_gradient_select_new (priv->title, priv->gradient_name,
|
gimp_gradient_select_new (button->priv->title,
|
||||||
priv->sample_size,
|
button->priv->gradient_name,
|
||||||
|
button->priv->sample_size,
|
||||||
gimp_gradient_select_button_callback,
|
gimp_gradient_select_button_callback,
|
||||||
button, NULL);
|
button, NULL);
|
||||||
}
|
}
|
||||||
@ -435,21 +428,20 @@ gimp_gradient_select_preview_size_allocate (GtkWidget *widget,
|
|||||||
GtkAllocation *allocation,
|
GtkAllocation *allocation,
|
||||||
GimpGradientSelectButton *button)
|
GimpGradientSelectButton *button)
|
||||||
{
|
{
|
||||||
GimpGradientSelectButtonPrivate *priv = GET_PRIVATE (button);
|
|
||||||
gdouble *samples;
|
gdouble *samples;
|
||||||
gint n_samples;
|
gint n_samples;
|
||||||
|
|
||||||
if (gimp_gradient_get_uniform_samples (priv->gradient_name,
|
if (gimp_gradient_get_uniform_samples (button->priv->gradient_name,
|
||||||
allocation->width,
|
allocation->width,
|
||||||
priv->reverse,
|
button->priv->reverse,
|
||||||
&n_samples,
|
&n_samples,
|
||||||
&samples))
|
&samples))
|
||||||
{
|
{
|
||||||
g_free (priv->gradient_data);
|
g_free (button->priv->gradient_data);
|
||||||
|
|
||||||
priv->sample_size = allocation->width;
|
button->priv->sample_size = allocation->width;
|
||||||
priv->n_samples = n_samples;
|
button->priv->n_samples = n_samples;
|
||||||
priv->gradient_data = samples;
|
button->priv->gradient_data = samples;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -458,7 +450,6 @@ gimp_gradient_select_preview_draw (GtkWidget *widget,
|
|||||||
cairo_t *cr,
|
cairo_t *cr,
|
||||||
GimpGradientSelectButton *button)
|
GimpGradientSelectButton *button)
|
||||||
{
|
{
|
||||||
GimpGradientSelectButtonPrivate *priv = GET_PRIVATE (button);
|
|
||||||
GtkAllocation allocation;
|
GtkAllocation allocation;
|
||||||
cairo_pattern_t *pattern;
|
cairo_pattern_t *pattern;
|
||||||
cairo_surface_t *surface;
|
cairo_surface_t *surface;
|
||||||
@ -467,7 +458,7 @@ gimp_gradient_select_preview_draw (GtkWidget *widget,
|
|||||||
gint width;
|
gint width;
|
||||||
gint x;
|
gint x;
|
||||||
|
|
||||||
src = priv->gradient_data;
|
src = button->priv->gradient_data;
|
||||||
if (! src)
|
if (! src)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
@ -479,7 +470,7 @@ gimp_gradient_select_preview_draw (GtkWidget *widget,
|
|||||||
|
|
||||||
cairo_paint (cr);
|
cairo_paint (cr);
|
||||||
|
|
||||||
width = priv->n_samples / 4;
|
width = button->priv->n_samples / 4;
|
||||||
|
|
||||||
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, 1);
|
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, 1);
|
||||||
|
|
||||||
@ -554,7 +545,7 @@ gimp_gradient_select_drag_data_received (GimpGradientSelectButton *button,
|
|||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
gimp_gradient_select_button_create_inside (GimpGradientSelectButton *gradient_button)
|
gimp_gradient_select_button_create_inside (GimpGradientSelectButton *gradient_button)
|
||||||
{
|
{
|
||||||
GimpGradientSelectButtonPrivate *priv = GET_PRIVATE (gradient_button);
|
GimpGradientSelectButtonPrivate *priv = gradient_button->priv;
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
|
|
||||||
button = gtk_button_new ();
|
button = gtk_button_new ();
|
||||||
|
@ -44,10 +44,6 @@
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_PALETTE_SELECT_BUTTON_GET_PRIVATE(obj) ((GimpPaletteSelectButtonPrivate *) gimp_palette_select_button_get_instance_private ((GimpPaletteSelectButton *) (obj)))
|
|
||||||
|
|
||||||
typedef struct _GimpPaletteSelectButtonPrivate GimpPaletteSelectButtonPrivate;
|
|
||||||
|
|
||||||
struct _GimpPaletteSelectButtonPrivate
|
struct _GimpPaletteSelectButtonPrivate
|
||||||
{
|
{
|
||||||
gchar *title;
|
gchar *title;
|
||||||
@ -179,14 +175,10 @@ gimp_palette_select_button_class_init (GimpPaletteSelectButtonClass *klass)
|
|||||||
static void
|
static void
|
||||||
gimp_palette_select_button_init (GimpPaletteSelectButton *button)
|
gimp_palette_select_button_init (GimpPaletteSelectButton *button)
|
||||||
{
|
{
|
||||||
GimpPaletteSelectButtonPrivate *priv;
|
button->priv = gimp_palette_select_button_get_instance_private (button);
|
||||||
|
|
||||||
priv = GIMP_PALETTE_SELECT_BUTTON_GET_PRIVATE (button);
|
button->priv->inside = gimp_palette_select_button_create_inside (button);
|
||||||
|
gtk_container_add (GTK_CONTAINER (button), button->priv->inside);
|
||||||
priv->palette_name = NULL;
|
|
||||||
|
|
||||||
priv->inside = gimp_palette_select_button_create_inside (button);
|
|
||||||
gtk_container_add (GTK_CONTAINER (button), priv->inside);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -234,12 +226,9 @@ gimp_palette_select_button_new (const gchar *title,
|
|||||||
const gchar *
|
const gchar *
|
||||||
gimp_palette_select_button_get_palette (GimpPaletteSelectButton *button)
|
gimp_palette_select_button_get_palette (GimpPaletteSelectButton *button)
|
||||||
{
|
{
|
||||||
GimpPaletteSelectButtonPrivate *priv;
|
|
||||||
|
|
||||||
g_return_val_if_fail (GIMP_IS_PALETTE_SELECT_BUTTON (button), NULL);
|
g_return_val_if_fail (GIMP_IS_PALETTE_SELECT_BUTTON (button), NULL);
|
||||||
|
|
||||||
priv = GIMP_PALETTE_SELECT_BUTTON_GET_PRIVATE (button);
|
return button->priv->palette_name;
|
||||||
return priv->palette_name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -288,12 +277,10 @@ gimp_palette_select_button_set_palette (GimpPaletteSelectButton *button,
|
|||||||
static void
|
static void
|
||||||
gimp_palette_select_button_finalize (GObject *object)
|
gimp_palette_select_button_finalize (GObject *object)
|
||||||
{
|
{
|
||||||
GimpPaletteSelectButtonPrivate *priv;
|
GimpPaletteSelectButton *button = GIMP_PALETTE_SELECT_BUTTON (object);
|
||||||
|
|
||||||
priv = GIMP_PALETTE_SELECT_BUTTON_GET_PRIVATE (object);
|
g_clear_pointer (&button->priv->palette_name, g_free);
|
||||||
|
g_clear_pointer (&button->priv->title, g_free);
|
||||||
g_clear_pointer (&priv->palette_name, g_free);
|
|
||||||
g_clear_pointer (&priv->title, g_free);
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (gimp_palette_select_button_parent_class)->finalize (object);
|
G_OBJECT_CLASS (gimp_palette_select_button_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
@ -304,21 +291,19 @@ gimp_palette_select_button_set_property (GObject *object,
|
|||||||
const GValue *value,
|
const GValue *value,
|
||||||
GParamSpec *pspec)
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
GimpPaletteSelectButton *button;
|
GimpPaletteSelectButton *button = GIMP_PALETTE_SELECT_BUTTON (object);
|
||||||
GimpPaletteSelectButtonPrivate *priv;
|
|
||||||
|
|
||||||
button = GIMP_PALETTE_SELECT_BUTTON (object);
|
|
||||||
priv = GIMP_PALETTE_SELECT_BUTTON_GET_PRIVATE (button);
|
|
||||||
|
|
||||||
switch (property_id)
|
switch (property_id)
|
||||||
{
|
{
|
||||||
case PROP_TITLE:
|
case PROP_TITLE:
|
||||||
priv->title = g_value_dup_string (value);
|
button->priv->title = g_value_dup_string (value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_PALETTE_NAME:
|
case PROP_PALETTE_NAME:
|
||||||
gimp_palette_select_button_set_palette (button,
|
gimp_palette_select_button_set_palette (button,
|
||||||
g_value_get_string (value));
|
g_value_get_string (value));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||||
break;
|
break;
|
||||||
@ -331,20 +316,18 @@ gimp_palette_select_button_get_property (GObject *object,
|
|||||||
GValue *value,
|
GValue *value,
|
||||||
GParamSpec *pspec)
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
GimpPaletteSelectButton *button;
|
GimpPaletteSelectButton *button = GIMP_PALETTE_SELECT_BUTTON (object);
|
||||||
GimpPaletteSelectButtonPrivate *priv;
|
|
||||||
|
|
||||||
button = GIMP_PALETTE_SELECT_BUTTON (object);
|
|
||||||
priv = GIMP_PALETTE_SELECT_BUTTON_GET_PRIVATE (button);
|
|
||||||
|
|
||||||
switch (property_id)
|
switch (property_id)
|
||||||
{
|
{
|
||||||
case PROP_TITLE:
|
case PROP_TITLE:
|
||||||
g_value_set_string (value, priv->title);
|
g_value_set_string (value, button->priv->title);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_PALETTE_NAME:
|
case PROP_PALETTE_NAME:
|
||||||
g_value_set_string (value, priv->palette_name);
|
g_value_set_string (value, button->priv->palette_name);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||||
break;
|
break;
|
||||||
@ -356,19 +339,13 @@ gimp_palette_select_button_callback (const gchar *palette_name,
|
|||||||
gboolean dialog_closing,
|
gboolean dialog_closing,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GimpPaletteSelectButton *button;
|
GimpPaletteSelectButton *button = user_data;
|
||||||
GimpPaletteSelectButtonPrivate *priv;
|
GimpSelectButton *select_button = GIMP_SELECT_BUTTON (button);
|
||||||
GimpSelectButton *select_button;
|
|
||||||
|
|
||||||
button = GIMP_PALETTE_SELECT_BUTTON (user_data);
|
g_free (button->priv->palette_name);
|
||||||
|
button->priv->palette_name = g_strdup (palette_name);
|
||||||
|
|
||||||
priv = GIMP_PALETTE_SELECT_BUTTON_GET_PRIVATE (button);
|
gtk_label_set_text (GTK_LABEL (button->priv->label), palette_name);
|
||||||
select_button = GIMP_SELECT_BUTTON (button);
|
|
||||||
|
|
||||||
g_free (priv->palette_name);
|
|
||||||
priv->palette_name = g_strdup (palette_name);
|
|
||||||
|
|
||||||
gtk_label_set_text (GTK_LABEL (priv->label), palette_name);
|
|
||||||
|
|
||||||
if (dialog_closing)
|
if (dialog_closing)
|
||||||
select_button->temp_callback = NULL;
|
select_button->temp_callback = NULL;
|
||||||
@ -381,22 +358,19 @@ gimp_palette_select_button_callback (const gchar *palette_name,
|
|||||||
static void
|
static void
|
||||||
gimp_palette_select_button_clicked (GimpPaletteSelectButton *button)
|
gimp_palette_select_button_clicked (GimpPaletteSelectButton *button)
|
||||||
{
|
{
|
||||||
GimpPaletteSelectButtonPrivate *priv;
|
GimpSelectButton *select_button = GIMP_SELECT_BUTTON (button);
|
||||||
GimpSelectButton *select_button;
|
|
||||||
|
|
||||||
priv = GIMP_PALETTE_SELECT_BUTTON_GET_PRIVATE (button);
|
|
||||||
select_button = GIMP_SELECT_BUTTON (button);
|
|
||||||
|
|
||||||
if (select_button->temp_callback)
|
if (select_button->temp_callback)
|
||||||
{
|
{
|
||||||
/* calling gimp_palettes_set_popup() raises the dialog */
|
/* calling gimp_palettes_set_popup() raises the dialog */
|
||||||
gimp_palettes_set_popup (select_button->temp_callback,
|
gimp_palettes_set_popup (select_button->temp_callback,
|
||||||
priv->palette_name);
|
button->priv->palette_name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
select_button->temp_callback =
|
select_button->temp_callback =
|
||||||
gimp_palette_select_new (priv->title, priv->palette_name,
|
gimp_palette_select_new (button->priv->title,
|
||||||
|
button->priv->palette_name,
|
||||||
gimp_palette_select_button_callback,
|
gimp_palette_select_button_callback,
|
||||||
button, NULL);
|
button, NULL);
|
||||||
}
|
}
|
||||||
@ -447,9 +421,6 @@ gimp_palette_select_button_create_inside (GimpPaletteSelectButton *palette_butto
|
|||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
GtkWidget *hbox;
|
GtkWidget *hbox;
|
||||||
GtkWidget *image;
|
GtkWidget *image;
|
||||||
GimpPaletteSelectButtonPrivate *priv;
|
|
||||||
|
|
||||||
priv = GIMP_PALETTE_SELECT_BUTTON_GET_PRIVATE (palette_button);
|
|
||||||
|
|
||||||
button = gtk_button_new ();
|
button = gtk_button_new ();
|
||||||
|
|
||||||
@ -460,8 +431,8 @@ gimp_palette_select_button_create_inside (GimpPaletteSelectButton *palette_butto
|
|||||||
GTK_ICON_SIZE_BUTTON);
|
GTK_ICON_SIZE_BUTTON);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
|
||||||
|
|
||||||
priv->label = gtk_label_new (priv->palette_name);
|
palette_button->priv->label = gtk_label_new (palette_button->priv->palette_name);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), priv->label, TRUE, TRUE, 4);
|
gtk_box_pack_start (GTK_BOX (hbox), palette_button->priv->label, TRUE, TRUE, 4);
|
||||||
|
|
||||||
gtk_widget_show_all (button);
|
gtk_widget_show_all (button);
|
||||||
|
|
||||||
|
@ -40,11 +40,14 @@ G_BEGIN_DECLS
|
|||||||
#define GIMP_PALETTE_SELECT_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_PALETTE_SELECT_BUTTON, GimpPaletteSelectButtonClass))
|
#define GIMP_PALETTE_SELECT_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_PALETTE_SELECT_BUTTON, GimpPaletteSelectButtonClass))
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _GimpPaletteSelectButtonPrivate GimpPaletteSelectButtonPrivate;
|
||||||
typedef struct _GimpPaletteSelectButtonClass GimpPaletteSelectButtonClass;
|
typedef struct _GimpPaletteSelectButtonClass GimpPaletteSelectButtonClass;
|
||||||
|
|
||||||
struct _GimpPaletteSelectButton
|
struct _GimpPaletteSelectButton
|
||||||
{
|
{
|
||||||
GimpSelectButton parent_instance;
|
GimpSelectButton parent_instance;
|
||||||
|
|
||||||
|
GimpPaletteSelectButtonPrivate *priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GimpPaletteSelectButtonClass
|
struct _GimpPaletteSelectButtonClass
|
||||||
@ -61,6 +64,10 @@ struct _GimpPaletteSelectButtonClass
|
|||||||
void (*_gimp_reserved2) (void);
|
void (*_gimp_reserved2) (void);
|
||||||
void (*_gimp_reserved3) (void);
|
void (*_gimp_reserved3) (void);
|
||||||
void (*_gimp_reserved4) (void);
|
void (*_gimp_reserved4) (void);
|
||||||
|
void (*_gimp_reserved5) (void);
|
||||||
|
void (*_gimp_reserved6) (void);
|
||||||
|
void (*_gimp_reserved7) (void);
|
||||||
|
void (*_gimp_reserved8) (void);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,9 +47,7 @@
|
|||||||
#define CELL_SIZE 20
|
#define CELL_SIZE 20
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_PATTERN_SELECT_BUTTON_GET_PRIVATE(obj) ((GimpPatternSelectButtonPrivate *) gimp_pattern_select_button_get_instance_private ((GimpPatternSelectButton *) (obj)))
|
#define GET_PRIVATE(obj) (((GimpPatternSelectButtonPrivate *) (obj))->priv)
|
||||||
|
|
||||||
typedef struct _GimpPatternSelectButtonPrivate GimpPatternSelectButtonPrivate;
|
|
||||||
|
|
||||||
struct _GimpPatternSelectButtonPrivate
|
struct _GimpPatternSelectButtonPrivate
|
||||||
{
|
{
|
||||||
@ -137,6 +135,7 @@ static guint pattern_button_signals[LAST_SIGNAL] = { 0 };
|
|||||||
G_DEFINE_TYPE_WITH_PRIVATE (GimpPatternSelectButton, gimp_pattern_select_button,
|
G_DEFINE_TYPE_WITH_PRIVATE (GimpPatternSelectButton, gimp_pattern_select_button,
|
||||||
GIMP_TYPE_SELECT_BUTTON)
|
GIMP_TYPE_SELECT_BUTTON)
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_pattern_select_button_class_init (GimpPatternSelectButtonClass *klass)
|
gimp_pattern_select_button_class_init (GimpPatternSelectButtonClass *klass)
|
||||||
{
|
{
|
||||||
@ -213,23 +212,20 @@ gimp_pattern_select_button_class_init (GimpPatternSelectButtonClass *klass)
|
|||||||
static void
|
static void
|
||||||
gimp_pattern_select_button_init (GimpPatternSelectButton *button)
|
gimp_pattern_select_button_init (GimpPatternSelectButton *button)
|
||||||
{
|
{
|
||||||
GimpPatternSelectButtonPrivate *priv;
|
|
||||||
gint mask_data_size;
|
gint mask_data_size;
|
||||||
|
|
||||||
priv = GIMP_PATTERN_SELECT_BUTTON_GET_PRIVATE (button);
|
button->priv = gimp_pattern_select_button_get_instance_private (button);
|
||||||
|
|
||||||
priv->pattern_name = gimp_context_get_pattern ();
|
button->priv->pattern_name = gimp_context_get_pattern ();
|
||||||
gimp_pattern_get_pixels (priv->pattern_name,
|
gimp_pattern_get_pixels (button->priv->pattern_name,
|
||||||
&priv->width,
|
&button->priv->width,
|
||||||
&priv->height,
|
&button->priv->height,
|
||||||
&priv->bytes,
|
&button->priv->bytes,
|
||||||
&mask_data_size,
|
&mask_data_size,
|
||||||
&priv->mask_data);
|
&button->priv->mask_data);
|
||||||
|
|
||||||
priv->inside = gimp_pattern_select_button_create_inside (button);
|
button->priv->inside = gimp_pattern_select_button_create_inside (button);
|
||||||
gtk_container_add (GTK_CONTAINER (button), priv->inside);
|
gtk_container_add (GTK_CONTAINER (button), button->priv->inside);
|
||||||
|
|
||||||
priv->popup = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -277,12 +273,9 @@ gimp_pattern_select_button_new (const gchar *title,
|
|||||||
const gchar *
|
const gchar *
|
||||||
gimp_pattern_select_button_get_pattern (GimpPatternSelectButton *button)
|
gimp_pattern_select_button_get_pattern (GimpPatternSelectButton *button)
|
||||||
{
|
{
|
||||||
GimpPatternSelectButtonPrivate *priv;
|
|
||||||
|
|
||||||
g_return_val_if_fail (GIMP_IS_PATTERN_SELECT_BUTTON (button), NULL);
|
g_return_val_if_fail (GIMP_IS_PATTERN_SELECT_BUTTON (button), NULL);
|
||||||
|
|
||||||
priv = GIMP_PATTERN_SELECT_BUTTON_GET_PRIVATE (button);
|
return button->priv->pattern_name;
|
||||||
return priv->pattern_name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -346,13 +339,11 @@ gimp_pattern_select_button_set_pattern (GimpPatternSelectButton *button,
|
|||||||
static void
|
static void
|
||||||
gimp_pattern_select_button_finalize (GObject *object)
|
gimp_pattern_select_button_finalize (GObject *object)
|
||||||
{
|
{
|
||||||
GimpPatternSelectButtonPrivate *priv;
|
GimpPatternSelectButton *button = GIMP_PATTERN_SELECT_BUTTON (object);
|
||||||
|
|
||||||
priv = GIMP_PATTERN_SELECT_BUTTON_GET_PRIVATE (object);
|
g_clear_pointer (&button->priv->pattern_name, g_free);
|
||||||
|
g_clear_pointer (&button->priv->mask_data, g_free);
|
||||||
g_clear_pointer (&priv->pattern_name, g_free);
|
g_clear_pointer (&button->priv->title, g_free);
|
||||||
g_clear_pointer (&priv->mask_data, g_free);
|
|
||||||
g_clear_pointer (&priv->title, g_free);
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (gimp_pattern_select_button_parent_class)->finalize (object);
|
G_OBJECT_CLASS (gimp_pattern_select_button_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
@ -363,21 +354,19 @@ gimp_pattern_select_button_set_property (GObject *object,
|
|||||||
const GValue *value,
|
const GValue *value,
|
||||||
GParamSpec *pspec)
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
GimpPatternSelectButton *button;
|
GimpPatternSelectButton *button = GIMP_PATTERN_SELECT_BUTTON (object);
|
||||||
GimpPatternSelectButtonPrivate *priv;
|
|
||||||
|
|
||||||
button = GIMP_PATTERN_SELECT_BUTTON (object);
|
|
||||||
priv = GIMP_PATTERN_SELECT_BUTTON_GET_PRIVATE (button);
|
|
||||||
|
|
||||||
switch (property_id)
|
switch (property_id)
|
||||||
{
|
{
|
||||||
case PROP_TITLE:
|
case PROP_TITLE:
|
||||||
priv->title = g_value_dup_string (value);
|
button->priv->title = g_value_dup_string (value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_PATTERN_NAME:
|
case PROP_PATTERN_NAME:
|
||||||
gimp_pattern_select_button_set_pattern (button,
|
gimp_pattern_select_button_set_pattern (button,
|
||||||
g_value_get_string (value));
|
g_value_get_string (value));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||||
break;
|
break;
|
||||||
@ -390,20 +379,18 @@ gimp_pattern_select_button_get_property (GObject *object,
|
|||||||
GValue *value,
|
GValue *value,
|
||||||
GParamSpec *pspec)
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
GimpPatternSelectButton *button;
|
GimpPatternSelectButton *button = GIMP_PATTERN_SELECT_BUTTON (object);
|
||||||
GimpPatternSelectButtonPrivate *priv;
|
|
||||||
|
|
||||||
button = GIMP_PATTERN_SELECT_BUTTON (object);
|
|
||||||
priv = GIMP_PATTERN_SELECT_BUTTON_GET_PRIVATE (button);
|
|
||||||
|
|
||||||
switch (property_id)
|
switch (property_id)
|
||||||
{
|
{
|
||||||
case PROP_TITLE:
|
case PROP_TITLE:
|
||||||
g_value_set_string (value, priv->title);
|
g_value_set_string (value, button->priv->title);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_PATTERN_NAME:
|
case PROP_PATTERN_NAME:
|
||||||
g_value_set_string (value, priv->pattern_name);
|
g_value_set_string (value, button->priv->pattern_name);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||||
break;
|
break;
|
||||||
@ -419,25 +406,19 @@ gimp_pattern_select_button_callback (const gchar *pattern_name,
|
|||||||
gboolean dialog_closing,
|
gboolean dialog_closing,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GimpPatternSelectButton *button;
|
GimpPatternSelectButton *button = user_data;
|
||||||
GimpPatternSelectButtonPrivate *priv;
|
GimpSelectButton *select_button = GIMP_SELECT_BUTTON (button);
|
||||||
GimpSelectButton *select_button;
|
|
||||||
|
|
||||||
button = GIMP_PATTERN_SELECT_BUTTON (user_data);
|
g_free (button->priv->pattern_name);
|
||||||
|
g_free (button->priv->mask_data);
|
||||||
|
|
||||||
priv = GIMP_PATTERN_SELECT_BUTTON_GET_PRIVATE (button);
|
button->priv->pattern_name = g_strdup (pattern_name);
|
||||||
select_button = GIMP_SELECT_BUTTON (button);
|
button->priv->width = width;
|
||||||
|
button->priv->height = height;
|
||||||
|
button->priv->bytes = bytes;
|
||||||
|
button->priv->mask_data = g_memdup (mask_data, width * height * bytes);
|
||||||
|
|
||||||
g_free (priv->pattern_name);
|
gimp_pattern_select_preview_update (button->priv->preview,
|
||||||
g_free (priv->mask_data);
|
|
||||||
|
|
||||||
priv->pattern_name = g_strdup (pattern_name);
|
|
||||||
priv->width = width;
|
|
||||||
priv->height = height;
|
|
||||||
priv->bytes = bytes;
|
|
||||||
priv->mask_data = g_memdup (mask_data, width * height * bytes);
|
|
||||||
|
|
||||||
gimp_pattern_select_preview_update (priv->preview,
|
|
||||||
width, height, bytes, mask_data);
|
width, height, bytes, mask_data);
|
||||||
|
|
||||||
if (dialog_closing)
|
if (dialog_closing)
|
||||||
@ -451,22 +432,19 @@ gimp_pattern_select_button_callback (const gchar *pattern_name,
|
|||||||
static void
|
static void
|
||||||
gimp_pattern_select_button_clicked (GimpPatternSelectButton *button)
|
gimp_pattern_select_button_clicked (GimpPatternSelectButton *button)
|
||||||
{
|
{
|
||||||
GimpPatternSelectButtonPrivate *priv;
|
GimpSelectButton *select_button = GIMP_SELECT_BUTTON (button);
|
||||||
GimpSelectButton *select_button;
|
|
||||||
|
|
||||||
priv = GIMP_PATTERN_SELECT_BUTTON_GET_PRIVATE (button);
|
|
||||||
select_button = GIMP_SELECT_BUTTON (button);
|
|
||||||
|
|
||||||
if (select_button->temp_callback)
|
if (select_button->temp_callback)
|
||||||
{
|
{
|
||||||
/* calling gimp_patterns_set_popup() raises the dialog */
|
/* calling gimp_patterns_set_popup() raises the dialog */
|
||||||
gimp_patterns_set_popup (select_button->temp_callback,
|
gimp_patterns_set_popup (select_button->temp_callback,
|
||||||
priv->pattern_name);
|
button->priv->pattern_name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
select_button->temp_callback =
|
select_button->temp_callback =
|
||||||
gimp_pattern_select_new (priv->title, priv->pattern_name,
|
gimp_pattern_select_new (button->priv->title,
|
||||||
|
button->priv->pattern_name,
|
||||||
gimp_pattern_select_button_callback,
|
gimp_pattern_select_button_callback,
|
||||||
button, NULL);
|
button, NULL);
|
||||||
}
|
}
|
||||||
@ -475,16 +453,12 @@ gimp_pattern_select_button_clicked (GimpPatternSelectButton *button)
|
|||||||
static void
|
static void
|
||||||
gimp_pattern_select_preview_resize (GimpPatternSelectButton *button)
|
gimp_pattern_select_preview_resize (GimpPatternSelectButton *button)
|
||||||
{
|
{
|
||||||
GimpPatternSelectButtonPrivate *priv;
|
if (button->priv->width > 0 && button->priv->height > 0)
|
||||||
|
gimp_pattern_select_preview_update (button->priv->preview,
|
||||||
priv = GIMP_PATTERN_SELECT_BUTTON_GET_PRIVATE (button);
|
button->priv->width,
|
||||||
|
button->priv->height,
|
||||||
if (priv->width > 0 && priv->height > 0)
|
button->priv->bytes,
|
||||||
gimp_pattern_select_preview_update (priv->preview,
|
button->priv->mask_data);
|
||||||
priv->width,
|
|
||||||
priv->height,
|
|
||||||
priv->bytes,
|
|
||||||
priv->mask_data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@ -492,12 +466,9 @@ gimp_pattern_select_preview_events (GtkWidget *widget,
|
|||||||
GdkEvent *event,
|
GdkEvent *event,
|
||||||
GimpPatternSelectButton *button)
|
GimpPatternSelectButton *button)
|
||||||
{
|
{
|
||||||
GimpPatternSelectButtonPrivate *priv;
|
|
||||||
GdkEventButton *bevent;
|
GdkEventButton *bevent;
|
||||||
|
|
||||||
priv = GIMP_PATTERN_SELECT_BUTTON_GET_PRIVATE (button);
|
if (button->priv->mask_data)
|
||||||
|
|
||||||
if (priv->mask_data)
|
|
||||||
{
|
{
|
||||||
switch (event->type)
|
switch (event->type)
|
||||||
{
|
{
|
||||||
@ -561,7 +532,7 @@ gimp_pattern_select_button_open_popup (GimpPatternSelectButton *button,
|
|||||||
gint x,
|
gint x,
|
||||||
gint y)
|
gint y)
|
||||||
{
|
{
|
||||||
GimpPatternSelectButtonPrivate *priv;
|
GimpPatternSelectButtonPrivate *priv = button->priv;
|
||||||
GtkWidget *frame;
|
GtkWidget *frame;
|
||||||
GtkWidget *preview;
|
GtkWidget *preview;
|
||||||
GdkMonitor *monitor;
|
GdkMonitor *monitor;
|
||||||
@ -569,8 +540,6 @@ gimp_pattern_select_button_open_popup (GimpPatternSelectButton *button,
|
|||||||
gint x_org;
|
gint x_org;
|
||||||
gint y_org;
|
gint y_org;
|
||||||
|
|
||||||
priv = GIMP_PATTERN_SELECT_BUTTON_GET_PRIVATE (button);
|
|
||||||
|
|
||||||
if (priv->popup)
|
if (priv->popup)
|
||||||
gimp_pattern_select_button_close_popup (button);
|
gimp_pattern_select_button_close_popup (button);
|
||||||
|
|
||||||
@ -620,15 +589,7 @@ gimp_pattern_select_button_open_popup (GimpPatternSelectButton *button,
|
|||||||
static void
|
static void
|
||||||
gimp_pattern_select_button_close_popup (GimpPatternSelectButton *button)
|
gimp_pattern_select_button_close_popup (GimpPatternSelectButton *button)
|
||||||
{
|
{
|
||||||
GimpPatternSelectButtonPrivate *priv;
|
g_clear_pointer (&button->priv->popup, gtk_widget_destroy);
|
||||||
|
|
||||||
priv = GIMP_PATTERN_SELECT_BUTTON_GET_PRIVATE (button);
|
|
||||||
|
|
||||||
if (priv->popup)
|
|
||||||
{
|
|
||||||
gtk_widget_destroy (priv->popup);
|
|
||||||
priv->popup = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -673,12 +634,10 @@ gimp_pattern_select_drag_data_received (GimpPatternSelectButton *button,
|
|||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
gimp_pattern_select_button_create_inside (GimpPatternSelectButton *pattern_button)
|
gimp_pattern_select_button_create_inside (GimpPatternSelectButton *pattern_button)
|
||||||
{
|
{
|
||||||
|
GimpPatternSelectButtonPrivate *priv = pattern_button->priv;
|
||||||
GtkWidget *hbox;
|
GtkWidget *hbox;
|
||||||
GtkWidget *frame;
|
GtkWidget *frame;
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
GimpPatternSelectButtonPrivate *priv;
|
|
||||||
|
|
||||||
priv = GIMP_PATTERN_SELECT_BUTTON_GET_PRIVATE (pattern_button);
|
|
||||||
|
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||||
|
|
||||||
|
@ -40,11 +40,14 @@ G_BEGIN_DECLS
|
|||||||
#define GIMP_PATTERN_SELECT_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_PATTERN_SELECT_BUTTON, GimpPatternSelectButtonClass))
|
#define GIMP_PATTERN_SELECT_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_PATTERN_SELECT_BUTTON, GimpPatternSelectButtonClass))
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _GimpPatternSelectButtonPrivate GimpPatternSelectButtonPrivate;
|
||||||
typedef struct _GimpPatternSelectButtonClass GimpPatternSelectButtonClass;
|
typedef struct _GimpPatternSelectButtonClass GimpPatternSelectButtonClass;
|
||||||
|
|
||||||
struct _GimpPatternSelectButton
|
struct _GimpPatternSelectButton
|
||||||
{
|
{
|
||||||
GimpSelectButton parent_instance;
|
GimpSelectButton parent_instance;
|
||||||
|
|
||||||
|
GimpPatternSelectButtonPrivate *priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GimpPatternSelectButtonClass
|
struct _GimpPatternSelectButtonClass
|
||||||
@ -65,6 +68,10 @@ struct _GimpPatternSelectButtonClass
|
|||||||
void (*_gimp_reserved2) (void);
|
void (*_gimp_reserved2) (void);
|
||||||
void (*_gimp_reserved3) (void);
|
void (*_gimp_reserved3) (void);
|
||||||
void (*_gimp_reserved4) (void);
|
void (*_gimp_reserved4) (void);
|
||||||
|
void (*_gimp_reserved5) (void);
|
||||||
|
void (*_gimp_reserved6) (void);
|
||||||
|
void (*_gimp_reserved7) (void);
|
||||||
|
void (*_gimp_reserved8) (void);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user