diff --git a/ChangeLog b/ChangeLog index 31ef6fdeb7..b39fdbb53f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2007-06-11 Sven Neumann + + * app/core/gimpimage-preview.c: don't disable image previews when + layer previews are disabled. We do not any longer create the image + preview from the layer previews. + + * app/core/gimpimagefile.c + * app/widgets/gimpthumbbox.c + * tools/pdbgen/pdb/image.pdb: thumbnail rendering is not any + longer disabled if layer previews are turned off. + + * app/config/gimprc-blurbs.h (THUMBNAIL_SIZE_BLURB): removed note + that has become invalid by the change above. + + * app/core/gimpitem-preview.c: cosmetics. + + * app/pdb/image_cmds.c: regenerated. + 2007-06-11 Sven Neumann * plug-ins/twain/twain.c (run): moved run_mode initialisation up a diff --git a/app/config/gimprc-blurbs.h b/app/config/gimprc-blurbs.h index ac03f592d4..724fa73552 100644 --- a/app/config/gimprc-blurbs.h +++ b/app/config/gimprc-blurbs.h @@ -376,8 +376,7 @@ N_("Sets the folder for temporary storage. Files will appear here " \ "Sets the theme search path." #define THUMBNAIL_SIZE_BLURB \ -N_("Sets the size of the thumbnail shown in the Open dialog. Note that " \ - "GIMP can not create thumbnails if layer previews are disabled.") +N_("Sets the size of the thumbnail shown in the Open dialog.") #define THUMBNAIL_FILESIZE_LIMIT_BLURB \ N_("The thumbnail in the Open dialog will be automatically updated " \ diff --git a/app/core/gimpimage-preview.c b/app/core/gimpimage-preview.c index 0d43518209..f54cd2cc13 100644 --- a/app/core/gimpimage-preview.c +++ b/app/core/gimpimage-preview.c @@ -28,9 +28,6 @@ #include "paint-funcs/scale-funcs.h" -#include "config/gimpcoreconfig.h" - -#include "gimp.h" #include "gimpimage.h" #include "gimpimage-preview.h" #include "gimpprojection.h" @@ -46,13 +43,6 @@ gimp_image_get_preview_size (GimpViewable *viewable, { GimpImage *image = GIMP_IMAGE (viewable); - if (! image->gimp->config->layer_previews && ! is_popup) - { - *width = size; - *height = size; - return; - } - gimp_viewable_calc_preview_size (image->width, image->height, size, @@ -75,9 +65,6 @@ gimp_image_get_popup_size (GimpViewable *viewable, { GimpImage *image = GIMP_IMAGE (viewable); - if (! image->gimp->config->layer_previews) - return FALSE; - if (image->width > width || image->height > height) { gboolean scaling_up; @@ -111,9 +98,6 @@ gimp_image_get_preview (GimpViewable *viewable, { GimpImage *image = GIMP_IMAGE (viewable); - if (! image->gimp->config->layer_previews) - return NULL; - if (image->preview && image->preview->width == width && image->preview->height == height) @@ -151,9 +135,6 @@ gimp_image_get_new_preview (GimpViewable *viewable, gint bytes; gint subsample; - if (! image->gimp->config->layer_previews) - return NULL; - scale_x = (gdouble) width / (gdouble) image->width; scale_y = (gdouble) height / (gdouble) image->height; diff --git a/app/core/gimpimagefile.c b/app/core/gimpimagefile.c index d68fb917ba..da8f9c8b31 100644 --- a/app/core/gimpimagefile.c +++ b/app/core/gimpimagefile.c @@ -222,9 +222,6 @@ gimp_imagefile_create_thumbnail (GimpImagefile *imagefile, g_return_if_fail (GIMP_IS_CONTEXT (context)); g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress)); - if (! imagefile->gimp->config->layer_previews) - return; - if (size < 1) return; @@ -316,9 +313,6 @@ gimp_imagefile_create_thumbnail_weak (GimpImagefile *imagefile, g_return_if_fail (GIMP_IS_IMAGEFILE (imagefile)); - if (! imagefile->gimp->config->layer_previews) - return; - if (size < 1) return; diff --git a/app/core/gimpitem-preview.c b/app/core/gimpitem-preview.c index 2ba8d89356..4fbb518e13 100644 --- a/app/core/gimpitem-preview.c +++ b/app/core/gimpitem-preview.c @@ -44,11 +44,8 @@ gimp_item_get_preview_size (GimpViewable *viewable, gint *width, gint *height) { - GimpItem *item; - GimpImage *image; - - item = GIMP_ITEM (viewable); - image = gimp_item_get_image (item); + GimpItem *item = GIMP_ITEM (viewable); + GimpImage *image = gimp_item_get_image (item); if (image && ! image->gimp->config->layer_previews && ! is_popup) { @@ -91,11 +88,8 @@ gimp_item_get_popup_size (GimpViewable *viewable, gint *popup_width, gint *popup_height) { - GimpItem *item; - GimpImage *image; - - item = GIMP_ITEM (viewable); - image = gimp_item_get_image (item); + GimpItem *item = GIMP_ITEM (viewable); + GimpImage *image = gimp_item_get_image (item); if (image && ! image->gimp->config->layer_previews) return FALSE; diff --git a/app/pdb/image_cmds.c b/app/pdb/image_cmds.c index 8795db20e7..c2103ecbe4 100644 --- a/app/pdb/image_cmds.c +++ b/app/pdb/image_cmds.c @@ -1552,14 +1552,8 @@ image_thumbnail_invoker (GimpProcedure *procedure, else width = MAX (1, (height * dwidth) / dheight); - if (image->gimp->config->layer_previews) - buf = gimp_viewable_get_new_preview (GIMP_VIEWABLE (image), context, - width, height); - else - buf = gimp_viewable_get_dummy_preview (GIMP_VIEWABLE (image), - width, height, - gimp_image_has_alpha (image) ? - 4 : 3); + buf = gimp_viewable_get_new_preview (GIMP_VIEWABLE (image), context, + width, height); if (buf) { diff --git a/app/widgets/gimpthumbbox.c b/app/widgets/gimpthumbbox.c index 51174e91b0..a0d6fdd2c8 100644 --- a/app/widgets/gimpthumbbox.c +++ b/app/widgets/gimpthumbbox.c @@ -554,8 +554,7 @@ gimp_thumb_box_create_thumbnails (GimpThumbBox *box, gint n_uris; gint i; - if (gimp->config->thumbnail_size == GIMP_THUMBNAIL_SIZE_NONE || - ! gimp->config->layer_previews) + if (gimp->config->thumbnail_size == GIMP_THUMBNAIL_SIZE_NONE) return; toplevel = gtk_widget_get_toplevel (GTK_WIDGET (box)); diff --git a/tools/pdbgen/pdb/image.pdb b/tools/pdbgen/pdb/image.pdb index 7741314700..5ac64f41b1 100644 --- a/tools/pdbgen/pdb/image.pdb +++ b/tools/pdbgen/pdb/image.pdb @@ -2508,14 +2508,8 @@ HELP else width = MAX (1, (height * dwidth) / dheight); - if (image->gimp->config->layer_previews) - buf = gimp_viewable_get_new_preview (GIMP_VIEWABLE (image), context, - width, height); - else - buf = gimp_viewable_get_dummy_preview (GIMP_VIEWABLE (image), - width, height, - gimp_image_has_alpha (image) ? - 4 : 3); + buf = gimp_viewable_get_new_preview (GIMP_VIEWABLE (image), context, + width, height); if (buf) {