Commit ba647d5e authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

plug-ins/FractalExplorer/Dialogs.c plug-ins/common/film.c adapt to libgimp

2003-06-19  Sven Neumann  <sven@gimp.org>

	* plug-ins/FractalExplorer/Dialogs.c
	* plug-ins/common/film.c
	* plug-ins/script-fu/script-fu-scripts.c: adapt to libgimp API
	changes.
parent 9768e4be
2003-06-19 Sven Neumann <sven@gimp.org>
* plug-ins/FractalExplorer/Dialogs.c
* plug-ins/common/film.c
* plug-ins/script-fu/script-fu-scripts.c: adapt to libgimp API
changes.
2003-06-19 Hans Breuer <hans@breuer.org> 2003-06-19 Hans Breuer <hans@breuer.org>
   
* makefile.msc : replace the win9x specific cd .... * makefile.msc : replace the win9x specific cd ....
...@@ -207,10 +207,12 @@ explorer_number_of_colors_callback (GtkAdjustment *adjustment, ...@@ -207,10 +207,12 @@ explorer_number_of_colors_callback (GtkAdjustment *adjustment,
g_free (gradient_samples); g_free (gradient_samples);
if (gradient_name == NULL) if (! gradient_name)
gradient_name = gimp_gradients_get_gradient (); gradient_name = gimp_gradients_get_gradient ();
gimp_gradients_get_gradient_data (gradient_name, wvals.ncolors, &dummy, gimp_gradients_get_gradient_data (gradient_name,
wvals.ncolors,
&dummy,
&gradient_samples); &gradient_samples);
set_cmap_preview (); set_cmap_preview ();
...@@ -218,11 +220,11 @@ explorer_number_of_colors_callback (GtkAdjustment *adjustment, ...@@ -218,11 +220,11 @@ explorer_number_of_colors_callback (GtkAdjustment *adjustment,
} }
static void static void
explorer_gradient_select_callback (gchar *name, explorer_gradient_select_callback (const gchar *name,
gint width, gint width,
gdouble *gradient_data, const gdouble *gradient_data,
gint dialog_closing, gboolean dialog_closing,
gpointer data) gpointer data)
{ {
gint dummy; gint dummy;
...@@ -231,7 +233,9 @@ explorer_gradient_select_callback (gchar *name, ...@@ -231,7 +233,9 @@ explorer_gradient_select_callback (gchar *name,
gradient_name = g_strdup (name); gradient_name = g_strdup (name);
gimp_gradients_get_gradient_data (gradient_name, wvals.ncolors, &dummy, gimp_gradients_get_gradient_data (gradient_name,
wvals.ncolors,
&dummy,
&gradient_samples); &gradient_samples);
if (wvals.colormode == 1) if (wvals.colormode == 1)
......
...@@ -81,7 +81,7 @@ typedef struct ...@@ -81,7 +81,7 @@ typedef struct
GtkObject *advanced_adj[7]; GtkObject *advanced_adj[7];
GtkTreeModel *image_list_all; GtkTreeModel *image_list_all;
GtkTreeModel *image_list_film; GtkTreeModel *image_list_film;
gint run; gboolean run;
} FilmInterface; } FilmInterface;
...@@ -151,19 +151,19 @@ static void add_list_item_callback (GtkWidget *widget, ...@@ -151,19 +151,19 @@ static void add_list_item_callback (GtkWidget *widget,
static void del_list_item_callback (GtkWidget *widget, static void del_list_item_callback (GtkWidget *widget,
GtkTreeSelection *sel); GtkTreeSelection *sel);
static GtkTreeModel * add_image_list (gboolean add_box_flag, static GtkTreeModel * add_image_list (gboolean add_box_flag,
gint n, gint n,
gint32 *image_id, gint32 *image_id,
GtkWidget *hbox); GtkWidget *hbox);
static gint film_dialog (gint32 image_ID); static gboolean film_dialog (gint32 image_ID);
static void film_ok_callback (GtkWidget *widget, static void film_ok_callback (GtkWidget *widget,
gpointer data); gpointer data);
static void film_reset_callback (GtkWidget *widget, static void film_reset_callback (GtkWidget *widget,
gpointer data); gpointer data);
static void film_font_select_callback (gchar *name, static void film_font_select_callback (const gchar *name,
gboolean closing, gboolean closing,
gpointer data); gpointer data);
GimpPlugInInfo PLUG_IN_INFO = GimpPlugInInfo PLUG_IN_INFO =
...@@ -1476,7 +1476,7 @@ create_advanced_tab (GtkWidget *notebook) ...@@ -1476,7 +1476,7 @@ create_advanced_tab (GtkWidget *notebook)
NULL); NULL);
} }
static gint static gboolean
film_dialog (gint32 image_ID) film_dialog (gint32 image_ID)
{ {
GtkWidget *dlg; GtkWidget *dlg;
...@@ -1518,7 +1518,6 @@ film_dialog (gint32 image_ID) ...@@ -1518,7 +1518,6 @@ film_dialog (gint32 image_ID)
gtk_widget_show (dlg); gtk_widget_show (dlg);
gtk_main (); gtk_main ();
gdk_flush ();
return filmint.run; return filmint.run;
} }
...@@ -1565,9 +1564,9 @@ film_reset_callback (GtkWidget *widget, ...@@ -1565,9 +1564,9 @@ film_reset_callback (GtkWidget *widget,
} }
static void static void
film_font_select_callback (gchar *name, film_font_select_callback (const gchar *name,
gboolean closing, gboolean closing,
gpointer data) gpointer data)
{ {
FilmVals *vals = (FilmVals *) data; FilmVals *vals = (FilmVals *) data;
......
...@@ -54,11 +54,11 @@ ...@@ -54,11 +54,11 @@
typedef struct typedef struct
{ {
GtkAdjustment *adj; GtkAdjustment *adj;
gfloat value; gdouble value;
gfloat lower; gdouble lower;
gfloat upper; gdouble upper;
gfloat step; gdouble step;
gfloat page; gdouble page;
gint digits; gint digits;
SFAdjustmentType type; SFAdjustmentType type;
} SFAdjustment; } SFAdjustment;
...@@ -71,10 +71,10 @@ typedef struct ...@@ -71,10 +71,10 @@ typedef struct
typedef struct typedef struct
{ {
gchar *name; gchar *name;
gdouble opacity; gdouble opacity;
gint spacing; gint spacing;
gint paint_mode; GimpLayerModeEffects paint_mode;
} SFBrush; } SFBrush;
typedef struct typedef struct
...@@ -172,30 +172,30 @@ static void script_fu_menu_callback (gint32 id, ...@@ -172,30 +172,30 @@ static void script_fu_menu_callback (gint32 id,
static void script_fu_file_selection_callback (GtkWidget *widget, static void script_fu_file_selection_callback (GtkWidget *widget,
gpointer data); gpointer data);
static void script_fu_pattern_preview (gchar *name, static void script_fu_pattern_preview (const gchar *name,
gint width, gint width,
gint height, gint height,
gint bytes, gint bytes,
gchar *mask_data, const guchar *mask_data,
gboolean closing, gboolean closing,
gpointer data); gpointer data);
static void script_fu_gradient_preview (gchar *name, static void script_fu_gradient_preview (const gchar *name,
gint width, gint width,
gdouble *mask_data, const gdouble *mask_data,
gboolean closing, gboolean closing,
gpointer data); gpointer data);
static void script_fu_font_preview (gchar *name, static void script_fu_font_preview (const gchar *name,
gboolean closing, gboolean closing,
gpointer data); gpointer data);
static void script_fu_brush_preview (gchar *name, static void script_fu_brush_preview (const gchar *name,
gdouble opacity, gdouble opacity,
gint spacing, gint spacing,
gint paint_mode, GimpLayerModeEffects paint_mode,
gint width, gint width,
gint height, gint height,
gchar *mask_data, const guchar *mask_data,
gboolean closing, gboolean closing,
gpointer data); gpointer data);
/* /*
...@@ -1184,12 +1184,14 @@ script_fu_interface (SFScript *script) ...@@ -1184,12 +1184,14 @@ script_fu_interface (SFScript *script)
for (i = start_args; i < script->num_args; i++) for (i = start_args; i < script->num_args; i++)
{ {
/* we add a colon after the label; gchar *label_text;
some languages want an extra space here */ gfloat label_yalign = 0.5;
gchar *label_text = gboolean widget_leftalign = TRUE;
g_strdup_printf (_("%s:"), gettext (script->arg_labels[i]));
gfloat label_yalign = 0.5; /* we add a colon after the label;
gboolean widget_leftalign = TRUE; some languages want an extra space here */
label_text = g_strdup_printf (_("%s:"),
gettext (script->arg_labels[i]));
switch (script->arg_types[i]) switch (script->arg_types[i])
{ {
...@@ -1476,13 +1478,13 @@ script_fu_interface_quit (SFScript *script) ...@@ -1476,13 +1478,13 @@ script_fu_interface_quit (SFScript *script)
} }
static void static void
script_fu_pattern_preview (gchar *name, script_fu_pattern_preview (const gchar *name,
gint width, gint width,
gint height, gint height,
gint bytes, gint bytes,
gchar *mask_data, const guchar *mask_data,
gboolean closing, gboolean closing,
gpointer data) gpointer data)
{ {
gchar **pname; gchar **pname;
...@@ -1493,11 +1495,11 @@ script_fu_pattern_preview (gchar *name, ...@@ -1493,11 +1495,11 @@ script_fu_pattern_preview (gchar *name,
} }
static void static void
script_fu_gradient_preview (gchar *name, script_fu_gradient_preview (const gchar *name,
gint width, gint width,
gdouble *mask_data, const gdouble *mask_data,
gboolean closing, gboolean closing,
gpointer data) gpointer data)
{ {
gchar **gname; gchar **gname;
...@@ -1508,9 +1510,9 @@ script_fu_gradient_preview (gchar *name, ...@@ -1508,9 +1510,9 @@ script_fu_gradient_preview (gchar *name,
} }
static void static void
script_fu_font_preview (gchar *name, script_fu_font_preview (const gchar *name,
gboolean closing, gboolean closing,
gpointer data) gpointer data)
{ {
gchar **fname; gchar **fname;
...@@ -1521,15 +1523,15 @@ script_fu_font_preview (gchar *name, ...@@ -1521,15 +1523,15 @@ script_fu_font_preview (gchar *name,
} }
static void static void
script_fu_brush_preview (gchar *name, script_fu_brush_preview (const gchar *name,
gdouble opacity, gdouble opacity,
gint spacing, gint spacing,
gint paint_mode, GimpLayerModeEffects paint_mode,
gint width, gint width,
gint height, gint height,
gchar *mask_data, const guchar *mask_data,
gboolean closing, gboolean closing,
gpointer data) gpointer data)
{ {
SFBrush *brush; SFBrush *brush;
......
...@@ -54,11 +54,11 @@ ...@@ -54,11 +54,11 @@
typedef struct typedef struct
{ {
GtkAdjustment *adj; GtkAdjustment *adj;
gfloat value; gdouble value;
gfloat lower; gdouble lower;
gfloat upper; gdouble upper;
gfloat step; gdouble step;
gfloat page; gdouble page;
gint digits; gint digits;
SFAdjustmentType type; SFAdjustmentType type;
} SFAdjustment; } SFAdjustment;
...@@ -71,10 +71,10 @@ typedef struct ...@@ -71,10 +71,10 @@ typedef struct
typedef struct typedef struct
{ {
gchar *name; gchar *name;
gdouble opacity; gdouble opacity;
gint spacing; gint spacing;
gint paint_mode; GimpLayerModeEffects paint_mode;
} SFBrush; } SFBrush;
typedef struct typedef struct
...@@ -172,30 +172,30 @@ static void script_fu_menu_callback (gint32 id, ...@@ -172,30 +172,30 @@ static void script_fu_menu_callback (gint32 id,
static void script_fu_file_selection_callback (GtkWidget *widget, static void script_fu_file_selection_callback (GtkWidget *widget,
gpointer data); gpointer data);
static void script_fu_pattern_preview (gchar *name, static void script_fu_pattern_preview (const gchar *name,
gint width, gint width,
gint height, gint height,
gint bytes, gint bytes,
gchar *mask_data, const guchar *mask_data,
gboolean closing, gboolean closing,
gpointer data); gpointer data);
static void script_fu_gradient_preview (gchar *name, static void script_fu_gradient_preview (const gchar *name,
gint width, gint width,
gdouble *mask_data, const gdouble *mask_data,
gboolean closing, gboolean closing,
gpointer data); gpointer data);
static void script_fu_font_preview (gchar *name, static void script_fu_font_preview (const gchar *name,
gboolean closing, gboolean closing,
gpointer data); gpointer data);
static void script_fu_brush_preview (gchar *name, static void script_fu_brush_preview (const gchar *name,
gdouble opacity, gdouble opacity,
gint spacing, gint spacing,
gint paint_mode, GimpLayerModeEffects paint_mode,
gint width, gint width,
gint height, gint height,
gchar *mask_data, const guchar *mask_data,
gboolean closing, gboolean closing,
gpointer data); gpointer data);
/* /*
...@@ -1184,12 +1184,14 @@ script_fu_interface (SFScript *script) ...@@ -1184,12 +1184,14 @@ script_fu_interface (SFScript *script)
for (i = start_args; i < script->num_args; i++) for (i = start_args; i < script->num_args; i++)
{ {
/* we add a colon after the label; gchar *label_text;
some languages want an extra space here */ gfloat label_yalign = 0.5;
gchar *label_text = gboolean widget_leftalign = TRUE;
g_strdup_printf (_("%s:"), gettext (script->arg_labels[i]));
gfloat label_yalign = 0.5; /* we add a colon after the label;
gboolean widget_leftalign = TRUE; some languages want an extra space here */
label_text = g_strdup_printf (_("%s:"),
gettext (script->arg_labels[i]));
switch (script->arg_types[i]) switch (script->arg_types[i])
{ {
...@@ -1476,13 +1478,13 @@ script_fu_interface_quit (SFScript *script) ...@@ -1476,13 +1478,13 @@ script_fu_interface_quit (SFScript *script)
} }
static void static void
script_fu_pattern_preview (gchar *name, script_fu_pattern_preview (const gchar *name,
gint width, gint width,
gint height, gint height,
gint bytes, gint bytes,
gchar *mask_data, const guchar *mask_data,
gboolean closing, gboolean closing,
gpointer data) gpointer data)
{ {
gchar **pname; gchar **pname;
...@@ -1493,11 +1495,11 @@ script_fu_pattern_preview (gchar *name, ...@@ -1493,11 +1495,11 @@ script_fu_pattern_preview (gchar *name,
} }
static void static void
script_fu_gradient_preview (gchar *name, script_fu_gradient_preview (const gchar *name,
gint width, gint width,
gdouble *mask_data, const gdouble *mask_data,
gboolean closing, gboolean closing,
gpointer data) gpointer data)
{ {
gchar **gname; gchar **gname;
...@@ -1508,9 +1510,9 @@ script_fu_gradient_preview (gchar *name, ...@@ -1508,9 +1510,9 @@ script_fu_gradient_preview (gchar *name,
} }
static void static void
script_fu_font_preview (gchar *name, script_fu_font_preview (const gchar *name,
gboolean closing, gboolean closing,
gpointer data) gpointer data)
{ {
gchar **fname; gchar **fname;
...@@ -1521,15 +1523,15 @@ script_fu_font_preview (gchar *name, ...@@ -1521,15 +1523,15 @@ script_fu_font_preview (gchar *name,
} }
static void static void
script_fu_brush_preview (gchar *name, script_fu_brush_preview (const gchar *name,
gdouble opacity, gdouble opacity,
gint spacing, gint spacing,
gint paint_mode, GimpLayerModeEffects paint_mode,
gint width, gint width,
gint height, gint height,
gchar *mask_data, const guchar *mask_data,
gboolean closing, gboolean closing,
gpointer data) gpointer data)
{ {
SFBrush *brush; SFBrush *brush;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment