Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv6523/src/gui
Modified Files:
wxIconManager.cpp
Log Message:
also look for icons in lower-cased files, otherwise icons for the MIME types
are not found
Index: wxIconManager.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxIconManager.cpp,v
retrieving revision 1.110
retrieving revision 1.111
diff -b -u -2 -r1.110 -r1.111
--- wxIconManager.cpp 16 Jan 2006 20:32:27 -0000 1.110
+++ wxIconManager.cpp 24 Aug 2006 19:46:08 -0000 1.111
@@ -557,5 +557,4 @@
// next step: try to load the icon files .png,.xpm,.gif:
- bool found = false;
if(m_GlobalDir.Length())
{
@@ -563,4 +562,6 @@
#ifdef M_TOP_SOURCEDIR
+ // look in the source directory to make it possible to use the program
+ // without installing it
pf.AddPaths(String(M_TOP_SOURCEDIR) + _T("/src/icons"));
#endif // M_TOP_SOURCEDIR
@@ -581,9 +582,14 @@
for ( int ext = 0; wxIconManagerFileExtensions[ext]; ext++ )
{
- // Use iconNameOrig to preserve captialisation:
- name = iconNameOrig + wxIconManagerFileExtensions[ext];
- name = pf.FindFile(name, &found);
+ // use iconNameOrig here to preserve the original case
+ name = pf.FindFile(iconNameOrig + wxIconManagerFileExtensions[ext]);
- if( found )
+ // but if it's not found, also fall back to the usual lower case
+ if ( name.empty() )
+ {
+ name = pf.FindFile(iconName + wxIconManagerFileExtensions[ext]);
+ }
+
+ if ( !name.empty() )
{
ms_IconPath = name.BeforeLast('/');
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates