Commit 54caf4fb authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

don't disable image previews when layer previews are disabled. We do not

2007-06-11  Sven Neumann  <sven@gimp.org>

	* 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.


svn path=/trunk/; revision=22756
parent 3ce6de2b
2007-06-11 Sven Neumann <sven@gimp.org>
* 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 <sven@gimp.org>
 
* plug-ins/twain/twain.c (run): moved run_mode initialisation up a
......@@ -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 " \
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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)
{
......
......@@ -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));
......
......@@ -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)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment