Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Files.App/Dialogs/FilesystemOperationDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
xmlns:vm="using:Files.App.ViewModels.Dialogs.FileSystemDialog"
x:Name="RootDialog"
Title="{x:Bind ViewModel.Title, Mode=OneWay}"
CloseButtonText="{x:Bind ViewModel.CloseButtonText, Mode=OneWay}"
Closing="RootDialog_Closing"
CornerRadius="{StaticResource OverlayCornerRadius}"
DefaultButton="Primary"
Expand Down
6 changes: 4 additions & 2 deletions src/Files.App/Helpers/Dialog/DynamicDialogFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,10 @@ public static DynamicDialog GetFor_FileInUseDialog(List<Win32Process> lockingPro
TitleText = Strings.FileInUseDialog_Title.GetLocalizedResource(),
SubtitleText = lockingProcess.IsEmpty() ? Strings.FileInUseDialog_Text.GetLocalizedResource() :
string.Format(Strings.FileInUseByDialog_Text.GetLocalizedResource(), string.Join(", ", lockingProcess.Select(x => $"{x.AppName ?? x.Name} (PID: {x.Pid})"))),
PrimaryButtonText = "OK",
DynamicButtons = DynamicDialogButtons.Primary
PrimaryButtonText = Strings.Retry.GetLocalizedResource(),
SecondaryButtonText = Strings.Skip.GetLocalizedResource(),
CloseButtonText = Strings.SkipAll.GetLocalizedResource(),

@Josh65-2201 Josh65-2201 Jun 16, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 151 seem to be unused, Single file prompt show cancel and multi file prompt show as skip

DynamicButtons = DynamicDialogButtons.Primary | DynamicDialogButtons.Secondary | DynamicDialogButtons.Cancel
});
return dialog;
}
Expand Down
3 changes: 3 additions & 0 deletions src/Files.App/Strings/en-US/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@
<data name="Skip" xml:space="preserve">
<value>Skip</value>
</data>
<data name="SkipAll" xml:space="preserve">
<value>Skip all</value>
</data>
Comment on lines +168 to +170

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seem to be unused, Single file prompt show cancel and multi file prompt show as skip

<data name="SelectAll" xml:space="preserve">
<value>Select all</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -857,10 +857,17 @@ private Task<DialogResult> GetFileInUseDialog(IEnumerable<string> source, IEnume
? Strings.FileInUseDialog_Text.GetLocalizedResource()
: string.Format(Strings.FileInUseByDialog_Text.GetLocalizedResource(), string.Join(", ", lockingProcess.Select(x => $"{x.AppName ?? x.Name} (PID: {x.Pid})")));

return GetFileListDialog(source, titleText, subtitleText, Strings.Retry.GetLocalizedResource(), Strings.Cancel.GetLocalizedResource());
var sourceCount = source.Count();

return GetFileListDialog(
source,
titleText,
subtitleText,
Strings.Retry.GetLocalizedResource(),
sourceCount > 1 ? Strings.Skip.GetLocalizedResource() : Strings.Cancel.GetLocalizedResource());
}

private async Task<DialogResult> GetFileListDialog(IEnumerable<string> source, string titleText, string descriptionText = null, string primaryButtonText = null, string secondaryButtonText = null)
private async Task<DialogResult> GetFileListDialog(IEnumerable<string> source, string titleText, string descriptionText = null, string primaryButtonText = null, string secondaryButtonText = null, string closeButtonText = null)
{
var incomingItems = new List<BaseFileSystemDialogItemViewModel>();
List<ShellFileItem> binItems = null;
Expand All @@ -886,7 +893,7 @@ private async Task<DialogResult> GetFileListDialog(IEnumerable<string> source, s
}

var dialogViewModel = FileSystemDialogViewModel.GetDialogViewModel(
incomingItems, titleText, descriptionText, primaryButtonText, secondaryButtonText);
incomingItems, titleText, descriptionText, primaryButtonText, secondaryButtonText, closeButtonText);

var dialogService = Ioc.Default.GetRequiredService<IDialogService>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public static FileSystemDialogViewModel GetDialogViewModel(FileSystemDialogMode
return viewModel;
}

public static FileSystemDialogViewModel GetDialogViewModel(List<BaseFileSystemDialogItemViewModel> nonConflictingItems, string titleText, string descriptionText, string primaryButtonText, string secondaryButtonText)
public static FileSystemDialogViewModel GetDialogViewModel(List<BaseFileSystemDialogItemViewModel> nonConflictingItems, string titleText, string descriptionText, string primaryButtonText, string secondaryButtonText, string closeButtonText = null)
{
var viewModel = new FileSystemDialogViewModel(
new()
Expand All @@ -230,6 +230,7 @@ public static FileSystemDialogViewModel GetDialogViewModel(List<BaseFileSystemDi
Description = descriptionText,
PrimaryButtonText = primaryButtonText,
SecondaryButtonText = secondaryButtonText,
CloseButtonText = closeButtonText,
DeletePermanently = false,
IsDeletePermanentlyEnabled = false
};
Expand Down
Loading