mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
dtstyle: backdrops, allow jpg/png if motif supports it
add file extensions to all types but .pm/.bm. This lets XmGetPixmap() load them.
This commit is contained in:
parent
2ea057d511
commit
066adcac5e
1 changed files with 12 additions and 3 deletions
|
@ -737,12 +737,21 @@ ReadBitmapDirectory(
|
||||||
filep = readdir(dirp);
|
filep = readdir(dirp);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* strip suffix off filename */
|
|
||||||
name = (char *) XtMalloc(strlen(filep->d_name) + 1);
|
name = (char *) XtMalloc(strlen(filep->d_name) + 1);
|
||||||
strcpy (name, filep->d_name);
|
strcpy (name, filep->d_name);
|
||||||
(void)strtok(name, ".");
|
|
||||||
|
/* strip suffix off filename if it's a .pm or .bm
|
||||||
|
* motif requires other formats like jpg, png etc to
|
||||||
|
* have the extension on to work with the XmGetPixmap() calls */
|
||||||
|
if(strlen(name) > 3
|
||||||
|
&& (0 == strcmp(name + strlen(name) - 3, ".pm")
|
||||||
|
|| 0 == strcmp(name + strlen(name) - 3, ".bm")))
|
||||||
|
{
|
||||||
|
(void)strtok(name, ".");
|
||||||
|
}
|
||||||
|
|
||||||
|
fprintf(stderr, "'%s'\n", name);
|
||||||
|
|
||||||
/* check for duplicates */
|
/* check for duplicates */
|
||||||
duplicate = 0;
|
duplicate = 0;
|
||||||
|
|
Loading…
Reference in a new issue