Avoids loading PNG Starter if SVG with the same name exists.
This commit is contained in:
parent
41390989bc
commit
18758d51da
2 changed files with 19 additions and 2 deletions
|
|
@ -27,6 +27,7 @@ $Id$
|
||||||
* Other Improvements:
|
* Other Improvements:
|
||||||
-------------------
|
-------------------
|
||||||
* Starter images can be in SVG format.
|
* Starter images can be in SVG format.
|
||||||
|
(Avoids loading PNG if SVG with the same name exists.)
|
||||||
|
|
||||||
* Widened dialog windows, to help avoid word-wrap and overlap problems
|
* Widened dialog windows, to help avoid word-wrap and overlap problems
|
||||||
with some prompts, in some locales.
|
with some prompts, in some locales.
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
(See COPYING.txt)
|
(See COPYING.txt)
|
||||||
|
|
||||||
June 14, 2002 - August 17, 2009
|
June 14, 2002 - September 1, 2009
|
||||||
$Id$
|
$Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -17975,7 +17975,7 @@ int do_new_dialog(void)
|
||||||
if (strcasestr(f->d_name, FNAME_EXTENSION) != NULL
|
if (strcasestr(f->d_name, FNAME_EXTENSION) != NULL
|
||||||
/* Support legacy BMP files for load: */
|
/* Support legacy BMP files for load: */
|
||||||
|| strcasestr(f->d_name, ".bmp") != NULL
|
|| strcasestr(f->d_name, ".bmp") != NULL
|
||||||
#ifndef NO_SVG
|
#ifndef NOSVG
|
||||||
|| strcasestr(f->d_name, ".svg") != NULL
|
|| strcasestr(f->d_name, ".svg") != NULL
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
|
|
@ -17985,6 +17985,22 @@ int do_new_dialog(void)
|
||||||
{
|
{
|
||||||
strcpy((char *) strcasestr(fname, FNAME_EXTENSION), "");
|
strcpy((char *) strcasestr(fname, FNAME_EXTENSION), "");
|
||||||
d_exts[num_files] = strdup(FNAME_EXTENSION);
|
d_exts[num_files] = strdup(FNAME_EXTENSION);
|
||||||
|
|
||||||
|
#ifndef NOSVG
|
||||||
|
/* Found a PNG; but if identically-named SVG exists, skip it */
|
||||||
|
if (1)
|
||||||
|
{
|
||||||
|
char svgname[512];
|
||||||
|
FILE * fi;
|
||||||
|
|
||||||
|
sprintf(svgname, "%s/%s.svg", dirname[place], fname);
|
||||||
|
fi = fopen(svgname, "r");
|
||||||
|
if (fi != NULL) {
|
||||||
|
fclose(fi);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasestr(fname, ".bmp") != NULL)
|
if (strcasestr(fname, ".bmp") != NULL)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue