diff options
author | marc_culler <marc.culler@gmail.com> | 2020-12-24 15:39:50 (GMT) |
---|---|---|
committer | marc_culler <marc.culler@gmail.com> | 2020-12-24 15:39:50 (GMT) |
commit | b1d20c88a8509d4ca5668a5a34a6eafc24981aa7 (patch) | |
tree | 76acedd187107dda2c7b45521b2c570dd59874c6 /macosx/tkMacOSXDialog.c | |
parent | 03782bd19d736532b9ae90ac43a1543cc7ac134e (diff) | |
download | tk-b1d20c88a8509d4ca5668a5a34a6eafc24981aa7.zip tk-b1d20c88a8509d4ca5668a5a34a6eafc24981aa7.tar.gz tk-b1d20c88a8509d4ca5668a5a34a6eafc24981aa7.tar.bz2 |
Fix [6157a8c4ca]: -filetypes does not work on macOS file dialogs
Diffstat (limited to 'macosx/tkMacOSXDialog.c')
-rw-r--r-- | macosx/tkMacOSXDialog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c index 52b6e99..89035ab 100644 --- a/macosx/tkMacOSXDialog.c +++ b/macosx/tkMacOSXDialog.c @@ -302,7 +302,6 @@ getFileURL( - (void)selectFormat:(id)sender { NSPopUpButton *button = (NSPopUpButton *)sender; filterInfo.fileTypeIndex = [button indexOfSelectedItem]; - if ([[filterInfo.fileTypeAllowsAll objectAtIndex:filterInfo.fileTypeIndex] boolValue]) { [openpanel setAllowsOtherFileTypes:YES]; @@ -799,6 +798,7 @@ Tk_GetOpenFileObjCmd( [label setBezeled:NO]; [label setDrawsBackground:NO]; [popupButton addItemsWithTitles:filterInfo.fileTypeLabels]; + [popupButton setTarget:NSApp]; [popupButton setAction:@selector(selectFormat:)]; [accessoryView addSubview:label]; [accessoryView addSubview:popupButton]; @@ -1084,8 +1084,8 @@ Tk_GetSaveFileObjCmd( [popupButton addItemsWithTitles:filterInfo.fileTypeLabels]; [popupButton selectItemAtIndex:filterInfo.fileTypeIndex]; + [popupButton setTarget:NSApp]; [popupButton setAction:@selector(saveFormat:)]; - [accessoryView addSubview:label]; [accessoryView addSubview:popupButton]; |