Commit 12749080 authored by Ari Pollak's avatar Ari Pollak

Imported Upstream version 2.4.2

parent 69250d2d
2007-11-20 Sven Neumann <sven@gimp.org>
* Made 2.4.2 release.
2007-11-20 Michael Natterer <mitch@gimp.org>
Merged from trunk:
* app/widgets/gimpcontainercombobox.c: set the combo insensitive
when it has no items. Fixes bug #498511.
2007-11-20 Sven Neumann <sven@gimp.org>
Merged from trunk:
* plug-ins/script-fu/scripts/t-o-p-logo.scm: applied patch from
Ulf-D. Ehlert that fixes the background color used in the Particle
Trace filter (bug #498282).
2007-11-19 Tor Lillqvist <tml@novell.com>
Merged from trunk:
* libgimpwidgets/gimpcolorscale.c (gimp_color_scale_render_stipple):
Don't write past end of buffer (bug #399484).
2007-11-16 Sven Neumann <sven@gimp.org>
Merged from trunk:
* app/base/lut-funcs.c (equalize_lut_setup): make sure we don't
get stuck in a loop if all pixels are transparent (bug #497291).
2007-11-16 Sven Neumann <sven@gimp.org>
Merged from trunk:
* libgimpconfig/gimpcolorconfig.c: changed default value for using
the system monitor profile. Many users seem to have broken monitor
profiles and it's hard to figure out how to fix this (bug #496890).
2007-11-15 Sven Neumann <sven@gimp.org>
Merged from trunk:
* plug-ins/common/screenshot.c: don't call gimp_edit_clear() if
the selection mask is empty after selecting the window shape and
inverting that selection. Fixes bug #493182.
2007-11-15 Sven Neumann <sven@gimp.org>
Merged from trunk:
* plug-ins/common/tiff-save.c (save_image): fixed bug in colormap
handling (bug #497103).
2007-11-13 Sven Neumann <sven@gimp.org>
Merged from trunk:
* app/core/gimpimage-merge.c (gimp_image_merge_layers): when we
encounter an unsupported merge operation (merging an opaque
indexed layer onto an indexed layer with alpha channel), then add
an alpha channel and try again. Fixes bug #496437.
2007-11-13 Sven Neumann <sven@gimp.org>
Fix for bug #494049 (painting doesn't update the histogram),
merged from trunk:
* app/paint/gimppaintcore.c: freeze the drawable preview while we
are painting. Update the drawable instead of the image.
* app/widgets/gimphistogrameditor.c: use a short timeout instead
of an idle handler to update the histogram.
2007-11-12 Sven Neumann <sven@gimp.org>
Merged from trunk:
* app/core/gimpimage-merge.c (gimp_image_merge_layers): corrected
the size of the pixel region passed to color_region() in case of
an indexed image. Fixes bug #495990.
2007-11-12 Michael Natterer <mitch@gimp.org>
Merged from trunk:
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_ruler_button_press): don't let
GimpImageMapTools move sample points. They fail badly and leave
the display in a paused state.
2007-11-12 Sven Neumann <sven@gimp.org>
Merged from trunk:
* plug-ins/common/tiff-load.c (run): properly handle a failure of
TIFFFdOpen() instead of crashing on TIFF files we can't handle.
2007-11-12 Michael Natterer <mitch@gimp.org>
Merged from trunk:
* app/display/gimpdisplayshell.c (gimp_display_shell_new): don't
crash if gimp_display_shell_filter_new() returns NULL.
Fixes bug #495863.
2007-11-11 Kevin Cozens <kcozens@cvs.gnome.org>
* plug-ins/script-fu/scripts/script-fu-compat.init: Return a list
from cons-array when type is 'string.
2007-11-10 Sven Neumann <sven@gimp.org>
* app/actions/view-actions.c (view_zoom_explicit_actions): fixed
incorrect tooltip (bug #495564).
2007-11-10 Sven Neumann <sven@gimp.org>
Merged from trunk:
* plug-ins/helpbrowser/dialog.c (browser_dialog_make_index_foreach):
deal gracefully with NULL titles.
2007-11-08 Sven Neumann <sven@gimp.org>
Merged from trunk:
* app/display/gimpstatusbar.c (gimp_statusbar_vprintf): also cut
the message at a '\r' character. Fixes the remaining aspect of
bug #492718.
2007-11-08 Sven Neumann <sven@gimp.org>
Merged from trunk:
* app/display/gimpdisplayshell.c (gimp_display_shell_show_tooltip):
don't directly pass a message to gimp_statusbar_push(), it expects
a format string and printf-like varargs. Fixes the crash reported
in bug #492718.
2007-11-06 Sven Neumann <sven@gimp.org>
Merged from trunk:
* tools/pdbgen/pdb/plug_in.pdb: improved documentation for
gimp-plugin-menu-register.
* app/pdb/plug_in_cmds.c
* libgimp/gimpplugin_pdb.c: regenerated.
2007-11-05 Sven Neumann <sven@gimp.org>
Merged from trunk:
* app/core/gimpimagemap.c (gimp_image_map_clear): update the
drawable, not the image. This change was missing in the fix for
bug #490182. Fixes bug #493639.
2007-11-01 Sven Neumann <sven@gimp.org>
Merged from trunk:
* plug-ins/script-fu/scripts/Makefile.am (scripts):
* plug-ins/script-fu/scripts/hsv-graph.scm: removed this script.
Fixes bug #491311.
2007-10-31 Sven Neumann <sven@gimp.org>
* README: somehow a leading space sneaked in here; removed it.
2007-10-31 Sven Neumann <sven@gimp.org>
Merged from trunk:
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_get_constraints): set all return values also
when bailing out early to avoid valgrind warnings about
uninitialized memory.
2007-10-31 Sven Neumann <sven@gimp.org>
* configure.in: bumped version to 2.4.2 (interface age 2).
2007-10-31 Sven Neumann <sven@gimp.org>
* Made 2.4.1 release.
......
......@@ -7,6 +7,30 @@ This is the stable branch of GIMP. No new features are being added
here, just bug-fixes.
Changes in GIMP 2.4.2
=====================
- removed broken and useless HSV Graph script (bug #491311)
- update the histogram when a color correction tool is cancelled (bug #493639)
- fixed a crash with certain plug-in or script descriptions (bug #492718)
- corrected a tooltip (bug #495564)
- fixed a crash when GIMP is run without any modules (bug #495863)
- fixed error handling in the TIFF plug-in
- fixed a problem with Sample points
- fixed a crash when merging layers in indexed image (bug #495990)
- update the histogram when painting (bug #494049)
- fixed another problem with merge operations on indexed images (bug #496437)
- fixed crash in TIFF plug-in when saving indexed images (bug #497103)
- changed defaults so that a system monitor profile is only used when the
user explicitely enabled this feature (bug #496890)
- fixed endless loop when running equalize on transparent areas (bug #497291)
- fixed heap corruption in GimpColorScale widget that caused a crash in the
Compose plug-in (bug #399484)
- fixed use of background color in Particle Trace script (bug #498282)
- set the image menu insensitive when there's no image opened (bug #498511)
- translation updates (ca, et, it, lt, pt, pt_BR, sr, sv)
Changes in GIMP 2.4.1
=====================
......
The GNU Image Manipulation Program Version 2.4
The GNU Image Manipulation Program Version 2.4
----------------------------------------------
GIMP 2.4 replaces earlier GIMP 2.x versions. It is advised that you
......
......@@ -308,7 +308,7 @@ static const GimpRadioActionEntry view_zoom_explicit_actions[] =
{ "view-zoom-2-1", NULL,
N_("_2:1 (200%)"), NULL,
N_("Zoom 1:1"),
N_("Zoom 2:1"),
20000,
GIMP_HELP_VIEW_ZOOM_IN },
......
......@@ -74,8 +74,8 @@ brightness_contrast_lut_setup (GimpLut *lut,
data.brightness = brightness;
data.contrast = contrast;
gimp_lut_setup (lut, (GimpLutFunc) brightness_contrast_lut_func,
(gpointer) &data, n_channels);
gimp_lut_setup (lut,
(GimpLutFunc) brightness_contrast_lut_func, &data, n_channels);
}
GimpLut *
......@@ -111,8 +111,7 @@ invert_lut_setup (GimpLut *lut,
{
g_return_if_fail (lut != NULL);
gimp_lut_setup_exact (lut, (GimpLutFunc) invert_lut_func,
NULL , n_channels);
gimp_lut_setup_exact (lut, (GimpLutFunc) invert_lut_func, NULL, n_channels);
}
GimpLut *
......@@ -147,8 +146,7 @@ add_lut_setup (GimpLut *lut,
{
g_return_if_fail (lut != NULL);
gimp_lut_setup (lut, (GimpLutFunc) add_lut_func,
(gpointer) &amount, n_channels);
gimp_lut_setup (lut, (GimpLutFunc) add_lut_func, &amount, n_channels);
}
GimpLut *
......@@ -184,8 +182,8 @@ intersect_lut_setup (GimpLut *lut,
{
g_return_if_fail (lut != NULL);
gimp_lut_setup_exact (lut, (GimpLutFunc) intersect_lut_func,
(gpointer) &value , n_channels);
gimp_lut_setup_exact (lut,
(GimpLutFunc) intersect_lut_func, &value, n_channels);
}
GimpLut *
......@@ -224,8 +222,8 @@ threshold_lut_setup (GimpLut *lut,
{
g_return_if_fail (lut != NULL);
gimp_lut_setup_exact (lut, (GimpLutFunc) threshold_lut_func,
(gpointer) &value , n_channels);
gimp_lut_setup_exact (lut,
(GimpLutFunc) threshold_lut_func, &value, n_channels);
}
GimpLut *
......@@ -270,8 +268,8 @@ posterize_lut_setup (GimpLut *lut,
{
g_return_if_fail (lut != NULL);
gimp_lut_setup_exact (lut, (GimpLutFunc) posterize_lut_func,
(gpointer) &levels, n_channels);
gimp_lut_setup_exact (lut,
(GimpLutFunc) posterize_lut_func, &levels, n_channels);
}
GimpLut *
......@@ -344,7 +342,7 @@ equalize_lut_setup (GimpLut *lut,
{
desired = i * pixels_per_value;
while (sum <= desired)
while (sum < desired && j < 256)
{
j++;
sum += gimp_histogram_get_channel (hist, k, j + 1);
......@@ -360,8 +358,7 @@ equalize_lut_setup (GimpLut *lut,
}
}
gimp_lut_setup (lut, (GimpLutFunc) equalize_lut_func,
(gpointer) &hlut, n_channels);
gimp_lut_setup (lut, (GimpLutFunc) equalize_lut_func, &hlut, n_channels);
}
GimpLut *
......
......@@ -295,6 +295,16 @@ gimp_image_merge_visible_vectors (GimpImage *image)
/* private functions */
static CombinationMode
gimp_image_merge_layers_get_operation (GimpLayer *dest,
GimpLayer *src)
{
GimpImageType type = gimp_drawable_type (GIMP_DRAWABLE (dest));
gint bytes = gimp_drawable_bytes (GIMP_DRAWABLE (src));
return gimp_image_get_combination_mode (type, bytes);
}
static GimpLayer *
gimp_image_merge_layers (GimpImage *image,
GSList *merge_list,
......@@ -341,7 +351,7 @@ gimp_image_merge_layers (GimpImage *image,
{
case GIMP_EXPAND_AS_NECESSARY:
case GIMP_CLIP_TO_IMAGE:
if (!count)
if (! count)
{
x1 = off_x;
y1 = off_y;
......@@ -359,6 +369,7 @@ gimp_image_merge_layers (GimpImage *image,
if ((off_y + gimp_item_height (GIMP_ITEM (layer))) > y2)
y2 = (off_y + gimp_item_height (GIMP_ITEM (layer)));
}
if (merge_type == GIMP_CLIP_TO_IMAGE)
{
x1 = CLAMP (x1, 0, image->width);
......@@ -413,7 +424,7 @@ gimp_image_merge_layers (GimpImage *image,
type,
gimp_object_get_name (GIMP_OBJECT (layer)),
GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE);
if (!merge_layer)
if (! merge_layer)
{
g_warning ("%s: could not allocate merge layer.", G_STRFUNC);
return NULL;
......@@ -430,8 +441,7 @@ gimp_image_merge_layers (GimpImage *image,
/* init the pixel region */
pixel_region_init (&src1PR,
gimp_drawable_get_tiles (GIMP_DRAWABLE (merge_layer)),
0, 0,
image->width, image->height,
0, 0, (x2 - x1), (y2 - y1),
TRUE);
/* set the region to the background color */
......@@ -442,9 +452,8 @@ gimp_image_merge_layers (GimpImage *image,
else
{
/* The final merged layer inherits the name of the bottom most layer
* and the resulting layer has an alpha channel
* whether or not the original did
* Opacity is set to 100% and the MODE is set to normal
* and the resulting layer has an alpha channel whether or not the
* original did. Opacity is set to 100% and the MODE is set to normal.
*/
merge_layer =
......@@ -500,9 +509,16 @@ gimp_image_merge_layers (GimpImage *image,
/* determine what sort of operation is being attempted and
* if it's actually legal...
*/
operation =
gimp_image_get_combination_mode (gimp_drawable_type (GIMP_DRAWABLE (merge_layer)),
gimp_drawable_bytes (GIMP_DRAWABLE (layer)));
operation = gimp_image_merge_layers_get_operation (merge_layer, layer);
if (operation == -1)
{
gimp_layer_add_alpha (layer);
/* try again ... */
operation = gimp_image_merge_layers_get_operation (merge_layer,
layer);
}
if (operation == -1)
{
......
......@@ -456,20 +456,9 @@ gimp_image_map_clear (GimpImageMap *image_map)
}
else
{
GimpImage *image;
gint off_x, off_y;
copy_region (&srcPR, &destPR);
image = gimp_item_get_image (GIMP_ITEM (image_map->drawable));
gimp_item_offsets (GIMP_ITEM (image_map->drawable), &off_x, &off_y);
/* Update the image -- It is important to call gimp_image_update()
* instead of gimp_drawable_update() because we don't want the
* drawable preview to be constantly invalidated
*/
gimp_image_update (image, x + off_x, y + off_y, width, height);
gimp_drawable_update (image_map->drawable, x, y, width, height);
}
/* Free the undo_tiles tile manager */
......
This diff is collapsed.
......@@ -41,6 +41,7 @@
#include "core/gimplayer.h"
#include "core/gimptoolinfo.h"
#include "tools/gimpimagemaptool.h"
#include "tools/gimpmovetool.h"
#include "tools/gimppainttool.h"
#include "tools/gimptoolcontrol.h"
......@@ -1512,6 +1513,7 @@ gimp_display_shell_ruler_button_press (GtkWidget *widget,
sample_point = (event->state & GDK_CONTROL_MASK);
if (! ((sample_point && (GIMP_IS_COLOR_TOOL (active_tool) &&
! GIMP_IS_IMAGE_MAP_TOOL (active_tool) &&
! (GIMP_IS_PAINT_TOOL (active_tool) &&
! GIMP_PAINT_TOOL (active_tool)->pick_colors)))
......
......@@ -604,7 +604,7 @@ gimp_display_shell_show_tooltip (GimpUIManager *manager,
GimpDisplayShell *shell)
{
gimp_statusbar_push (GIMP_STATUSBAR (shell->statusbar), "menu-tooltip",
tooltip);
"%s", tooltip);
}
static void
......@@ -1117,8 +1117,11 @@ gimp_display_shell_new (GimpDisplay *display,
filter = gimp_display_shell_filter_new (shell,
gimp->config->color_management);
gimp_display_shell_filter_set (shell, filter);
g_object_unref (filter);
if (filter)
{
gimp_display_shell_filter_set (shell, filter);
g_object_unref (filter);
}
gimp_display_shell_connect (shell);
......
......@@ -1171,6 +1171,10 @@ gimp_statusbar_vprintf (const gchar *format,
message = g_strdup_vprintf (format, args);
/* guard us from multi-line strings */
newline = strchr (message, '\r');
if (newline)
*newline = '\0';
newline = strchr (message, '\n');
if (newline)
*newline = '\0';
......
......@@ -396,6 +396,9 @@ gimp_paint_core_start (GimpPaintCore *core,
core->last_paint.x = -1e6;
core->last_paint.y = -1e6;
/* Freeze the drawable preview so that it isn't constantly updated. */
gimp_viewable_preview_freeze (GIMP_VIEWABLE (drawable));
return TRUE;
}
......@@ -438,10 +441,7 @@ gimp_paint_core_finish (GimpPaintCore *core,
core->saved_proj_tiles = NULL;
}
/* invalidate the drawable preview -- have to do it here, because
* it is not done during the actual painting.
*/
gimp_viewable_invalidate_preview (GIMP_VIEWABLE (drawable));
gimp_viewable_preview_thaw (GIMP_VIEWABLE (drawable));
}
static void
......@@ -507,6 +507,8 @@ gimp_paint_core_cancel (GimpPaintCore *core,
gimp_drawable_update (drawable,
core->x1, core->y1,
core->x2 - core->x1, core->y2 - core->y1);
gimp_viewable_preview_thaw (GIMP_VIEWABLE (drawable));
}
void
......@@ -783,15 +785,8 @@ gimp_paint_core_paste (GimpPaintCore *core,
GimpLayerModeEffects paint_mode,
GimpPaintApplicationMode mode)
{
GimpImage *image;
PixelRegion srcPR;
TileManager *alt = NULL;
gint off_x;
gint off_y;
image = gimp_item_get_image (GIMP_ITEM (drawable));
gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y);
PixelRegion srcPR;
/* set undo blocks */
gimp_paint_core_validate_undo_tiles (core, drawable,
......@@ -802,7 +797,12 @@ gimp_paint_core_paste (GimpPaintCore *core,
if (core->use_saved_proj)
{
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
GimpPickable *pickable = GIMP_PICKABLE (image->projection);
gint off_x;
gint off_y;
gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y);
gimp_paint_core_validate_saved_proj_tiles (core, pickable,
core->canvas_buf->x + off_x,
......@@ -862,15 +862,12 @@ gimp_paint_core_paste (GimpPaintCore *core,
core->x2 = MAX (core->x2, core->canvas_buf->x + core->canvas_buf->width);
core->y2 = MAX (core->y2, core->canvas_buf->y + core->canvas_buf->height);
/* Update the image -- It is important to call gimp_image_update()
* instead of gimp_drawable_update() because we don't want the
* drawable preview to be constantly invalidated
*/
gimp_image_update (image,
core->canvas_buf->x + off_x,
core->canvas_buf->y + off_y,
core->canvas_buf->width,
core->canvas_buf->height);
/* Update the drawable */
gimp_drawable_update (drawable,
core->canvas_buf->x,
core->canvas_buf->y,
core->canvas_buf->width,
core->canvas_buf->height);
}
/* This works similarly to gimp_paint_core_paste. However, instead of
......@@ -889,10 +886,7 @@ gimp_paint_core_replace (GimpPaintCore *core,
gdouble image_opacity,
GimpPaintApplicationMode mode)
{
GimpImage *image;
PixelRegion srcPR;
gint off_x;
gint off_y;
if (! gimp_drawable_has_alpha (drawable))
{
......@@ -903,10 +897,6 @@ gimp_paint_core_replace (GimpPaintCore *core,
return;
}
image = gimp_item_get_image (GIMP_ITEM (drawable));
gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y);
/* set undo blocks */
gimp_paint_core_validate_undo_tiles (core, drawable,
core->canvas_buf->x,
......@@ -965,15 +955,12 @@ gimp_paint_core_replace (GimpPaintCore *core,
core->x2 = MAX (core->x2, core->canvas_buf->x + core->canvas_buf->width) ;
core->y2 = MAX (core->y2, core->canvas_buf->y + core->canvas_buf->height) ;
/* Update the image -- It is important to call gimp_image_update()
* instead of gimp_drawable_update() because we don't want the
* drawable preview to be constantly invalidated
*/
gimp_image_update (image,
core->canvas_buf->x + off_x,
core->canvas_buf->y + off_y,
core->canvas_buf->width,
core->canvas_buf->height);
/* Update the drawable */
gimp_drawable_update (drawable,
core->canvas_buf->x,
core->canvas_buf->y,
core->canvas_buf->width,
core->canvas_buf->height);
}
static void
......
......@@ -451,7 +451,7 @@ register_plug_in_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-plugin-menu-branch-register",
"Register a sub-menu.",
"This procedure installs an sub-menu which does not belong to any procedure.",
"This procedure installs a sub-menu which does not belong to any procedure. The menu-name should be the untranslated menu label. GIMP will look up the translation in the textdomain registered for the plug-in.",
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2005",
......
......@@ -3657,24 +3657,23 @@ gimp_rectangle_tool_get_constraints (GimpRectangleTool *rectangle_tool,
gint *max_y,
GimpRectangleConstraint constraint)
{
GimpTool *tool;
gint min_x_dummy;
gint min_y_dummy;
gint max_x_dummy;
gint max_y_dummy;
if (min_x == NULL)
min_x = &min_x_dummy;
if (min_y == NULL)
min_y = &min_y_dummy;
if (max_x == NULL)
max_x = &max_x_dummy;
if (max_y == NULL)
max_y = &max_y_dummy;
tool = GIMP_TOOL (rectangle_tool);
GimpTool *tool = GIMP_TOOL (rectangle_tool);
gint min_x_dummy;
gint min_y_dummy;
gint max_x_dummy;
gint max_y_dummy;
if (! min_x) min_x = &min_x_dummy;
if (! min_y) min_y = &min_y_dummy;
if (! max_x) max_x = &max_x_dummy;
if (! max_y) max_y = &max_y_dummy;
*min_x = 0;
*min_y = 0;
*max_x = 0;
*max_y = 0;
if (tool->display == NULL)
if (! tool->display)
return;
switch (constraint)
......
......@@ -179,6 +179,7 @@ gimp_container_combo_box_init (GimpContainerComboBox *combo_box)
G_CALLBACK (gimp_container_combo_box_changed),
combo_box);
gtk_widget_set_sensitive (GTK_WIDGET (combo_box), FALSE);
}
static void
......@@ -358,9 +359,13 @@ gimp_container_combo_box_insert_item (GimpContainerView *view,
else
gtk_list_store_insert (GTK_LIST_STORE (model), &iter, index);
/* GimpContainerViews don't select items by default */
if (gtk_tree_model_iter_n_children (model, NULL) == 1)
gtk_combo_box_set_active (GTK_COMBO_BOX (view), -1);
{
/* GimpContainerViews don't select items by default */
gtk_combo_box_set_active (GTK_COMBO_BOX (view), -1);
gtk_widget_set_sensitive (GTK_WIDGET (view), TRUE);
}