Author: manolo
Date: 2011-06-03 09:08:42 -0700 (Fri, 03 Jun 2011)
New Revision: 8776
Log:
Mac OS: allow internationalization of file dialogs.
Modified:
branches/branch-1.3/src/Fl_Native_File_Chooser_MAC.mm
Modified: branches/branch-1.3/src/Fl_Native_File_Chooser_MAC.mm
===================================================================
--- branches/branch-1.3/src/Fl_Native_File_Chooser_MAC.mm 2011-06-03
14:07:52 UTC (rev 8775)
+++ branches/branch-1.3/src/Fl_Native_File_Chooser_MAC.mm 2011-06-03
16:08:42 UTC (rev 8776)
@@ -40,6 +40,7 @@
#include <FL/Fl.H>
#include <FL/Fl_Native_File_Chooser.H>
+#include <FL/Fl_File_Chooser.H>
#include <FL/filename.H>
// FREE PATHNAMES ARRAY, IF IT HAS ANY CONTENTS
@@ -543,10 +544,10 @@
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 @@
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];
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit