mirror of
https://github.com/fltk/fltk.git
synced 2026-09-28 15:55:22 +08:00
Introduced new Fl_Native_File_Chooser option USE_FILTER_EXT.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9825 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -116,7 +116,8 @@ public:
|
||||
NO_OPTIONS = 0x0000, ///< no options enabled
|
||||
SAVEAS_CONFIRM = 0x0001, ///< Show native 'Save As' overwrite confirm dialog (if supported)
|
||||
NEW_FOLDER = 0x0002, ///< Show 'New Folder' icon (if supported)
|
||||
PREVIEW = 0x0004 ///< enable preview mode
|
||||
PREVIEW = 0x0004, ///< enable preview mode
|
||||
USE_FILTER_EXT = 0x0008 ///< Chooser filter pilots the output file extension
|
||||
};
|
||||
/** Localizable message */
|
||||
static const char *file_exists_message;
|
||||
|
||||
@@ -621,9 +621,11 @@ int Fl_Native_File_Chooser::post() {
|
||||
char *t = prepareMacFilter(_filt_total, _filter, _filt_patt);
|
||||
popup = createPopupAccessory((NSSavePanel*)_panel, t, [[(NSSavePanel*)_panel nameFieldLabel] UTF8String], _filt_value);
|
||||
delete[] t;
|
||||
[popup setAction:@selector(changedPopup:)];
|
||||
[popup setTarget:saveDelegate];
|
||||
[saveDelegate panel:(NSSavePanel*)_panel];
|
||||
if (_options & USE_FILTER_EXT) {
|
||||
[popup setAction:@selector(changedPopup:)];
|
||||
[popup setTarget:saveDelegate];
|
||||
[saveDelegate panel:(NSSavePanel*)_panel];
|
||||
}
|
||||
[(NSSavePanel*)_panel setCanSelectHiddenExtension:YES];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user