From 6fde8226fa1e415678cce6e2ab47a163dad0e441 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Fri, 3 Jun 2011 16:08:42 +0000 Subject: Mac OS: allow internationalization of file dialogs. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8776 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Native_File_Chooser_MAC.mm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Fl_Native_File_Chooser_MAC.mm b/src/Fl_Native_File_Chooser_MAC.mm index 80e3b4901..e96a9c2c6 100644 --- a/src/Fl_Native_File_Chooser_MAC.mm +++ b/src/Fl_Native_File_Chooser_MAC.mm @@ -40,6 +40,7 @@ #include #include +#include #include // FREE PATHNAMES ARRAY, IF IT HAS ANY CONTENTS @@ -543,10 +544,10 @@ int Fl_Native_File_Chooser::post() { NSPopUpButton *popup = nil; if (_filt_total) { char *t = prepareMacFilter(_filt_total, _filter, _filt_patt); - popup = createPopupAccessory((NSSavePanel*)_panel, t, "Enable:", 0); + popup = createPopupAccessory((NSSavePanel*)_panel, t, Fl_File_Chooser::show_label, 0); delete[] t; [[popup menu] addItem:[NSMenuItem separatorItem]]; - [popup addItemWithTitle:@"All Documents"]; + [popup addItemWithTitle:[[NSString alloc] initWithUTF8String:Fl_File_Chooser::all_files_label]]; [popup setAction:@selector(validateVisibleColumns)]; [popup setTarget:(NSObject*)_panel]; static FLopenDelegate *openDelegate = nil; @@ -604,7 +605,7 @@ int Fl_Native_File_Chooser::post() { if (_directory && !dir) dir = [[NSString alloc] initWithUTF8String:_directory]; if (_filt_total) { char *t = prepareMacFilter(_filt_total, _filter, _filt_patt); - popup = createPopupAccessory((NSSavePanel*)_panel, t, "Format:", _filt_value); + popup = createPopupAccessory((NSSavePanel*)_panel, t, [[(NSSavePanel*)_panel nameFieldLabel] UTF8String], _filt_value); delete[] t; } retval = [(NSSavePanel*)_panel runModalForDirectory:dir file:fname]; -- cgit v1.2.3