Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit fb4b7ca

Browse files
committed
Removed unnecessary param
1 parent 93b3d28 commit fb4b7ca

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

engine/src/desktop-ans.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ int MCA_folder(MCStringRef p_title, MCStringRef p_prompt, MCStringRef p_initial,
6060
MCPlatformWindowRef t_owner;
6161
t_owner = compute_sheet_owner(p_options);
6262

63-
MCPlatformBeginFolderOrFileDialog(kMCPlatformFileDialogKindFolder, t_owner, p_title, p_prompt, nil, 1, p_initial, false);
63+
MCPlatformBeginFolderOrFileDialog(kMCPlatformFileDialogKindFolder, t_owner, p_title, p_prompt, nil, 1, p_initial);
6464

6565
MCPlatformDialogResult t_result;
6666
MCAutoStringRef t_folder;
@@ -158,7 +158,7 @@ int MCA_file(MCStringRef p_title, MCStringRef p_prompt, MCStringRef p_filter, MC
158158
else
159159
t_kind = kMCPlatformFileDialogKindOpen;
160160

161-
MCPlatformBeginFolderOrFileDialog(t_kind, t_owner, p_title, p_prompt, *t_types, t_types . Count(), p_initial, true);
161+
MCPlatformBeginFolderOrFileDialog(t_kind, t_owner, p_title, p_prompt, *t_types, t_types . Count(), p_initial);
162162

163163
MCPlatformDialogResult t_result;
164164
MCAutoStringRef t_file, t_type;
@@ -191,7 +191,7 @@ int MCA_file_with_types(MCStringRef p_title, MCStringRef p_prompt, MCStringRef *
191191
else
192192
t_kind = kMCPlatformFileDialogKindOpen;
193193

194-
MCPlatformBeginFolderOrFileDialog(t_kind, t_owner, p_title, p_prompt, p_types, p_type_count, p_initial, true);
194+
MCPlatformBeginFolderOrFileDialog(t_kind, t_owner, p_title, p_prompt, p_types, p_type_count, p_initial);
195195

196196
MCPlatformDialogResult t_result;
197197
MCAutoStringRef t_file, t_type;
@@ -227,7 +227,7 @@ int MCA_ask_file(MCStringRef p_title, MCStringRef p_prompt, MCStringRef p_filter
227227
MCPlatformWindowRef t_owner;
228228
t_owner = compute_sheet_owner(p_options);
229229

230-
MCPlatformBeginFolderOrFileDialog(kMCPlatformFileDialogKindSave, t_owner, p_title, p_prompt, *t_types, t_types . Count(), p_initial, true);
230+
MCPlatformBeginFolderOrFileDialog(kMCPlatformFileDialogKindSave, t_owner, p_title, p_prompt, *t_types, t_types . Count(), p_initial);
231231

232232
MCPlatformDialogResult t_result;
233233
MCAutoStringRef t_file, t_type;
@@ -254,7 +254,7 @@ int MCA_ask_file_with_types(MCStringRef p_title, MCStringRef p_prompt, MCStringR
254254
MCPlatformWindowRef t_owner;
255255
t_owner = compute_sheet_owner(p_options);
256256

257-
MCPlatformBeginFolderOrFileDialog(kMCPlatformFileDialogKindSave, t_owner, p_title, p_prompt, p_types, p_type_count, p_initial, true);
257+
MCPlatformBeginFolderOrFileDialog(kMCPlatformFileDialogKindSave, t_owner, p_title, p_prompt, p_types, p_type_count, p_initial);
258258

259259
MCPlatformDialogResult t_result;
260260
MCAutoStringRef t_file, t_type;

engine/src/mac-dialog.mm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ - (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename
563563

564564
////////////////////////////////////////////////////////////////////////////////
565565

566-
void MCPlatformBeginFolderOrFileDialog(MCPlatformFileDialogKind p_kind, MCPlatformWindowRef p_owner, MCStringRef p_title, MCStringRef p_prompt, MCStringRef *p_types, uint4 p_type_count, MCStringRef p_initial, bool p_is_file)
566+
void MCPlatformBeginFolderOrFileDialog(MCPlatformFileDialogKind p_kind, MCPlatformWindowRef p_owner, MCStringRef p_title, MCStringRef p_prompt, MCStringRef *p_types, uint4 p_type_count, MCStringRef p_initial)
567567
{
568568
MCAutoStringRef t_initial_folder;
569569
if (p_initial != nil)
@@ -599,7 +599,7 @@ void MCPlatformBeginFolderOrFileDialog(MCPlatformFileDialogKind p_kind, MCPlatfo
599599
[t_panel setTitle: [NSString stringWithMCStringRef: p_prompt]];
600600
}
601601

602-
if (p_is_file)
602+
if (p_kind != kMCPlatformFileDialogKindFolder)
603603
{
604604
// MW-2014-07-17: [[ Bug 12826 ]] If we have at least one type, add a delegate. Only add as
605605
// an accessory view if more than one type.
@@ -638,7 +638,7 @@ void MCPlatformBeginFolderOrFileDialog(MCPlatformFileDialogKind p_kind, MCPlatfo
638638
[t_panel setAccessoryViewDisclosed: YES];
639639
}
640640

641-
MCMacPlatformBeginOpenSaveDialog(p_owner, t_panel, *t_initial_folder, p_is_file ? *t_initial_file : nil);
641+
MCMacPlatformBeginOpenSaveDialog(p_owner, t_panel, *t_initial_folder, p_kind != kMCPlatformFileDialogKindFolder ? *t_initial_file : nil);
642642
}
643643

644644
MCPlatformDialogResult MCPlatformEndFileDialog(MCPlatformFileDialogKind p_kind, MCStringRef &r_paths, MCStringRef &r_type)

engine/src/platform.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,7 @@ enum MCPlatformFileDialogKind
942942
kMCPlatformFileDialogKindFolder,
943943
};
944944

945-
void MCPlatformBeginFolderOrFileDialog(MCPlatformFileDialogKind p_kind, MCPlatformWindowRef p_owner, MCStringRef p_title, MCStringRef p_prompt, MCStringRef *p_types, uint4 p_type_count, MCStringRef p_initial, bool p_is_file);
945+
void MCPlatformBeginFolderOrFileDialog(MCPlatformFileDialogKind p_kind, MCPlatformWindowRef p_owner, MCStringRef p_title, MCStringRef p_prompt, MCStringRef *p_types, uint4 p_type_count, MCStringRef p_initial);
946946
MCPlatformDialogResult MCPlatformEndFolderDialog(MCStringRef & r_selected_folder);
947947

948948

0 commit comments

Comments
 (0)