Update of /cvsroot/wxdevcenter/wxDevCenter/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22985/src
Modified Files:
Application.cpp
Log Message:
Fix icon loading system.
Little bug in name construction.
Index: Application.cpp
===================================================================
RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Application.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** Application.cpp 11 Aug 2005 11:02:47 -0000 1.27
--- Application.cpp 12 Aug 2005 10:05:32 -0000 1.28
***************
*** 427,431 ****
long l;
wxIconBundle IB;
! wxString strPathRoot;
wxArrayString arFiles;
--- 427,431 ----
long l;
wxIconBundle IB;
! wxString strPathRoot, strPath, strName;
wxArrayString arFiles;
***************
*** 435,444 ****
strPathRoot << wxT("/icons/") << strIcon;
strPathRoot.Replace(wxT("\\"), wxT("/"));
!
! if(wxDir::Exists(strPathRoot))
{
! wxDir::GetAllFiles(strPathRoot.BeforeLast(wxT('/')), &arFiles, strPathRoot.AfterLast(wxT('/')) + wxT("*.gif"), wxDIR_FILES);
! wxDir::GetAllFiles(strPathRoot.BeforeLast(wxT('/')), &arFiles, strPathRoot.AfterLast(wxT('/')) + wxT("*.png"), wxDIR_FILES);
! wxDir::GetAllFiles(strPathRoot.BeforeLast(wxT('/')), &arFiles, strPathRoot.AfterLast(wxT('/')) + wxT(".ico"), wxDIR_FILES);
}
}
--- 435,445 ----
strPathRoot << wxT("/icons/") << strIcon;
strPathRoot.Replace(wxT("\\"), wxT("/"));
! strPath = strPathRoot.BeforeLast(wxT('/'));
! strName = strPathRoot.AfterLast(wxT('/'));
! if(wxDir::Exists(strPath))
{
! wxDir::GetAllFiles(strPath, &arFiles, strName + wxT("*.gif"), wxDIR_FILES);
! wxDir::GetAllFiles(strPath, &arFiles, strName + wxT("*.png"), wxDIR_FILES);
! wxDir::GetAllFiles(strPath, &arFiles, strName + wxT(".ico"), wxDIR_FILES);
}
}
***************
*** 450,454 ****
for(unsigned int n=0; n<arFiles.GetCount(); n++)
! IB.AddIcon(arFiles[n], wxBITMAP_TYPE_ANY);
m_IconBundleCache[strIcon] = IB;
--- 451,455 ----
for(unsigned int n=0; n<arFiles.GetCount(); n++)
! IB.AddIcon(arFiles[n], wxBITMAP_TYPE_ANY);
m_IconBundleCache[strIcon] = IB;
|