git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37659
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
- Added <disabled> XRC tag for wxToolBar elements and <bg> for wxToolBar itself.
- Fixed centering of top level windows on secondary displays.
- Implemented wxDisplay::GetFromWindow() for platforms other than MSW.
- Added <disabled> XRC tag for wxToolBar elements and <bg> for wxToolBar itself.
- Fixed centering of top level windows on secondary displays.
- Implemented wxDisplay::GetFromWindow() for platforms other than MSW.
+- More than one filter allowed in in wxDocTemplate filter.
#include "wx/confbase.h"
#include "wx/file.h"
#include "wx/cmdproc.h"
#include "wx/confbase.h"
#include "wx/file.h"
#include "wx/cmdproc.h"
#include <stdio.h>
#include <string.h>
#include <stdio.h>
#include <string.h>
// that of the template
bool wxDocTemplate::FileMatchesTemplate(const wxString& path)
{
// that of the template
bool wxDocTemplate::FileMatchesTemplate(const wxString& path)
{
+ wxStringTokenizer parser (GetFileFilter(), wxT(";"));
+ wxString anything = wxT ("*");
+ while (parser.HasMoreTokens())
+ {
+ wxString filter = parser.GetNextToken();
+ wxString filterExt = FindExtension (filter);
+ if ( filter.IsSameAs (anything) ||
+ filterExt.IsSameAs (anything) ||
+ filterExt.IsSameAs (FindExtension (path)) )
+ return true;
+ }
return GetDefaultExtension().IsSameAs(FindExtension(path));
}
return GetDefaultExtension().IsSameAs(FindExtension(path));
}