From 16fa029b2844f38c73a02d9be502481e69b77d5d Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Mon, 12 Mar 2001 01:21:43 +0000 Subject: [PATCH] pixmaps/Makefile.am new pixmap. "Someone" needs to go over the pixmaps one 2001-03-12 Michael Natterer * pixmaps/Makefile.am * pixmaps/edit.xpm: new pixmap. "Someone" needs to go over the pixmaps one day ;) * app/gimpdatafactoryview.c * app/gimpdrawablelistview.c: use the new icon. * app/floating_sel.c: stupid: the new gimp_layer_get_opacity() accessor speaks in normalized [0.0..1.0] values, so the floating selection was invisible after blindly using it. * app/gimpimage.c: more stupid: a totally useless sanity clamping made the composite preview ugly. Fixed. * app/tools/tool_manager.c: why the heck did this never crash before: don't dereference a NULL GDisplay pointer. --- ChangeLog | 19 +++++++++++ app/core/gimpimage-guides.c | 17 +++++---- app/core/gimpimage-merge.c | 17 +++++---- app/core/gimpimage-projection.c | 17 +++++---- app/core/gimpimage-resize.c | 17 +++++---- app/core/gimpimage-scale.c | 17 +++++---- app/core/gimpimage.c | 17 +++++---- app/core/gimplayer-floating-sel.c | 4 +-- app/core/gimpprojection-construct.c | 17 +++++---- app/floating_sel.c | 4 +-- app/gimpdatafactoryview.c | 4 +-- app/gimpdrawablelistview.c | 4 +-- app/gimpimage.c | 17 +++++---- app/tools/tool_manager.c | 3 +- app/widgets/gimpdatafactoryview.c | 4 +-- app/widgets/gimpdrawablelistview.c | 4 +-- app/widgets/gimpdrawabletreeview.c | 4 +-- app/widgets/gimpitemlistview.c | 4 +-- app/widgets/gimpitemtreeview.c | 4 +-- pixmaps/Makefile.am | 1 + pixmaps/edit.xpm | 53 +++++++++++++++++++++++++++++ 21 files changed, 157 insertions(+), 91 deletions(-) create mode 100644 pixmaps/edit.xpm diff --git a/ChangeLog b/ChangeLog index ef7b8997b1..a86116c8ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2001-03-12 Michael Natterer + + * pixmaps/Makefile.am + * pixmaps/edit.xpm: new pixmap. "Someone" needs to go over the + pixmaps one day ;) + + * app/gimpdatafactoryview.c + * app/gimpdrawablelistview.c: use the new icon. + + * app/floating_sel.c: stupid: the new gimp_layer_get_opacity() + accessor speaks in normalized [0.0..1.0] values, so the + floating selection was invisible after blindly using it. + + * app/gimpimage.c: more stupid: a totally useless sanity clamping + made the composite preview ugly. Fixed. + + * app/tools/tool_manager.c: why the heck did this never crash before: + don't dereference a NULL GDisplay pointer. + 2001-03-11 Seth Burgess * app/tools/Makefile.am diff --git a/app/core/gimpimage-guides.c b/app/core/gimpimage-guides.c index 124fe36aba..fc4a09e5cd 100644 --- a/app/core/gimpimage-guides.c +++ b/app/core/gimpimage-guides.c @@ -3911,9 +3911,6 @@ gimp_image_get_new_preview (GimpViewable *viewable, w = (gint) RINT (ratio * gimp_drawable_width (GIMP_DRAWABLE (layer))); h = (gint) RINT (ratio * gimp_drawable_height (GIMP_DRAWABLE (layer))); - w = MAX (1, width); - h = MAX (1, height); - x1 = CLAMP (x, 0, width); y1 = CLAMP (y, 0, height); x2 = CLAMP (x + w, 0, width); @@ -3925,8 +3922,8 @@ gimp_image_get_new_preview (GimpViewable *viewable, src1PR.w = (x2 - x1); src1PR.h = (y2 - y1); src1PR.rowstride = comp->width * src1PR.bytes; - src1PR.data = - temp_buf_data (comp) + y1 * src1PR.rowstride + x1 * src1PR.bytes; + src1PR.data = (temp_buf_data (comp) + + y1 * src1PR.rowstride + x1 * src1PR.bytes); layer_buf = gimp_viewable_get_preview (GIMP_VIEWABLE (layer), w, h); src2PR.bytes = layer_buf->bytes; @@ -3935,8 +3932,9 @@ gimp_image_get_new_preview (GimpViewable *viewable, src2PR.x = src1PR.x; src2PR.y = src1PR.y; src2PR.rowstride = layer_buf->width * src2PR.bytes; - src2PR.data = temp_buf_data (layer_buf) + - (y1 - y) * src2PR.rowstride + (x1 - x) * src2PR.bytes; + src2PR.data = (temp_buf_data (layer_buf) + + (y1 - y) * src2PR.rowstride + + (x1 - x) * src2PR.bytes); if (layer->mask && layer->mask->apply_mask) { @@ -3944,8 +3942,9 @@ gimp_image_get_new_preview (GimpViewable *viewable, w, h); maskPR.bytes = mask_buf->bytes; maskPR.rowstride = mask_buf->width; - maskPR.data = mask_buf_data (mask_buf) + - (y1 - y) * maskPR.rowstride + (x1 - x) * maskPR.bytes; + maskPR.data = (mask_buf_data (mask_buf) + + (y1 - y) * maskPR.rowstride + + (x1 - x) * maskPR.bytes); mask = &maskPR; } else diff --git a/app/core/gimpimage-merge.c b/app/core/gimpimage-merge.c index 124fe36aba..fc4a09e5cd 100644 --- a/app/core/gimpimage-merge.c +++ b/app/core/gimpimage-merge.c @@ -3911,9 +3911,6 @@ gimp_image_get_new_preview (GimpViewable *viewable, w = (gint) RINT (ratio * gimp_drawable_width (GIMP_DRAWABLE (layer))); h = (gint) RINT (ratio * gimp_drawable_height (GIMP_DRAWABLE (layer))); - w = MAX (1, width); - h = MAX (1, height); - x1 = CLAMP (x, 0, width); y1 = CLAMP (y, 0, height); x2 = CLAMP (x + w, 0, width); @@ -3925,8 +3922,8 @@ gimp_image_get_new_preview (GimpViewable *viewable, src1PR.w = (x2 - x1); src1PR.h = (y2 - y1); src1PR.rowstride = comp->width * src1PR.bytes; - src1PR.data = - temp_buf_data (comp) + y1 * src1PR.rowstride + x1 * src1PR.bytes; + src1PR.data = (temp_buf_data (comp) + + y1 * src1PR.rowstride + x1 * src1PR.bytes); layer_buf = gimp_viewable_get_preview (GIMP_VIEWABLE (layer), w, h); src2PR.bytes = layer_buf->bytes; @@ -3935,8 +3932,9 @@ gimp_image_get_new_preview (GimpViewable *viewable, src2PR.x = src1PR.x; src2PR.y = src1PR.y; src2PR.rowstride = layer_buf->width * src2PR.bytes; - src2PR.data = temp_buf_data (layer_buf) + - (y1 - y) * src2PR.rowstride + (x1 - x) * src2PR.bytes; + src2PR.data = (temp_buf_data (layer_buf) + + (y1 - y) * src2PR.rowstride + + (x1 - x) * src2PR.bytes); if (layer->mask && layer->mask->apply_mask) { @@ -3944,8 +3942,9 @@ gimp_image_get_new_preview (GimpViewable *viewable, w, h); maskPR.bytes = mask_buf->bytes; maskPR.rowstride = mask_buf->width; - maskPR.data = mask_buf_data (mask_buf) + - (y1 - y) * maskPR.rowstride + (x1 - x) * maskPR.bytes; + maskPR.data = (mask_buf_data (mask_buf) + + (y1 - y) * maskPR.rowstride + + (x1 - x) * maskPR.bytes); mask = &maskPR; } else diff --git a/app/core/gimpimage-projection.c b/app/core/gimpimage-projection.c index 124fe36aba..fc4a09e5cd 100644 --- a/app/core/gimpimage-projection.c +++ b/app/core/gimpimage-projection.c @@ -3911,9 +3911,6 @@ gimp_image_get_new_preview (GimpViewable *viewable, w = (gint) RINT (ratio * gimp_drawable_width (GIMP_DRAWABLE (layer))); h = (gint) RINT (ratio * gimp_drawable_height (GIMP_DRAWABLE (layer))); - w = MAX (1, width); - h = MAX (1, height); - x1 = CLAMP (x, 0, width); y1 = CLAMP (y, 0, height); x2 = CLAMP (x + w, 0, width); @@ -3925,8 +3922,8 @@ gimp_image_get_new_preview (GimpViewable *viewable, src1PR.w = (x2 - x1); src1PR.h = (y2 - y1); src1PR.rowstride = comp->width * src1PR.bytes; - src1PR.data = - temp_buf_data (comp) + y1 * src1PR.rowstride + x1 * src1PR.bytes; + src1PR.data = (temp_buf_data (comp) + + y1 * src1PR.rowstride + x1 * src1PR.bytes); layer_buf = gimp_viewable_get_preview (GIMP_VIEWABLE (layer), w, h); src2PR.bytes = layer_buf->bytes; @@ -3935,8 +3932,9 @@ gimp_image_get_new_preview (GimpViewable *viewable, src2PR.x = src1PR.x; src2PR.y = src1PR.y; src2PR.rowstride = layer_buf->width * src2PR.bytes; - src2PR.data = temp_buf_data (layer_buf) + - (y1 - y) * src2PR.rowstride + (x1 - x) * src2PR.bytes; + src2PR.data = (temp_buf_data (layer_buf) + + (y1 - y) * src2PR.rowstride + + (x1 - x) * src2PR.bytes); if (layer->mask && layer->mask->apply_mask) { @@ -3944,8 +3942,9 @@ gimp_image_get_new_preview (GimpViewable *viewable, w, h); maskPR.bytes = mask_buf->bytes; maskPR.rowstride = mask_buf->width; - maskPR.data = mask_buf_data (mask_buf) + - (y1 - y) * maskPR.rowstride + (x1 - x) * maskPR.bytes; + maskPR.data = (mask_buf_data (mask_buf) + + (y1 - y) * maskPR.rowstride + + (x1 - x) * maskPR.bytes); mask = &maskPR; } else diff --git a/app/core/gimpimage-resize.c b/app/core/gimpimage-resize.c index 124fe36aba..fc4a09e5cd 100644 --- a/app/core/gimpimage-resize.c +++ b/app/core/gimpimage-resize.c @@ -3911,9 +3911,6 @@ gimp_image_get_new_preview (GimpViewable *viewable, w = (gint) RINT (ratio * gimp_drawable_width (GIMP_DRAWABLE (layer))); h = (gint) RINT (ratio * gimp_drawable_height (GIMP_DRAWABLE (layer))); - w = MAX (1, width); - h = MAX (1, height); - x1 = CLAMP (x, 0, width); y1 = CLAMP (y, 0, height); x2 = CLAMP (x + w, 0, width); @@ -3925,8 +3922,8 @@ gimp_image_get_new_preview (GimpViewable *viewable, src1PR.w = (x2 - x1); src1PR.h = (y2 - y1); src1PR.rowstride = comp->width * src1PR.bytes; - src1PR.data = - temp_buf_data (comp) + y1 * src1PR.rowstride + x1 * src1PR.bytes; + src1PR.data = (temp_buf_data (comp) + + y1 * src1PR.rowstride + x1 * src1PR.bytes); layer_buf = gimp_viewable_get_preview (GIMP_VIEWABLE (layer), w, h); src2PR.bytes = layer_buf->bytes; @@ -3935,8 +3932,9 @@ gimp_image_get_new_preview (GimpViewable *viewable, src2PR.x = src1PR.x; src2PR.y = src1PR.y; src2PR.rowstride = layer_buf->width * src2PR.bytes; - src2PR.data = temp_buf_data (layer_buf) + - (y1 - y) * src2PR.rowstride + (x1 - x) * src2PR.bytes; + src2PR.data = (temp_buf_data (layer_buf) + + (y1 - y) * src2PR.rowstride + + (x1 - x) * src2PR.bytes); if (layer->mask && layer->mask->apply_mask) { @@ -3944,8 +3942,9 @@ gimp_image_get_new_preview (GimpViewable *viewable, w, h); maskPR.bytes = mask_buf->bytes; maskPR.rowstride = mask_buf->width; - maskPR.data = mask_buf_data (mask_buf) + - (y1 - y) * maskPR.rowstride + (x1 - x) * maskPR.bytes; + maskPR.data = (mask_buf_data (mask_buf) + + (y1 - y) * maskPR.rowstride + + (x1 - x) * maskPR.bytes); mask = &maskPR; } else diff --git a/app/core/gimpimage-scale.c b/app/core/gimpimage-scale.c index 124fe36aba..fc4a09e5cd 100644 --- a/app/core/gimpimage-scale.c +++ b/app/core/gimpimage-scale.c @@ -3911,9 +3911,6 @@ gimp_image_get_new_preview (GimpViewable *viewable, w = (gint) RINT (ratio * gimp_drawable_width (GIMP_DRAWABLE (layer))); h = (gint) RINT (ratio * gimp_drawable_height (GIMP_DRAWABLE (layer))); - w = MAX (1, width); - h = MAX (1, height); - x1 = CLAMP (x, 0, width); y1 = CLAMP (y, 0, height); x2 = CLAMP (x + w, 0, width); @@ -3925,8 +3922,8 @@ gimp_image_get_new_preview (GimpViewable *viewable, src1PR.w = (x2 - x1); src1PR.h = (y2 - y1); src1PR.rowstride = comp->width * src1PR.bytes; - src1PR.data = - temp_buf_data (comp) + y1 * src1PR.rowstride + x1 * src1PR.bytes; + src1PR.data = (temp_buf_data (comp) + + y1 * src1PR.rowstride + x1 * src1PR.bytes); layer_buf = gimp_viewable_get_preview (GIMP_VIEWABLE (layer), w, h); src2PR.bytes = layer_buf->bytes; @@ -3935,8 +3932,9 @@ gimp_image_get_new_preview (GimpViewable *viewable, src2PR.x = src1PR.x; src2PR.y = src1PR.y; src2PR.rowstride = layer_buf->width * src2PR.bytes; - src2PR.data = temp_buf_data (layer_buf) + - (y1 - y) * src2PR.rowstride + (x1 - x) * src2PR.bytes; + src2PR.data = (temp_buf_data (layer_buf) + + (y1 - y) * src2PR.rowstride + + (x1 - x) * src2PR.bytes); if (layer->mask && layer->mask->apply_mask) { @@ -3944,8 +3942,9 @@ gimp_image_get_new_preview (GimpViewable *viewable, w, h); maskPR.bytes = mask_buf->bytes; maskPR.rowstride = mask_buf->width; - maskPR.data = mask_buf_data (mask_buf) + - (y1 - y) * maskPR.rowstride + (x1 - x) * maskPR.bytes; + maskPR.data = (mask_buf_data (mask_buf) + + (y1 - y) * maskPR.rowstride + + (x1 - x) * maskPR.bytes); mask = &maskPR; } else diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c index 124fe36aba..fc4a09e5cd 100644 --- a/app/core/gimpimage.c +++ b/app/core/gimpimage.c @@ -3911,9 +3911,6 @@ gimp_image_get_new_preview (GimpViewable *viewable, w = (gint) RINT (ratio * gimp_drawable_width (GIMP_DRAWABLE (layer))); h = (gint) RINT (ratio * gimp_drawable_height (GIMP_DRAWABLE (layer))); - w = MAX (1, width); - h = MAX (1, height); - x1 = CLAMP (x, 0, width); y1 = CLAMP (y, 0, height); x2 = CLAMP (x + w, 0, width); @@ -3925,8 +3922,8 @@ gimp_image_get_new_preview (GimpViewable *viewable, src1PR.w = (x2 - x1); src1PR.h = (y2 - y1); src1PR.rowstride = comp->width * src1PR.bytes; - src1PR.data = - temp_buf_data (comp) + y1 * src1PR.rowstride + x1 * src1PR.bytes; + src1PR.data = (temp_buf_data (comp) + + y1 * src1PR.rowstride + x1 * src1PR.bytes); layer_buf = gimp_viewable_get_preview (GIMP_VIEWABLE (layer), w, h); src2PR.bytes = layer_buf->bytes; @@ -3935,8 +3932,9 @@ gimp_image_get_new_preview (GimpViewable *viewable, src2PR.x = src1PR.x; src2PR.y = src1PR.y; src2PR.rowstride = layer_buf->width * src2PR.bytes; - src2PR.data = temp_buf_data (layer_buf) + - (y1 - y) * src2PR.rowstride + (x1 - x) * src2PR.bytes; + src2PR.data = (temp_buf_data (layer_buf) + + (y1 - y) * src2PR.rowstride + + (x1 - x) * src2PR.bytes); if (layer->mask && layer->mask->apply_mask) { @@ -3944,8 +3942,9 @@ gimp_image_get_new_preview (GimpViewable *viewable, w, h); maskPR.bytes = mask_buf->bytes; maskPR.rowstride = mask_buf->width; - maskPR.data = mask_buf_data (mask_buf) + - (y1 - y) * maskPR.rowstride + (x1 - x) * maskPR.bytes; + maskPR.data = (mask_buf_data (mask_buf) + + (y1 - y) * maskPR.rowstride + + (x1 - x) * maskPR.bytes); mask = &maskPR; } else diff --git a/app/core/gimplayer-floating-sel.c b/app/core/gimplayer-floating-sel.c index 47d4c2ed42..f5a348727c 100644 --- a/app/core/gimplayer-floating-sel.c +++ b/app/core/gimplayer-floating-sel.c @@ -472,8 +472,8 @@ floating_sel_composite (GimpLayer *layer, */ gimp_image_apply_image (gimage, layer->fs.drawable, &fsPR, undo, - gimp_layer_get_opacity (layer), - gimp_layer_get_mode (layer), + layer->opacity, + layer->mode, NULL, (x1 - offx), (y1 - offy)); diff --git a/app/core/gimpprojection-construct.c b/app/core/gimpprojection-construct.c index 124fe36aba..fc4a09e5cd 100644 --- a/app/core/gimpprojection-construct.c +++ b/app/core/gimpprojection-construct.c @@ -3911,9 +3911,6 @@ gimp_image_get_new_preview (GimpViewable *viewable, w = (gint) RINT (ratio * gimp_drawable_width (GIMP_DRAWABLE (layer))); h = (gint) RINT (ratio * gimp_drawable_height (GIMP_DRAWABLE (layer))); - w = MAX (1, width); - h = MAX (1, height); - x1 = CLAMP (x, 0, width); y1 = CLAMP (y, 0, height); x2 = CLAMP (x + w, 0, width); @@ -3925,8 +3922,8 @@ gimp_image_get_new_preview (GimpViewable *viewable, src1PR.w = (x2 - x1); src1PR.h = (y2 - y1); src1PR.rowstride = comp->width * src1PR.bytes; - src1PR.data = - temp_buf_data (comp) + y1 * src1PR.rowstride + x1 * src1PR.bytes; + src1PR.data = (temp_buf_data (comp) + + y1 * src1PR.rowstride + x1 * src1PR.bytes); layer_buf = gimp_viewable_get_preview (GIMP_VIEWABLE (layer), w, h); src2PR.bytes = layer_buf->bytes; @@ -3935,8 +3932,9 @@ gimp_image_get_new_preview (GimpViewable *viewable, src2PR.x = src1PR.x; src2PR.y = src1PR.y; src2PR.rowstride = layer_buf->width * src2PR.bytes; - src2PR.data = temp_buf_data (layer_buf) + - (y1 - y) * src2PR.rowstride + (x1 - x) * src2PR.bytes; + src2PR.data = (temp_buf_data (layer_buf) + + (y1 - y) * src2PR.rowstride + + (x1 - x) * src2PR.bytes); if (layer->mask && layer->mask->apply_mask) { @@ -3944,8 +3942,9 @@ gimp_image_get_new_preview (GimpViewable *viewable, w, h); maskPR.bytes = mask_buf->bytes; maskPR.rowstride = mask_buf->width; - maskPR.data = mask_buf_data (mask_buf) + - (y1 - y) * maskPR.rowstride + (x1 - x) * maskPR.bytes; + maskPR.data = (mask_buf_data (mask_buf) + + (y1 - y) * maskPR.rowstride + + (x1 - x) * maskPR.bytes); mask = &maskPR; } else diff --git a/app/floating_sel.c b/app/floating_sel.c index 47d4c2ed42..f5a348727c 100644 --- a/app/floating_sel.c +++ b/app/floating_sel.c @@ -472,8 +472,8 @@ floating_sel_composite (GimpLayer *layer, */ gimp_image_apply_image (gimage, layer->fs.drawable, &fsPR, undo, - gimp_layer_get_opacity (layer), - gimp_layer_get_mode (layer), + layer->opacity, + layer->mode, NULL, (x1 - offx), (y1 - offy)); diff --git a/app/gimpdatafactoryview.c b/app/gimpdatafactoryview.c index c85ea43cb8..498223333e 100644 --- a/app/gimpdatafactoryview.c +++ b/app/gimpdatafactoryview.c @@ -45,7 +45,7 @@ #include "pixmaps/delete.xpm" #include "pixmaps/duplicate.xpm" #include "pixmaps/new.xpm" -#include "pixmaps/pennorm.xpm" +#include "pixmaps/edit.xpm" #include "pixmaps/refresh.xpm" @@ -182,7 +182,7 @@ gimp_data_factory_view_init (GimpDataFactoryView *view) GTK_SIGNAL_FUNC (gimp_data_factory_view_edit_clicked), view); - pixmap = gimp_pixmap_new (pennorm_xpm); + pixmap = gimp_pixmap_new (edit_xpm); gtk_container_add (GTK_CONTAINER (view->edit_button), pixmap); gtk_widget_show (pixmap); diff --git a/app/gimpdrawablelistview.c b/app/gimpdrawablelistview.c index ae2851c8eb..dacafa9d53 100644 --- a/app/gimpdrawablelistview.c +++ b/app/gimpdrawablelistview.c @@ -45,7 +45,7 @@ #include "pixmaps/lower.xpm" #include "pixmaps/duplicate.xpm" #include "pixmaps/new.xpm" -#include "pixmaps/pennorm.xpm" +#include "pixmaps/edit.xpm" static void gimp_drawable_list_view_class_init (GimpDrawableListViewClass *klass); @@ -245,7 +245,7 @@ gimp_drawable_list_view_init (GimpDrawableListView *view) GTK_SIGNAL_FUNC (gimp_drawable_list_view_edit_clicked), view); - pixmap = gimp_pixmap_new (pennorm_xpm); + pixmap = gimp_pixmap_new (edit_xpm); gtk_container_add (GTK_CONTAINER (view->edit_button), pixmap); gtk_widget_show (pixmap); diff --git a/app/gimpimage.c b/app/gimpimage.c index 124fe36aba..fc4a09e5cd 100644 --- a/app/gimpimage.c +++ b/app/gimpimage.c @@ -3911,9 +3911,6 @@ gimp_image_get_new_preview (GimpViewable *viewable, w = (gint) RINT (ratio * gimp_drawable_width (GIMP_DRAWABLE (layer))); h = (gint) RINT (ratio * gimp_drawable_height (GIMP_DRAWABLE (layer))); - w = MAX (1, width); - h = MAX (1, height); - x1 = CLAMP (x, 0, width); y1 = CLAMP (y, 0, height); x2 = CLAMP (x + w, 0, width); @@ -3925,8 +3922,8 @@ gimp_image_get_new_preview (GimpViewable *viewable, src1PR.w = (x2 - x1); src1PR.h = (y2 - y1); src1PR.rowstride = comp->width * src1PR.bytes; - src1PR.data = - temp_buf_data (comp) + y1 * src1PR.rowstride + x1 * src1PR.bytes; + src1PR.data = (temp_buf_data (comp) + + y1 * src1PR.rowstride + x1 * src1PR.bytes); layer_buf = gimp_viewable_get_preview (GIMP_VIEWABLE (layer), w, h); src2PR.bytes = layer_buf->bytes; @@ -3935,8 +3932,9 @@ gimp_image_get_new_preview (GimpViewable *viewable, src2PR.x = src1PR.x; src2PR.y = src1PR.y; src2PR.rowstride = layer_buf->width * src2PR.bytes; - src2PR.data = temp_buf_data (layer_buf) + - (y1 - y) * src2PR.rowstride + (x1 - x) * src2PR.bytes; + src2PR.data = (temp_buf_data (layer_buf) + + (y1 - y) * src2PR.rowstride + + (x1 - x) * src2PR.bytes); if (layer->mask && layer->mask->apply_mask) { @@ -3944,8 +3942,9 @@ gimp_image_get_new_preview (GimpViewable *viewable, w, h); maskPR.bytes = mask_buf->bytes; maskPR.rowstride = mask_buf->width; - maskPR.data = mask_buf_data (mask_buf) + - (y1 - y) * maskPR.rowstride + (x1 - x) * maskPR.bytes; + maskPR.data = (mask_buf_data (mask_buf) + + (y1 - y) * maskPR.rowstride + + (x1 - x) * maskPR.bytes); mask = &maskPR; } else diff --git a/app/tools/tool_manager.c b/app/tools/tool_manager.c index f808b4b113..cfe3651b77 100644 --- a/app/tools/tool_manager.c +++ b/app/tools/tool_manager.c @@ -150,7 +150,8 @@ tool_manager_initialize_tool (GimpTool *tool, /* FIXME: remove tool param */ gimp_tool_initialize (active_tool, gdisp); - active_tool->drawable = gimp_image_active_drawable (gdisp->gimage); + if (gdisp) + active_tool->drawable = gimp_image_active_drawable (gdisp->gimage); /* don't set tool->gdisp here! (see commands.c) */ } diff --git a/app/widgets/gimpdatafactoryview.c b/app/widgets/gimpdatafactoryview.c index c85ea43cb8..498223333e 100644 --- a/app/widgets/gimpdatafactoryview.c +++ b/app/widgets/gimpdatafactoryview.c @@ -45,7 +45,7 @@ #include "pixmaps/delete.xpm" #include "pixmaps/duplicate.xpm" #include "pixmaps/new.xpm" -#include "pixmaps/pennorm.xpm" +#include "pixmaps/edit.xpm" #include "pixmaps/refresh.xpm" @@ -182,7 +182,7 @@ gimp_data_factory_view_init (GimpDataFactoryView *view) GTK_SIGNAL_FUNC (gimp_data_factory_view_edit_clicked), view); - pixmap = gimp_pixmap_new (pennorm_xpm); + pixmap = gimp_pixmap_new (edit_xpm); gtk_container_add (GTK_CONTAINER (view->edit_button), pixmap); gtk_widget_show (pixmap); diff --git a/app/widgets/gimpdrawablelistview.c b/app/widgets/gimpdrawablelistview.c index ae2851c8eb..dacafa9d53 100644 --- a/app/widgets/gimpdrawablelistview.c +++ b/app/widgets/gimpdrawablelistview.c @@ -45,7 +45,7 @@ #include "pixmaps/lower.xpm" #include "pixmaps/duplicate.xpm" #include "pixmaps/new.xpm" -#include "pixmaps/pennorm.xpm" +#include "pixmaps/edit.xpm" static void gimp_drawable_list_view_class_init (GimpDrawableListViewClass *klass); @@ -245,7 +245,7 @@ gimp_drawable_list_view_init (GimpDrawableListView *view) GTK_SIGNAL_FUNC (gimp_drawable_list_view_edit_clicked), view); - pixmap = gimp_pixmap_new (pennorm_xpm); + pixmap = gimp_pixmap_new (edit_xpm); gtk_container_add (GTK_CONTAINER (view->edit_button), pixmap); gtk_widget_show (pixmap); diff --git a/app/widgets/gimpdrawabletreeview.c b/app/widgets/gimpdrawabletreeview.c index ae2851c8eb..dacafa9d53 100644 --- a/app/widgets/gimpdrawabletreeview.c +++ b/app/widgets/gimpdrawabletreeview.c @@ -45,7 +45,7 @@ #include "pixmaps/lower.xpm" #include "pixmaps/duplicate.xpm" #include "pixmaps/new.xpm" -#include "pixmaps/pennorm.xpm" +#include "pixmaps/edit.xpm" static void gimp_drawable_list_view_class_init (GimpDrawableListViewClass *klass); @@ -245,7 +245,7 @@ gimp_drawable_list_view_init (GimpDrawableListView *view) GTK_SIGNAL_FUNC (gimp_drawable_list_view_edit_clicked), view); - pixmap = gimp_pixmap_new (pennorm_xpm); + pixmap = gimp_pixmap_new (edit_xpm); gtk_container_add (GTK_CONTAINER (view->edit_button), pixmap); gtk_widget_show (pixmap); diff --git a/app/widgets/gimpitemlistview.c b/app/widgets/gimpitemlistview.c index ae2851c8eb..dacafa9d53 100644 --- a/app/widgets/gimpitemlistview.c +++ b/app/widgets/gimpitemlistview.c @@ -45,7 +45,7 @@ #include "pixmaps/lower.xpm" #include "pixmaps/duplicate.xpm" #include "pixmaps/new.xpm" -#include "pixmaps/pennorm.xpm" +#include "pixmaps/edit.xpm" static void gimp_drawable_list_view_class_init (GimpDrawableListViewClass *klass); @@ -245,7 +245,7 @@ gimp_drawable_list_view_init (GimpDrawableListView *view) GTK_SIGNAL_FUNC (gimp_drawable_list_view_edit_clicked), view); - pixmap = gimp_pixmap_new (pennorm_xpm); + pixmap = gimp_pixmap_new (edit_xpm); gtk_container_add (GTK_CONTAINER (view->edit_button), pixmap); gtk_widget_show (pixmap); diff --git a/app/widgets/gimpitemtreeview.c b/app/widgets/gimpitemtreeview.c index ae2851c8eb..dacafa9d53 100644 --- a/app/widgets/gimpitemtreeview.c +++ b/app/widgets/gimpitemtreeview.c @@ -45,7 +45,7 @@ #include "pixmaps/lower.xpm" #include "pixmaps/duplicate.xpm" #include "pixmaps/new.xpm" -#include "pixmaps/pennorm.xpm" +#include "pixmaps/edit.xpm" static void gimp_drawable_list_view_class_init (GimpDrawableListViewClass *klass); @@ -245,7 +245,7 @@ gimp_drawable_list_view_init (GimpDrawableListView *view) GTK_SIGNAL_FUNC (gimp_drawable_list_view_edit_clicked), view); - pixmap = gimp_pixmap_new (pennorm_xpm); + pixmap = gimp_pixmap_new (edit_xpm); gtk_container_add (GTK_CONTAINER (view->edit_button), pixmap); gtk_widget_show (pixmap); diff --git a/pixmaps/Makefile.am b/pixmaps/Makefile.am index dc251ecff7..ce4d1d3903 100644 --- a/pixmaps/Makefile.am +++ b/pixmaps/Makefile.am @@ -7,6 +7,7 @@ EXTRA_DIST = \ default.xpm \ delete.xpm \ duplicate.xpm \ + edit.xpm \ eek.xpm \ eye.xbm \ first.xpm \ diff --git a/pixmaps/edit.xpm b/pixmaps/edit.xpm new file mode 100644 index 0000000000..49224c658b --- /dev/null +++ b/pixmaps/edit.xpm @@ -0,0 +1,53 @@ +/* XPM */ +static char * edit_xpm[] = { +"16 16 34 1", +" c None", +". c #000000", +"+ c #FFFFFF", +"@ c #F0F0F0", +"# c #F6F6F6", +"$ c #CCCCCC", +"% c #F5F5F5", +"& c #F7F7F7", +"* c #F9F9F9", +"= c #EEEEEE", +"- c #E6E6E6", +"; c #DDDDDD", +"> c #DBDBDB", +", c #F2F2F2", +"' c #FAFAFA", +") c #666666", +"! c #F8F8F8", +"~ c #E7E7E7", +"{ c #F3F3F3", +"] c #EFEFEF", +"^ c #E1E1E1", +"/ c #D8D8D8", +"( c #F4F4F4", +"_ c #EBEBEB", +": c #DFDFDF", +"< c #E8E8E8", +"[ c #E5E5E5", +"} c #DADADA", +"| c #C9C9C9", +"1 c #D3D3D3", +"2 c #D2D2D2", +"3 c #CDCDCD", +"4 c #C7C7C7", +"5 c #BDBDBD", +" .. ", +" .+..", +" ........+...", +" ..@++++.++.. ", +" .+.#+++.++.. ", +" .+$.%&*.++.. ", +".....=+.++.. ", +".=-;>,'.+... ", +".++@++....). ", +".++!++..~-). ", +".+#%&{]~^/). ", +".+(#%_-:>/). ", +".+<[~^}/$|). ", +".+^;>12345). ", +".$))))))))). ", +"............ "};