fixed an issue where the page selection dialog was being shown even for

2007-04-25  Mukund Sivaraman  <muks@mukund.org>

        * plug-ins/common/tiff.c: fixed an issue where the page selection
        dialog was being shown even for non-interactive runs.


svn path=/trunk/; revision=22315
This commit is contained in:
Mukund Sivaraman 2007-04-24 18:58:02 +00:00 committed by Mukund Sivaraman
parent 70fe65b8d0
commit 3a229d3631
2 changed files with 14 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2007-04-25 Mukund Sivaraman <muks@mukund.org>
* plug-ins/common/tiff.c: fixed an issue where the page selection
dialog was being shown even for non-interactive runs.
2007-04-24 Mukund Sivaraman <muks@mukund.org>
* plug-ins/common/tiff.c: added support to load multi-page TIFF

View File

@ -580,6 +580,14 @@ load_dialog (const gchar *filename, TiffSelectedPages *pages)
pages->n_pages = TIFFNumberOfDirectories (tif);
/* Return early if we're not running interactively */
if (run_mode != GIMP_RUN_INTERACTIVE)
{
pages->pages = g_new0 (gint, pages->n_pages);
return TRUE;
}
/* Return early if there are zero or one `pages' in the TIFF image */
@ -592,8 +600,7 @@ load_dialog (const gchar *filename, TiffSelectedPages *pages)
else if (pages->n_pages == 1)
{
target = GIMP_PAGE_SELECTOR_TARGET_IMAGES;
pages->pages = g_new (gint, 1);
*(pages->pages) = 0;
pages->pages = g_new0 (gint, pages->n_pages);
return TRUE;
}