]> git.saurik.com Git - wxWidgets.git/commitdiff
Accept file names with dashes in PNG-to-C converter.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 31 Dec 2010 17:38:29 +0000 (17:38 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 31 Dec 2010 17:38:29 +0000 (17:38 +0000)
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

misc/scripts/png2c.py

index f02820177188b8d40ab20509067049d7ec2b7d74..29d7252bad97cfcca0666890869090293e1a9f99 100755 (executable)
@@ -23,7 +23,7 @@ if len(sys.argv) < 2:
 r = re.compile("^([a-zA-Z._][a-zA-Z._0-9]*)[.][pP][nN][gG]$")
 
 for path in sys.argv[1:]:
-        filename = os.path.basename(path)
+        filename = os.path.basename(path).replace('-','_')
         m = r.match(filename)
         # Allow only filenames that make sense
         # as C variable names