- }
- else if ( inSelector == kNavCBStart )
- {
- if ( data->menuitems )
- NavCustomControl(ioParams->context, kNavCtlSelectCustomType, &(*data->menuitems)[data->currentfilter]);
- }
- else if ( inSelector == kNavCBPopupMenuSelect )
- {
- NavMenuItemSpec * menu = (NavMenuItemSpec *) ioParams->eventData.eventDataParms.param ;
- if ( menu->menuCreator == 'WXNG' )
- {
- data->currentfilter = menu->menuType ;
- if ( data->saveMode )
- {
- int i = menu->menuType ;
- wxString extension = data->extensions[i].AfterLast('.') ;
- extension.MakeLower() ;
- Str255 filename ;
- // get the current filename
- NavCustomControl(ioParams->context, kNavCtlGetEditFileName, &filename);
- CopyPascalStringToC( filename , (char*) filename ) ;
- wxString sfilename( filename ) ;
- int pos = sfilename.Find('.',TRUE) ;
- if ( pos != wxNOT_FOUND )
- {
- sfilename = sfilename.Left(pos+1)+extension ;
- CopyCStringToPascal( sfilename.c_str() , filename ) ;
- NavCustomControl(ioParams->context, kNavCtlSetEditFileName, &filename);
- }
- }
- }
- }
+ }
+ else if ( inSelector == kNavCBStart )
+ {
+ if ( data->menuitems )
+ NavCustomControl(ioParams->context, kNavCtlSelectCustomType, &(*data->menuitems)[data->currentfilter]);
+ }
+ else if ( inSelector == kNavCBPopupMenuSelect )
+ {
+ NavMenuItemSpec * menu = (NavMenuItemSpec *) ioParams->eventData.eventDataParms.param ;
+ if ( menu->menuCreator == 'WXNG' )
+ {
+ data->currentfilter = menu->menuType ;
+ if ( data->saveMode )
+ {
+ int i = menu->menuType ;
+ wxString extension = data->extensions[i].AfterLast('.') ;
+ extension.MakeLower() ;
+ Str255 filename ;
+ // get the current filename
+ NavCustomControl(ioParams->context, kNavCtlGetEditFileName, &filename);
+ wxString sfilename = wxMacMakeStringFromPascal( filename ) ;
+ int pos = sfilename.Find('.',TRUE) ;
+ if ( pos != wxNOT_FOUND )
+ {
+ sfilename = sfilename.Left(pos+1)+extension ;
+ wxMacStringToPascal( sfilename , filename ) ;
+ NavCustomControl(ioParams->context, kNavCtlSetEditFileName, &filename);
+ }
+ }
+ }
+ }