choose the first extension by default, if several are specified, in the save file dialog (patch 1675781)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2007-04-07 22:13:30 +00:00
parent 58862dfa1a
commit f7aeba1cdd

View File

@ -101,7 +101,11 @@ static pascal void NavEventProc(
if ( data->saveMode )
{
int i = menu->menuType ;
wxString extension = data->extensions[i].AfterLast('.') ;
// isolate the first extension string
wxString firstExtension = data->extensions[i].BeforeFirst('|').BeforeFirst(';');
wxString extension = firstExtension.AfterLast('.') ;
extension.MakeLower() ;
wxString sfilename ;
@ -277,8 +281,8 @@ pascal Boolean CrossPlatformFilterCallback(
NavFileOrFolderInfo* theInfo = (NavFileOrFolderInfo*) info ;
if ( !theInfo->isFolder )
{
AECoerceDesc (theItem, typeFSRef, theItem);
AECoerceDesc (theItem, typeFSRef, theItem);
FSRef fsref ;
if ( AEGetDescData (theItem, &fsref, sizeof (FSRef)) == noErr )
{