fixed a bug that was introduced by the latest portability changes

Tue Jul 27 22:47:33 MEST 1999  Sven Neumann <sven@gimp.org>

        * plug-ins/script-fu/script-fu-scripts.c: fixed a bug that was
        introduced by the latest portability changes
This commit is contained in:
MEST 1999 Sven Neumann
1999-07-27 20:49:55 +00:00
committed by Sven Neumann
parent 5d06b76d4b
commit 0a2a24c1e5
3 changed files with 123 additions and 110 deletions

View File

@ -1,3 +1,8 @@
Tue Jul 27 22:47:33 MEST 1999 Sven Neumann <sven@gimp.org>
* plug-ins/script-fu/script-fu-scripts.c: fixed a bug that was
introduced by the latest portability changes
Tue Jul 27 01:21:02 1999 Jay Cox (jaycox@earthlink.net)
* app/clone.c: more cursor support.

View File

@ -220,13 +220,13 @@ static void script_fu_pattern_preview (gchar *name,
gint width,
gint height,
gint bytes,
gchar * mask_data,
gchar *mask_data,
gint closing,
gpointer udata);
static void script_fu_gradient_preview (gchar *name,
gint width,
gdouble * mask_data,
gdouble *mask_data,
gint closing,
gpointer udata);
@ -1439,7 +1439,7 @@ script_fu_pattern_preview (gchar *name,
gint width,
gint height,
gint bytes,
gchar * mask_data,
gchar *mask_data,
gint closing,
gpointer udata)
{
@ -1451,7 +1451,7 @@ script_fu_pattern_preview (gchar *name,
static void
script_fu_gradient_preview(gchar *name,
gint width,
gdouble * mask_data,
gdouble *mask_data,
gint closing,
gpointer udata)
{
@ -1461,15 +1461,15 @@ script_fu_gradient_preview(gchar *name,
}
static void
script_fu_brush_preview(char * name, /* Name */
script_fu_brush_preview(char *name, /* Name */
gdouble opacity, /* opacity */
gint spacing, /* spacing */
gint paint_mode, /* paint_mode */
gint width, /* width */
gint height, /* height */
gchar * mask_data, /* mask data */
gchar *mask_data, /* mask data */
gint closing, /* dialog closing */
gpointer udata/* user data */)
gpointer udata) /* user data */
{
SFBrush *brush = (SFBrush *)udata;
g_free(brush->name);
@ -1675,7 +1675,7 @@ script_fu_ok_callback (GtkWidget *widget,
case SF_STRING:
text = gtk_entry_get_text (GTK_ENTRY (script->args_widgets[i]));
g_free (script->arg_values[i].sfa_value);
script->arg_values[i].sfa_value = text;
script->arg_values[i].sfa_value = g_strdup (text);
escaped = g_strescape (text);
g_snprintf (buffer, MAX_STRING_LENGTH, "\"%s\"", escaped);
g_free (escaped);
@ -1690,8 +1690,10 @@ script_fu_ok_callback (GtkWidget *widget,
text = buffer;
break;
case SF_SPINNER:
script->arg_values[i].sfa_adjustment.value = gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON (script->args_widgets[i]));
g_snprintf (buffer, 24, "%f", script->arg_values[i].sfa_adjustment.value); text = buffer;
script->arg_values[i].sfa_adjustment.value =
gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON (script->args_widgets[i]));
g_snprintf (buffer, 24, "%f", script->arg_values[i].sfa_adjustment.value);
text = buffer;
break;
default:
break;
@ -2192,3 +2194,5 @@ script_fu_about_dialog_delete (GtkWidget *widget,
script_fu_about_dialog_close (widget, data);
return TRUE;
}

View File

@ -220,13 +220,13 @@ static void script_fu_pattern_preview (gchar *name,
gint width,
gint height,
gint bytes,
gchar * mask_data,
gchar *mask_data,
gint closing,
gpointer udata);
static void script_fu_gradient_preview (gchar *name,
gint width,
gdouble * mask_data,
gdouble *mask_data,
gint closing,
gpointer udata);
@ -1439,7 +1439,7 @@ script_fu_pattern_preview (gchar *name,
gint width,
gint height,
gint bytes,
gchar * mask_data,
gchar *mask_data,
gint closing,
gpointer udata)
{
@ -1451,7 +1451,7 @@ script_fu_pattern_preview (gchar *name,
static void
script_fu_gradient_preview(gchar *name,
gint width,
gdouble * mask_data,
gdouble *mask_data,
gint closing,
gpointer udata)
{
@ -1461,15 +1461,15 @@ script_fu_gradient_preview(gchar *name,
}
static void
script_fu_brush_preview(char * name, /* Name */
script_fu_brush_preview(char *name, /* Name */
gdouble opacity, /* opacity */
gint spacing, /* spacing */
gint paint_mode, /* paint_mode */
gint width, /* width */
gint height, /* height */
gchar * mask_data, /* mask data */
gchar *mask_data, /* mask data */
gint closing, /* dialog closing */
gpointer udata/* user data */)
gpointer udata) /* user data */
{
SFBrush *brush = (SFBrush *)udata;
g_free(brush->name);
@ -1675,7 +1675,7 @@ script_fu_ok_callback (GtkWidget *widget,
case SF_STRING:
text = gtk_entry_get_text (GTK_ENTRY (script->args_widgets[i]));
g_free (script->arg_values[i].sfa_value);
script->arg_values[i].sfa_value = text;
script->arg_values[i].sfa_value = g_strdup (text);
escaped = g_strescape (text);
g_snprintf (buffer, MAX_STRING_LENGTH, "\"%s\"", escaped);
g_free (escaped);
@ -1690,8 +1690,10 @@ script_fu_ok_callback (GtkWidget *widget,
text = buffer;
break;
case SF_SPINNER:
script->arg_values[i].sfa_adjustment.value = gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON (script->args_widgets[i]));
g_snprintf (buffer, 24, "%f", script->arg_values[i].sfa_adjustment.value); text = buffer;
script->arg_values[i].sfa_adjustment.value =
gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON (script->args_widgets[i]));
g_snprintf (buffer, 24, "%f", script->arg_values[i].sfa_adjustment.value);
text = buffer;
break;
default:
break;
@ -2192,3 +2194,5 @@ script_fu_about_dialog_delete (GtkWidget *widget,
script_fu_about_dialog_close (widget, data);
return TRUE;
}