Skip to content

Commit

Permalink
Improve Clarity Regarding Deleting Multiple Places for Files
Browse files Browse the repository at this point in the history
  • Loading branch information
da3dsoul committed Jan 14, 2024
1 parent 04a2944 commit 293f1d6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Shoko.Desktop/Forms/DeleteFilesForm.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ void DeleteFilesForm_Closing(object sender, CancelEventArgs e)

void btnOK_Click(object sender, RoutedEventArgs e)
{
string msg = string.Format(Commons.Properties.Resources.DeleteFiles_Confirm, vids.Count);
string msg = string.Format(Commons.Properties.Resources.DeleteFiles_Confirm, vids.SelectMany(a => a.Places).Count());
MessageBoxResult res = MessageBox.Show(msg, Commons.Properties.Resources.Confirm, MessageBoxButton.YesNo, MessageBoxImage.Warning);

if (res == MessageBoxResult.Yes)
Expand Down
6 changes: 1 addition & 5 deletions Shoko.Desktop/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ public enum TAB_Settings
private static Timer postStartTimer;

public static VM_GroupFilter groupFilterVM;
public static List<UserCulture> userLanguages = new List<UserCulture>();
public static ImageDownloader imageHelper;

private VM_AnimeGroup_User groupBeforeChanges;
Expand All @@ -124,10 +123,8 @@ public enum TAB_Settings
private readonly object lockPlaylistsTab = new object();
private readonly object lockBookmarksTab = new object();
private readonly object lockServerTab = new object();
private readonly object lockUtilitiesTab = new object();
private readonly object lockSettingsTab = new object();
private readonly object lockPinnedTab = new object();
private readonly object lockDownloadsTab = new object();
private readonly object lockSearchTab = new object();

public static VideoHandler videoHandler = new VideoHandler();
Expand All @@ -139,6 +136,7 @@ public MainWindow()
{
AppSettings.LoadSettings();
logger.Info("App startup - Loaded settings");
AppSettings.DebugSettingsToLog();

InitializeComponent();

Expand Down Expand Up @@ -166,8 +164,6 @@ public MainWindow()
{
UnhandledExceptionManager.AddHandler();

//AppSettings.DebugSettingsToLog();

if (AppSettings.AutoStartLocalJMMServer)
Utils.StartJMMServer();

Expand Down
7 changes: 4 additions & 3 deletions Shoko.Desktop/UserControls/MultipleFilesDetailControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:usercontrols="clr-namespace:Shoko.Desktop.UserControls"
xmlns:local="clr-namespace:Shoko.Desktop.ViewModel.Server"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<UserControl.Resources>
Expand All @@ -16,7 +17,7 @@
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>

<!-- VideoDetailedTemplate -->
<DataTemplate x:Key="VideoDetailedTemplate">
<DataTemplate x:Key="VideoDetailedTemplate" DataType="{x:Type local:VM_VideoDetailed}">
<Grid Margin="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
Expand Down Expand Up @@ -143,8 +144,8 @@
<TextBlock Text="{Binding Path=FullPath}"/>
</TextBlock.ToolTip>
</TextBlock>


<TextBlock Text="{Binding Path=PlaceCount}" VerticalAlignment="Center" Margin="5,0,0,0" />
<TextBlock Text=" File(s)" VerticalAlignment="Center" />
</StackPanel>

</Grid>
Expand Down
2 changes: 2 additions & 0 deletions Shoko.Desktop/ViewModel/Server/VM_VideoDetailed.cs
Original file line number Diff line number Diff line change
Expand Up @@ -240,5 +240,7 @@ public List<IListWrapper> GetDirectChildren()
public int ObjectType => 5;
[JsonIgnore, XmlIgnore]
public bool IsEditable => false;

[JsonIgnore, XmlIgnore] public int PlaceCount => Places.Count;
}
}

0 comments on commit 293f1d6

Please sign in to comment.