Accept file names with dashes in PNG-to-C converter.
Tango icon files often have dashes in their names so accept them in png2c conversion script and simply replace them with underscores to form a C identifier for the array containing the image data. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -23,7 +23,7 @@ if len(sys.argv) < 2:
|
|||||||
r = re.compile("^([a-zA-Z._][a-zA-Z._0-9]*)[.][pP][nN][gG]$")
|
r = re.compile("^([a-zA-Z._][a-zA-Z._0-9]*)[.][pP][nN][gG]$")
|
||||||
|
|
||||||
for path in sys.argv[1:]:
|
for path in sys.argv[1:]:
|
||||||
filename = os.path.basename(path)
|
filename = os.path.basename(path).replace('-','_')
|
||||||
m = r.match(filename)
|
m = r.match(filename)
|
||||||
# Allow only filenames that make sense
|
# Allow only filenames that make sense
|
||||||
# as C variable names
|
# as C variable names
|
||||||
|
Reference in New Issue
Block a user