Commit f35d8506 authored by Ari Pollak's avatar Ari Pollak

Imported Upstream version 2.4.0~rc3

parent 4be5597e
This diff is collapsed.
......@@ -382,6 +382,8 @@ SVG_LIBS = @SVG_LIBS@
SYMPREFIX = @SYMPREFIX@
TIFF_LOAD = @TIFF_LOAD@
TIFF_SAVE = @TIFF_SAVE@
TOOLBOX_MENU_FALSE = @TOOLBOX_MENU_FALSE@
TOOLBOX_MENU_TRUE = @TOOLBOX_MENU_TRUE@
URI_GNOME_VFS_CFLAGS = @URI_GNOME_VFS_CFLAGS@
URI_GNOME_VFS_LIBS = @URI_GNOME_VFS_LIBS@
URI_LIBCURL_CFLAGS = @URI_LIBCURL_CFLAGS@
......
......@@ -7,6 +7,20 @@ This is the development branch of GIMP. Here's where all the shiny
new stuff is being done that will one day be released as GIMP 2.4.
Changes in GIMP 2.4.0-rc3
=========================
- use the new format for storing recently used files
- added conversion options to the color profile conversion plug-in
- allow to disable the toolbox menu on all platforms
- further improved handling of the JPEG settings
- switch tabs when hovering over them
- added a PDB function to remove the alpha channel from a layer
- plug-in previews remember the state of the Preview checkbox (bug #478657)
- allow to grow the image/layer using the Crop tool
- bug fixes
Changes in GIMP 2.4.0-rc2
=========================
......
This diff is collapsed.
......@@ -443,6 +443,8 @@ SVG_LIBS = @SVG_LIBS@
SYMPREFIX = @SYMPREFIX@
TIFF_LOAD = @TIFF_LOAD@
TIFF_SAVE = @TIFF_SAVE@
TOOLBOX_MENU_FALSE = @TOOLBOX_MENU_FALSE@
TOOLBOX_MENU_TRUE = @TOOLBOX_MENU_TRUE@
URI_GNOME_VFS_CFLAGS = @URI_GNOME_VFS_CFLAGS@
URI_GNOME_VFS_LIBS = @URI_GNOME_VFS_LIBS@
URI_LIBCURL_CFLAGS = @URI_LIBCURL_CFLAGS@
......
......@@ -398,6 +398,8 @@ SVG_LIBS = @SVG_LIBS@
SYMPREFIX = @SYMPREFIX@
TIFF_LOAD = @TIFF_LOAD@
TIFF_SAVE = @TIFF_SAVE@
TOOLBOX_MENU_FALSE = @TOOLBOX_MENU_FALSE@
TOOLBOX_MENU_TRUE = @TOOLBOX_MENU_TRUE@
URI_GNOME_VFS_CFLAGS = @URI_GNOME_VFS_CFLAGS@
URI_GNOME_VFS_LIBS = @URI_GNOME_VFS_LIBS@
URI_LIBCURL_CFLAGS = @URI_LIBCURL_CFLAGS@
......
......@@ -990,9 +990,6 @@ layers_add_mask_response (GtkWidget *widget,
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_LAYER_ADD_MASK,
_("Add Layer Mask"));
if (! gimp_drawable_has_alpha (GIMP_DRAWABLE (layer)))
gimp_layer_add_alpha (layer);
mask = gimp_layer_create_mask (layer, layer_add_mask_type,
dialog->channel);
......
......@@ -369,6 +369,8 @@ SVG_LIBS = @SVG_LIBS@
SYMPREFIX = @SYMPREFIX@
TIFF_LOAD = @TIFF_LOAD@
TIFF_SAVE = @TIFF_SAVE@
TOOLBOX_MENU_FALSE = @TOOLBOX_MENU_FALSE@
TOOLBOX_MENU_TRUE = @TOOLBOX_MENU_TRUE@
URI_GNOME_VFS_CFLAGS = @URI_GNOME_VFS_CFLAGS@
URI_GNOME_VFS_LIBS = @URI_GNOME_VFS_LIBS@
URI_LIBCURL_CFLAGS = @URI_LIBCURL_CFLAGS@
......
......@@ -522,11 +522,8 @@ find_empty_segs (PixelRegion *maskPR,
tile = tile_manager_get_tile (maskPR->tiles,
x, scanline, TRUE, FALSE);
data =
(const guchar *) tile_data_pointer (tile,
x % TILE_WIDTH,
scanline % TILE_HEIGHT) +
(tile_bpp(tile) - 1);
data = ((const guchar *) tile_data_pointer (tile, x, scanline) +
tile_bpp (tile) - 1);
tilex = x / TILE_WIDTH;
dstep = tile_bpp (tile);
......
......@@ -562,8 +562,6 @@ gimp_histogram_calculate_sub_region (GimpHistogram *histogram,
if (mask)
{
gdouble masked;
src = region->data;
msrc = mask->data;
......@@ -578,7 +576,7 @@ gimp_histogram_calculate_sub_region (GimpHistogram *histogram,
while (w--)
{
masked = m[0] / 255.0;
const gdouble masked = m[0] / 255.0;
VALUE (0, s[0]) += masked;
......@@ -600,9 +598,10 @@ gimp_histogram_calculate_sub_region (GimpHistogram *histogram,
while (w--)
{
masked = m[0] / 255.0;
const gdouble masked = m[0] / 255.0;
const gdouble weight = s[1] / 255.0;
VALUE (0, s[0]) += masked;
VALUE (0, s[0]) += weight * masked;
VALUE (1, s[1]) += masked;
s += 2;
......@@ -623,7 +622,7 @@ gimp_histogram_calculate_sub_region (GimpHistogram *histogram,
while (w--)
{
masked = m[0] / 255.0;
const gdouble masked = m[0] / 255.0;
VALUE (1, s[0]) += masked;
VALUE (2, s[1]) += masked;
......@@ -654,19 +653,20 @@ gimp_histogram_calculate_sub_region (GimpHistogram *histogram,
while (w--)
{
masked = m[0] / 255.0;
const gdouble masked = m[0] / 255.0;
const gdouble weight = s[3] / 255.0;
VALUE (1, s[0]) += masked;
VALUE (2, s[1]) += masked;
VALUE (3, s[2]) += masked;
VALUE (1, s[0]) += weight * masked;
VALUE (2, s[1]) += weight * masked;
VALUE (3, s[2]) += weight * masked;
VALUE (4, s[3]) += masked;
max = (s[0] > s[1]) ? s[0] : s[1];
if (s[2] > max)
VALUE (0, s[2]) += masked;
VALUE (0, s[2]) += weight * masked;
else
VALUE (0, max) += masked;
VALUE (0, max) += weight * masked;
s += 4;
m += 1;
......@@ -709,7 +709,9 @@ gimp_histogram_calculate_sub_region (GimpHistogram *histogram,
while (w--)
{
VALUE (0, s[0]) += 1.0;
const gdouble weight = s[1] / 255;
VALUE (0, s[0]) += weight;
VALUE (1, s[1]) += 1.0;
s += 2;
......@@ -753,17 +755,19 @@ gimp_histogram_calculate_sub_region (GimpHistogram *histogram,
while (w--)
{
VALUE (1, s[0]) += 1.0;
VALUE (2, s[1]) += 1.0;
VALUE (3, s[2]) += 1.0;
const gdouble weight = s[3] / 255;
VALUE (1, s[0]) += weight;
VALUE (2, s[1]) += weight;
VALUE (3, s[2]) += weight;
VALUE (4, s[3]) += 1.0;
max = (s[0] > s[1]) ? s[0] : s[1];
if (s[2] > max)
VALUE (0, s[2]) += 1.0;
VALUE (0, s[2]) += weight;
else
VALUE (0, max) += 1.0;
VALUE (0, max) += weight;
s += 4;
}
......
......@@ -169,7 +169,7 @@ pixel_region_get_row (PixelRegion *PR,
while (x < end)
{
tile = tile_manager_get_tile (PR->tiles, x, y, TRUE, FALSE);
tile_data = tile_data_pointer (tile, x % TILE_WIDTH, y % TILE_HEIGHT);
tile_data = tile_data_pointer (tile, x, y);
npixels = tile_ewidth (tile) - (x % TILE_WIDTH);
if ((x + npixels) > end) /* make sure we don't write past the end */
......@@ -230,7 +230,7 @@ pixel_region_get_col (PixelRegion *PR,
while (y < end)
{
tile = tile_manager_get_tile (PR->tiles, x, y, TRUE, FALSE);
tile_data = tile_data_pointer (tile, x % TILE_WIDTH, y % TILE_HEIGHT);
tile_data = tile_data_pointer (tile, x, y);
boundary = y + (tile_eheight(tile) - (y % TILE_HEIGHT));
if (boundary > end) /* make sure we don't write past the end */
......
......@@ -684,8 +684,7 @@ read_pixel_data (TileManager *tm,
for (x = x1; x <= x2; x += TILE_WIDTH - (x % TILE_WIDTH))
{
Tile *t = tile_manager_get_tile (tm, x, y, TRUE, FALSE);
const guchar *s = tile_data_pointer (t,
x % TILE_WIDTH, y % TILE_HEIGHT);
const guchar *s = tile_data_pointer (t, x, y);
guchar *d = buffer + stride * (y - y1) + tm->bpp * (x - x1);
guint rows, cols;
guint srcstride;
......@@ -728,8 +727,7 @@ write_pixel_data (TileManager *tm,
{
Tile *t = tile_manager_get_tile (tm, x, y, TRUE, TRUE);
const guchar *s = buffer + stride * (y - y1) + tm->bpp * (x - x1);
guchar *d = tile_data_pointer (t,
x % TILE_WIDTH, y % TILE_HEIGHT);
guchar *d = tile_data_pointer (t, x, y);
guint rows, cols;
guint dststride;
......@@ -767,18 +765,30 @@ read_pixel_data_1 (TileManager *tm,
if (num != tm->cached_num) /* must fetch a new tile */
{
Tile *tile;
if (tm->cached_tile)
tile_release (tm->cached_tile, FALSE);
tm->cached_num = -1;
tm->cached_tile = NULL;
/* use a temporary variable instead of assigning to
* tm->cached_tile directly to make sure tm->cached_num
* and tm->cached_tile are always in a consistent state.
* (the requested tile might be invalid and needs to be
* validated, which would call tile_manager_get() recursively,
* which in turn would clear the cached tile) See bug #472770.
*/
tile = tile_manager_get (tm, num, TRUE, FALSE);
tm->cached_num = num;
tm->cached_tile = tile_manager_get (tm, num, TRUE, FALSE);
tm->cached_tile = tile;
}
if (tm->cached_tile)
{
const guchar *src = tile_data_pointer (tm->cached_tile,
x % TILE_WIDTH,
y % TILE_HEIGHT);
const guchar *src = tile_data_pointer (tm->cached_tile, x, y);
switch (tm->bpp)
{
......@@ -802,7 +812,7 @@ write_pixel_data_1 (TileManager *tm,
const guchar *buffer)
{
Tile *tile = tile_manager_get_tile (tm, x, y, TRUE, TRUE);
guchar *dest = tile_data_pointer (tile, x % TILE_WIDTH, y % TILE_HEIGHT);
guchar *dest = tile_data_pointer (tile, x, y);
switch (tm->bpp)
{
......
......@@ -210,10 +210,10 @@ tile_pyramid_get_tiles (TilePyramid *pyramid,
**/
void
tile_pyramid_invalidate_area (TilePyramid *pyramid,
gint x,
gint y,
gint width,
gint height)
gint x,
gint y,
gint width,
gint height)
{
gint level;
......
......@@ -389,7 +389,7 @@ tile_data_pointer (Tile *tile,
gint xoff,
gint yoff)
{
gsize offset = yoff * tile->ewidth + xoff;
gsize offset = (yoff % TILE_HEIGHT) * tile->ewidth + (xoff % TILE_WIDTH);
return (gpointer) (tile->data + offset * tile->bpp);
}
......
......@@ -461,6 +461,8 @@ SVG_LIBS = @SVG_LIBS@
SYMPREFIX = @SYMPREFIX@
TIFF_LOAD = @TIFF_LOAD@
TIFF_SAVE = @TIFF_SAVE@
TOOLBOX_MENU_FALSE = @TOOLBOX_MENU_FALSE@
TOOLBOX_MENU_TRUE = @TOOLBOX_MENU_TRUE@
URI_GNOME_VFS_CFLAGS = @URI_GNOME_VFS_CFLAGS@
URI_GNOME_VFS_LIBS = @URI_GNOME_VFS_LIBS@
URI_LIBCURL_CFLAGS = @URI_LIBCURL_CFLAGS@
......
......@@ -376,6 +376,8 @@ SVG_LIBS = @SVG_LIBS@
SYMPREFIX = @SYMPREFIX@
TIFF_LOAD = @TIFF_LOAD@
TIFF_SAVE = @TIFF_SAVE@
TOOLBOX_MENU_FALSE = @TOOLBOX_MENU_FALSE@
TOOLBOX_MENU_TRUE = @TOOLBOX_MENU_TRUE@
URI_GNOME_VFS_CFLAGS = @URI_GNOME_VFS_CFLAGS@
URI_GNOME_VFS_LIBS = @URI_GNOME_VFS_LIBS@
URI_LIBCURL_CFLAGS = @URI_LIBCURL_CFLAGS@
......
......@@ -432,6 +432,8 @@ SVG_LIBS = @SVG_LIBS@
SYMPREFIX = @SYMPREFIX@
TIFF_LOAD = @TIFF_LOAD@
TIFF_SAVE = @TIFF_SAVE@
TOOLBOX_MENU_FALSE = @TOOLBOX_MENU_FALSE@
TOOLBOX_MENU_TRUE = @TOOLBOX_MENU_TRUE@
URI_GNOME_VFS_CFLAGS = @URI_GNOME_VFS_CFLAGS@
URI_GNOME_VFS_LIBS = @URI_GNOME_VFS_LIBS@
URI_LIBCURL_CFLAGS = @URI_LIBCURL_CFLAGS@
......
......@@ -61,6 +61,7 @@ gimp_gui_init (Gimp *gimp)
gimp->gui.progress_free = NULL;
gimp->gui.pdb_dialog_set = NULL;
gimp->gui.pdb_dialog_close = NULL;
gimp->gui.recent_list_add_uri = NULL;
}
void
......@@ -415,3 +416,17 @@ gimp_pdb_dialog_close (Gimp *gimp,
return FALSE;
}
gboolean
gimp_recent_list_add_uri (Gimp *gimp,
const gchar *uri,
const gchar *mime_type)
{
g_return_val_if_fail (GIMP_IS_GIMP (gimp), FALSE);
g_return_val_if_fail (uri != NULL, FALSE);
if (gimp->gui.recent_list_add_uri)
return gimp->gui.recent_list_add_uri (gimp, uri, mime_type);
return FALSE;
}
......@@ -80,6 +80,10 @@ struct _GimpGui
gboolean (* pdb_dialog_close) (Gimp *gimp,
GimpContainer *container,
const gchar *callback_name);
gboolean (* recent_list_add_uri) (Gimp *gimp,
const gchar *uri,
const gchar *mime_type);
};
......@@ -146,6 +150,8 @@ gboolean gimp_pdb_dialog_set (Gimp *gimp,
gboolean gimp_pdb_dialog_close (Gimp *gimp,
GimpContainer *container,
const gchar *callback_name);
gboolean gimp_recent_list_add_uri (Gimp *gimp,
const gchar *uri,
const gchar *mime_type);
#endif /* __GIMP_GUI_H__ */
......@@ -70,7 +70,6 @@ static void gimp_transform_region_linear (TileManager *orig_tiles,
gint v2,
const GimpMatrix3 *m,
gint alpha,
gboolean supersample,
gint recursion_level,
const guchar *bg_color,
GimpProgress *progress);
......@@ -86,7 +85,6 @@ static void gimp_transform_region_cubic (TileManager *orig_tiles,
gint v2,
const GimpMatrix3 *m,
gint alpha,
gboolean supersample,
gint recursion_level,
const guchar *bg_color,
GimpProgress *progress);
......@@ -102,7 +100,6 @@ static void gimp_transform_region_lanczos (TileManager *orig_tiles,
gint v2,
const GimpMatrix3 *m,
gint alpha,
gboolean supersample,
gint recursion_level,
const guchar *bg_color,
GimpProgress *progress);
......@@ -180,7 +177,6 @@ gimp_transform_region (GimpPickable *pickable,
gint dest_y2,
const GimpMatrix3 *matrix,
GimpInterpolationType interpolation_type,
gboolean supersample,
gint recursion_level,
GimpProgress *progress)
{
......@@ -259,7 +255,7 @@ gimp_transform_region (GimpPickable *pickable,
gimp_transform_region_linear (orig_tiles, destPR,
dest_x1, dest_y1, dest_x2, dest_y2,
u1, v1, u2, v2,
&m, alpha, supersample, recursion_level,
&m, alpha, recursion_level,
bg_color, progress);
break;
......@@ -267,7 +263,7 @@ gimp_transform_region (GimpPickable *pickable,
gimp_transform_region_cubic (orig_tiles, destPR,
dest_x1, dest_y1, dest_x2, dest_y2,
u1, v1, u2, v2,