diff --git a/ChangeLog b/ChangeLog index 39b5e8ee80..ff1a6704d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2001-10-28 Sven Neumann + + * configure.in: require GLib-1.3.10, GTK+-1.3.10 and Pango-0.21 + + * RELEASE-TO-CVS.patch + * libgimpbase/gimpparasiteio.c + * libgimpwidgets/gimpstock.c + * plug-ins/ifscompose/ifscompose_storage.c: applied the patch and + emptied the patch file. + + * libgimp/gimpgradientmenu.c: corrected order of parameters in call + to gimp_gradients_get_gradient_data(). + + * tools/pdbgen/pdb/palette.pdb: I think this is how Nathan wanted it + to be. + + * app/pdb/palette_cmds.c + * libgimp/gimppalette_pdb.[ch]: regenerated. + 2001-10-27 Nathan Summers * gimppalette_pdb.c: the autogenerated code for diff --git a/RELEASE-TO-CVS.patch b/RELEASE-TO-CVS.patch index 4915c72956..e69de29bb2 100644 --- a/RELEASE-TO-CVS.patch +++ b/RELEASE-TO-CVS.patch @@ -1,154 +0,0 @@ -Index: libgimpbase/gimpparasiteio.c -=================================================================== -RCS file: /cvs/gnome/gimp/libgimpbase/gimpparasiteio.c,v -retrieving revision 1.9 -diff -u -r1.9 gimpparasiteio.c ---- libgimpbase/gimpparasiteio.c 2001/08/01 00:35:48 1.9 -+++ libgimpbase/gimpparasiteio.c 2001/10/13 12:48:21 -@@ -161,8 +161,8 @@ - - for (i = 0; i < params->dim; i++) - { -- g_string_printfa (s, " rank%d:%d", i, params->rank[i]); -- g_string_printfa (s, " sel%d:%s", i, params->selection[i]); -+ g_string_append_printf (s, " rank%d:%d", i, params->rank[i]); -+ g_string_append_printf (s, " sel%d:%s", i, params->selection[i]); - } - - str = s->str; -Index: libgimpwidgets/gimpstock.c -=================================================================== -RCS file: /cvs/gnome/gimp/libgimpwidgets/gimpstock.c,v -retrieving revision 1.3 -diff -u -r1.3 gimpstock.c ---- libgimpwidgets/gimpstock.c 2001/08/05 16:07:01 1.3 -+++ libgimpwidgets/gimpstock.c 2001/10/13 12:48:21 -@@ -48,7 +48,7 @@ - gtk_icon_source_set_size (source, size); - gtk_icon_source_set_size_wildcarded (source, FALSE); - -- pixbuf = gdk_pixbuf_new_from_stream (-1, inline_data, FALSE, NULL); -+ pixbuf = gdk_pixbuf_new_from_inline (-1, inline_data, FALSE, NULL); - - g_assert (pixbuf); - -Index: plug-ins/ifscompose/ifscompose_storage.c -=================================================================== -RCS file: /cvs/gnome/gimp/plug-ins/ifscompose/ifscompose_storage.c,v -retrieving revision 1.8 -diff -u -r1.8 ifscompose_storage.c ---- plug-ins/ifscompose/ifscompose_storage.c 2001/08/01 00:35:57 1.8 -+++ plug-ins/ifscompose/ifscompose_storage.c 2001/10/13 12:48:21 -@@ -27,6 +27,7 @@ - - #include "ifscompose.h" - -+ - enum { - TOKEN_INVALID = G_TOKEN_LAST, - TOKEN_ITERATIONS, -@@ -422,8 +423,9 @@ - scanner->input_name = "IfsCompose Saved Data"; - - for (i = 0; i < nsymbols; i++) -- g_scanner_add_symbol (scanner, -- symbols[i].name, GINT_TO_POINTER (symbols[i].token)); -+ g_scanner_scope_add_symbol (scanner, 0, -+ symbols[i].name, -+ GINT_TO_POINTER (symbols[i].token)); - - g_scanner_input_text (scanner, str, strlen (str)); - -@@ -450,51 +452,51 @@ - gint i; - GString *result = g_string_new (NULL); - -- g_string_printfa (result, "iterations %d\n", vals->iterations); -- g_string_printfa (result, "max_memory %d\n", vals->max_memory); -- g_string_printfa (result, "subdivide %d\n", vals->subdivide); -- g_string_printfa (result, "radius %f\n", vals->radius); -- g_string_printfa (result, "aspect_ratio %f\n", vals->aspect_ratio); -- g_string_printfa (result, "center_x %f\n", vals->center_x); -- g_string_printfa (result, "center_y %f\n", vals->center_y); -+ g_string_append_printf (result, "iterations %d\n", vals->iterations); -+ g_string_append_printf (result, "max_memory %d\n", vals->max_memory); -+ g_string_append_printf (result, "subdivide %d\n", vals->subdivide); -+ g_string_append_printf (result, "radius %f\n", vals->radius); -+ g_string_append_printf (result, "aspect_ratio %f\n", vals->aspect_ratio); -+ g_string_append_printf (result, "center_x %f\n", vals->center_x); -+ g_string_append_printf (result, "center_y %f\n", vals->center_y); - - for (i=0; inum_elements; i++) - { - g_string_append (result, "element {\n"); -- g_string_printfa (result, " x %f\n", elements[i]->v.x); -- g_string_printfa (result, " y %f\n", elements[i]->v.y); -- g_string_printfa (result, " theta %f\n", elements[i]->v.theta); -- g_string_printfa (result, " scale %f\n", elements[i]->v.scale); -- g_string_printfa (result, " asym %f\n", elements[i]->v.asym); -- g_string_printfa (result, " shear %f\n", elements[i]->v.shear); -- g_string_printfa (result, " flip %d\n", elements[i]->v.flip); -- g_string_printfa (result, " red_color { %f,%f,%f }\n", -- elements[i]->v.red_color.r, -- elements[i]->v.red_color.g, -- elements[i]->v.red_color.b); -- g_string_printfa (result, " green_color { %f,%f,%f }\n", -- elements[i]->v.green_color.r, -- elements[i]->v.green_color.g, -- elements[i]->v.green_color.b); -- g_string_printfa (result, " blue_color { %f,%f,%f }\n", -- elements[i]->v.blue_color.r, -- elements[i]->v.blue_color.g, -- elements[i]->v.blue_color.b); -- g_string_printfa (result, " black_color { %f,%f,%f }\n", -- elements[i]->v.black_color.r, -- elements[i]->v.black_color.g, -- elements[i]->v.black_color.b); -- g_string_printfa (result, " target_color { %f,%f,%f }\n", -- elements[i]->v.target_color.r, -- elements[i]->v.target_color.g, -- elements[i]->v.target_color.b); -- g_string_printfa (result, " hue_scale %f\n", -- elements[i]->v.hue_scale); -- g_string_printfa (result, " value_scale %f\n", -- elements[i]->v.value_scale); -- g_string_printfa (result, " simple_color %d\n", -- elements[i]->v.simple_color); -- g_string_printfa (result, " prob %f\n", elements[i]->v.prob); -+ g_string_append_printf (result, " x %f\n", elements[i]->v.x); -+ g_string_append_printf (result, " y %f\n", elements[i]->v.y); -+ g_string_append_printf (result, " theta %f\n", elements[i]->v.theta); -+ g_string_append_printf (result, " scale %f\n", elements[i]->v.scale); -+ g_string_append_printf (result, " asym %f\n", elements[i]->v.asym); -+ g_string_append_printf (result, " shear %f\n", elements[i]->v.shear); -+ g_string_append_printf (result, " flip %d\n", elements[i]->v.flip); -+ g_string_append_printf (result, " red_color { %f,%f,%f }\n", -+ elements[i]->v.red_color.r, -+ elements[i]->v.red_color.g, -+ elements[i]->v.red_color.b); -+ g_string_append_printf (result, " green_color { %f,%f,%f }\n", -+ elements[i]->v.green_color.r, -+ elements[i]->v.green_color.g, -+ elements[i]->v.green_color.b); -+ g_string_append_printf (result, " blue_color { %f,%f,%f }\n", -+ elements[i]->v.blue_color.r, -+ elements[i]->v.blue_color.g, -+ elements[i]->v.blue_color.b); -+ g_string_append_printf (result, " black_color { %f,%f,%f }\n", -+ elements[i]->v.black_color.r, -+ elements[i]->v.black_color.g, -+ elements[i]->v.black_color.b); -+ g_string_append_printf (result, " target_color { %f,%f,%f }\n", -+ elements[i]->v.target_color.r, -+ elements[i]->v.target_color.g, -+ elements[i]->v.target_color.b); -+ g_string_append_printf (result, " hue_scale %f\n", -+ elements[i]->v.hue_scale); -+ g_string_append_printf (result, " value_scale %f\n", -+ elements[i]->v.value_scale); -+ g_string_append_printf (result, " simple_color %d\n", -+ elements[i]->v.simple_color); -+ g_string_append_printf (result, " prob %f\n", elements[i]->v.prob); - g_string_append (result, "}\n"); - } - diff --git a/app/pdb/palette_cmds.c b/app/pdb/palette_cmds.c index 279bb7c8c7..0b539d212a 100644 --- a/app/pdb/palette_cmds.c +++ b/app/pdb/palette_cmds.c @@ -492,13 +492,14 @@ palette_get_entry_invoker (Gimp *gimp, palette = gimp_context_get_palette (gimp_get_current_context(gimp)); - if (entry >= palette->n_colors) { - success = FALSE; - } + if (entry < 0 || entry >= palette->n_colors) + { + success = FALSE; + } else - { - color=*(GimpRGB *) g_list_nth(palette->colors, entry)->data; - } + { + color=*(GimpRGB *) g_list_nth(palette->colors, entry)->data; + } return_args = procedural_db_return_args (&palette_get_entry_proc, success); @@ -529,8 +530,8 @@ static ProcArg palette_get_entry_outargs[] = static ProcRecord palette_get_entry_proc = { "gimp_palette_get_entry", - "Gets the specified palette entry from the currently active pallette.", - "This procedure returns the color of the zero-based entry specifed for the current palette. It returns an error if the entry does not exist.", + "Gets the specified palette entry from the currently active palette.", + "This procedure retrieves the color of the zero-based entry specifed for the current palette. It returns an error if the entry does not exist.", "Nathan Summers ", "Nathan Summers", "2001", diff --git a/configure.in b/configure.in index 55f5593a8d..2173490c65 100644 --- a/configure.in +++ b/configure.in @@ -120,7 +120,7 @@ if ! pkg-config --atleast-pkgconfig-version 0.7 ; then fi dnl Check for GTK+ -AM_PATH_GTK_2_0(1.3.9,, +AM_PATH_GTK_2_0(1.3.10,, AC_MSG_ERROR(Test for GTK failed. See the file 'INSTALL' for help.)) changequote(,)dnl @@ -146,7 +146,7 @@ changequote([,])dnl dnl dnl Check for PangoFT2 dnl -PANGOFT2_REQUIRED_VERSION=0.20 +PANGOFT2_REQUIRED_VERSION=0.21 AC_MSG_CHECKING([for Freetype 2.0 font support for Pango]) if $PKG_CONFIG --atleast-version $PANGOFT2_REQUIRED_VERSION pangoft2; then diff --git a/libgimp/gimpgradientmenu.c b/libgimp/gimpgradientmenu.c index b5efc24919..fa66d0978e 100644 --- a/libgimp/gimpgradientmenu.c +++ b/libgimp/gimpgradientmenu.c @@ -221,7 +221,7 @@ gimp_gradient_select_widget (gchar *dname, /* Do initial gradient setup */ gradient_name = gimp_gradients_get_gradient_data (igradient, - &width, CELL_SIZE_WIDTH, + CELL_SIZE_WIDTH, &width, &grad_data); if (gradient_name) @@ -273,7 +273,7 @@ gimp_gradient_select_widget_set_popup (GtkWidget *widget, { gradient_name = gimp_gradients_get_gradient_data (gname, - &width, gsel->sample_size, + gsel->sample_size, &width, &grad_data); if (gradient_name) diff --git a/libgimp/gimppalette_pdb.c b/libgimp/gimppalette_pdb.c index 8cd2c206ae..d89db9b9a0 100644 --- a/libgimp/gimppalette_pdb.c +++ b/libgimp/gimppalette_pdb.c @@ -347,35 +347,35 @@ gimp_palette_set_palette (gchar *name) /** * gimp_palette_get_entry: * @entry_num: The entry to retrieve. + * @color: The color requested. * - * Gets the specified palette entry from the currently active pallette. + * Gets the specified palette entry from the currently active palette. * - * This procedure returns the color of the zero-based entry specifed + * This procedure retrieves the color of the zero-based entry specifed * for the current palette. It returns an error if the entry does not * exist. * - * Returns: The color requested. + * Returns: TRUE on success. */ -GimpRGB * -gimp_palette_get_entry (gint entry_num) +gboolean +gimp_palette_get_entry (gint entry_num, + GimpRGB *color) { GimpParam *return_vals; gint nreturn_vals; - GimpRGB *color = 0; + gboolean success = TRUE; return_vals = gimp_run_procedure ("gimp_palette_get_entry", &nreturn_vals, GIMP_PDB_INT32, entry_num, GIMP_PDB_END); - if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) - { - color = g_new(GimpRGB, 1); - + success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS; + + if (success) *color = return_vals[1].data.d_color; - } gimp_destroy_params (return_vals, nreturn_vals); - return color; + return success; } diff --git a/libgimp/gimppalette_pdb.h b/libgimp/gimppalette_pdb.h index 01619c61bc..824dcaa3b1 100644 --- a/libgimp/gimppalette_pdb.h +++ b/libgimp/gimppalette_pdb.h @@ -41,7 +41,8 @@ gboolean gimp_palette_refresh (void); gchar** gimp_palette_list (gint *num_palettes); gchar* gimp_palette_get_palette (gint *num_colors); gboolean gimp_palette_set_palette (gchar *name); -GimpRGB* gimp_palette_get_entry (gint entry_num); +gboolean gimp_palette_get_entry (gint entry_num, + GimpRGB *color); #ifdef __cplusplus diff --git a/libgimpbase/gimpparasiteio.c b/libgimpbase/gimpparasiteio.c index 7b53bf5fb7..cbbb57c48e 100644 --- a/libgimpbase/gimpparasiteio.c +++ b/libgimpbase/gimpparasiteio.c @@ -161,8 +161,8 @@ gimp_pixpipe_params_build (GimpPixPipeParams *params) for (i = 0; i < params->dim; i++) { - g_string_printfa (s, " rank%d:%d", i, params->rank[i]); - g_string_printfa (s, " sel%d:%s", i, params->selection[i]); + g_string_append_printf (s, " rank%d:%d", i, params->rank[i]); + g_string_append_printf (s, " sel%d:%s", i, params->selection[i]); } str = s->str; diff --git a/libgimpwidgets/gimpstock.c b/libgimpwidgets/gimpstock.c index 823b52c5a6..81b0425c85 100644 --- a/libgimpwidgets/gimpstock.c +++ b/libgimpwidgets/gimpstock.c @@ -48,7 +48,7 @@ sized_with_same_fallback_icon_set_from_inline (const guchar *inline_data, gtk_icon_source_set_size (source, size); gtk_icon_source_set_size_wildcarded (source, FALSE); - pixbuf = gdk_pixbuf_new_from_stream (-1, inline_data, FALSE, NULL); + pixbuf = gdk_pixbuf_new_from_inline (-1, inline_data, FALSE, NULL); g_assert (pixbuf); diff --git a/plug-ins/ifscompose/ifscompose_storage.c b/plug-ins/ifscompose/ifscompose_storage.c index 5bb643d98c..5f0c8aa7c2 100644 --- a/plug-ins/ifscompose/ifscompose_storage.c +++ b/plug-ins/ifscompose/ifscompose_storage.c @@ -27,6 +27,7 @@ #include "ifscompose.h" + enum { TOKEN_INVALID = G_TOKEN_LAST, TOKEN_ITERATIONS, @@ -422,8 +423,9 @@ ifsvals_parse_string (char *str, IfsComposeVals *vals, AffElement ***elements) scanner->input_name = "IfsCompose Saved Data"; for (i = 0; i < nsymbols; i++) - g_scanner_add_symbol (scanner, - symbols[i].name, GINT_TO_POINTER (symbols[i].token)); + g_scanner_scope_add_symbol (scanner, 0, + symbols[i].name, + GINT_TO_POINTER (symbols[i].token)); g_scanner_input_text (scanner, str, strlen (str)); @@ -450,51 +452,51 @@ ifsvals_stringify (IfsComposeVals *vals, AffElement **elements) gint i; GString *result = g_string_new (NULL); - g_string_printfa (result, "iterations %d\n", vals->iterations); - g_string_printfa (result, "max_memory %d\n", vals->max_memory); - g_string_printfa (result, "subdivide %d\n", vals->subdivide); - g_string_printfa (result, "radius %f\n", vals->radius); - g_string_printfa (result, "aspect_ratio %f\n", vals->aspect_ratio); - g_string_printfa (result, "center_x %f\n", vals->center_x); - g_string_printfa (result, "center_y %f\n", vals->center_y); + g_string_append_printf (result, "iterations %d\n", vals->iterations); + g_string_append_printf (result, "max_memory %d\n", vals->max_memory); + g_string_append_printf (result, "subdivide %d\n", vals->subdivide); + g_string_append_printf (result, "radius %f\n", vals->radius); + g_string_append_printf (result, "aspect_ratio %f\n", vals->aspect_ratio); + g_string_append_printf (result, "center_x %f\n", vals->center_x); + g_string_append_printf (result, "center_y %f\n", vals->center_y); for (i=0; inum_elements; i++) { g_string_append (result, "element {\n"); - g_string_printfa (result, " x %f\n", elements[i]->v.x); - g_string_printfa (result, " y %f\n", elements[i]->v.y); - g_string_printfa (result, " theta %f\n", elements[i]->v.theta); - g_string_printfa (result, " scale %f\n", elements[i]->v.scale); - g_string_printfa (result, " asym %f\n", elements[i]->v.asym); - g_string_printfa (result, " shear %f\n", elements[i]->v.shear); - g_string_printfa (result, " flip %d\n", elements[i]->v.flip); - g_string_printfa (result, " red_color { %f,%f,%f }\n", - elements[i]->v.red_color.r, - elements[i]->v.red_color.g, - elements[i]->v.red_color.b); - g_string_printfa (result, " green_color { %f,%f,%f }\n", - elements[i]->v.green_color.r, - elements[i]->v.green_color.g, - elements[i]->v.green_color.b); - g_string_printfa (result, " blue_color { %f,%f,%f }\n", - elements[i]->v.blue_color.r, - elements[i]->v.blue_color.g, - elements[i]->v.blue_color.b); - g_string_printfa (result, " black_color { %f,%f,%f }\n", - elements[i]->v.black_color.r, - elements[i]->v.black_color.g, - elements[i]->v.black_color.b); - g_string_printfa (result, " target_color { %f,%f,%f }\n", - elements[i]->v.target_color.r, - elements[i]->v.target_color.g, - elements[i]->v.target_color.b); - g_string_printfa (result, " hue_scale %f\n", - elements[i]->v.hue_scale); - g_string_printfa (result, " value_scale %f\n", - elements[i]->v.value_scale); - g_string_printfa (result, " simple_color %d\n", - elements[i]->v.simple_color); - g_string_printfa (result, " prob %f\n", elements[i]->v.prob); + g_string_append_printf (result, " x %f\n", elements[i]->v.x); + g_string_append_printf (result, " y %f\n", elements[i]->v.y); + g_string_append_printf (result, " theta %f\n", elements[i]->v.theta); + g_string_append_printf (result, " scale %f\n", elements[i]->v.scale); + g_string_append_printf (result, " asym %f\n", elements[i]->v.asym); + g_string_append_printf (result, " shear %f\n", elements[i]->v.shear); + g_string_append_printf (result, " flip %d\n", elements[i]->v.flip); + g_string_append_printf (result, " red_color { %f,%f,%f }\n", + elements[i]->v.red_color.r, + elements[i]->v.red_color.g, + elements[i]->v.red_color.b); + g_string_append_printf (result, " green_color { %f,%f,%f }\n", + elements[i]->v.green_color.r, + elements[i]->v.green_color.g, + elements[i]->v.green_color.b); + g_string_append_printf (result, " blue_color { %f,%f,%f }\n", + elements[i]->v.blue_color.r, + elements[i]->v.blue_color.g, + elements[i]->v.blue_color.b); + g_string_append_printf (result, " black_color { %f,%f,%f }\n", + elements[i]->v.black_color.r, + elements[i]->v.black_color.g, + elements[i]->v.black_color.b); + g_string_append_printf (result, " target_color { %f,%f,%f }\n", + elements[i]->v.target_color.r, + elements[i]->v.target_color.g, + elements[i]->v.target_color.b); + g_string_append_printf (result, " hue_scale %f\n", + elements[i]->v.hue_scale); + g_string_append_printf (result, " value_scale %f\n", + elements[i]->v.value_scale); + g_string_append_printf (result, " simple_color %d\n", + elements[i]->v.simple_color); + g_string_append_printf (result, " prob %f\n", elements[i]->v.prob); g_string_append (result, "}\n"); } diff --git a/tools/pdbgen/pdb/palette.pdb b/tools/pdbgen/pdb/palette.pdb index 3a9c99c06a..9157fee786 100644 --- a/tools/pdbgen/pdb/palette.pdb +++ b/tools/pdbgen/pdb/palette.pdb @@ -302,10 +302,10 @@ CODE } sub palette_get_entry { - $blurb = 'Gets the specified palette entry from the currently active pallette.'; + $blurb = 'Gets the specified palette entry from the currently active palette.'; $help = <<'HELP'; -This procedure returns the color of the zero-based entry specifed for the current palette. +This procedure retrieves the color of the zero-based entry specifed for the current palette. It returns an error if the entry does not exist. HELP @@ -319,7 +319,7 @@ HELP alias => 'entry'} ); @outargs = ( - { name => 'color', type => 'color', + { name => 'color', type => 'color', void_ret => 1, desc => 'The color requested', alias => 'color'} ); @@ -332,13 +332,14 @@ HELP palette = gimp_context_get_palette (gimp_get_current_context(gimp)); - if (entry >= palette->n_colors) { - success = FALSE; - } + if (entry < 0 || entry >= palette->n_colors) + { + success = FALSE; + } else - { - color=*(GimpRGB *) g_list_nth(palette->colors, entry)->data; - } + { + color=*(GimpRGB *) g_list_nth(palette->colors, entry)->data; + } } CODE );