Skip to content

Commit

Permalink
Fixed bug when closing add item dialog, fixed formatting of settings …
Browse files Browse the repository at this point in the history
…and changed link to prefixes help page.
  • Loading branch information
HerrKnarz committed Oct 29, 2024
1 parent 8a2534d commit a660b79
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 17 deletions.
5 changes: 5 additions & 0 deletions Generic/MetadataUtilities/Models/MetadataObjects.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ public MetadataObject AddNewItem(FieldType type, string prefix = "", bool enable
{
var newItem = ControlCenter.AddNewItem(type, prefix, enableTypeSelection, addToDb);

if (newItem == null)
{
return null;
}

if (this.Any(x => x.TypeAndName == newItem.TypeAndName))
{
return null;
Expand Down
4 changes: 2 additions & 2 deletions Generic/MetadataUtilities/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
//
// You can specify all the values or you can default the Build and Revision Numbers by using the '*'
// as shown below: [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.0.0")]
[assembly: AssemblyFileVersion("1.5.0.0")]
[assembly: AssemblyVersion("1.5.1.0")]
[assembly: AssemblyFileVersion("1.5.1.0")]
2 changes: 1 addition & 1 deletion Generic/MetadataUtilities/ViewModels/SettingsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public RelayCommand HelpMergingCommand

public RelayCommand HelpPrefixesCommand
=> new RelayCommand(()
=> Process.Start(new ProcessStartInfo("https://knarzwerk.de/en/playnite-extensions/metadata-utilities/other-functionality/#prefixes")));
=> Process.Start(new ProcessStartInfo("https://knarzwerk.de/en/playnite-extensions/metadata-utilities/prefixes")));

public RelayCommand HelpQuickAddCommand
=> new RelayCommand(()
Expand Down
34 changes: 21 additions & 13 deletions Generic/MetadataUtilities/Views/SettingsView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<DockPanel Margin="0,0,5,0" VerticalAlignment="Stretch">
<Label DockPanel.Dock="Top" Content="{DynamicResource LOCMetadataUtilitiesSettingsMergeRules}" />
<Label DockPanel.Dock="Top" Content="{DynamicResource LOCMetadataUtilitiesSettingsMergeRules}" Margin="0,0,0,5" />
<DockPanel VerticalAlignment="Center" DockPanel.Dock="Top" Margin="0,10,0,0">
<Button Content="&#xef00;" FontFamily="{DynamicResource FontIcoFont}" Click="ClearSearchBox" DockPanel.Dock="Right"
Margin="5,0,0,0" Padding="5,5,8,5" />
Expand Down Expand Up @@ -160,7 +160,7 @@
</StackPanel>

<DockPanel Grid.Column="1" Grid.Row="0" Margin="5,0,0,0" VerticalAlignment="Stretch">
<Label DockPanel.Dock="Top" Content="{DynamicResource LOCMetadataUtilitiesSettingsValuesToMerge}" />
<Label DockPanel.Dock="Top" Content="{DynamicResource LOCMetadataUtilitiesSettingsValuesToMerge}" Margin="0,0,0,5" />
<DataGrid Name="DgSources" ItemsSource="{Binding SourceObjectsViewSource.View}" AutoGenerateColumns="False"
DockPanel.Dock="Top" Margin="0,10,0,0" CanUserAddRows="False" HeadersVisibility="Column"
HorizontalContentAlignment="Stretch" VerticalAlignment="Stretch" ColumnWidth="*">
Expand Down Expand Up @@ -354,18 +354,26 @@
CommandParameter="{Binding SelectedItems, ElementName=LvPrefixes}" />
<Button Content="&#xEFEE;" DockPanel.Dock="Left" FontFamily="{DynamicResource FontIcoFont}"
Command="{Binding SortPrefixesCommand}" Margin="10,0,0,0" />
<Button Content="&#xEFCA;" DockPanel.Dock="Right" FontFamily="{DynamicResource FontIcoFont}" ToolTip="{DynamicResource LOCMenuHelpTitle}"
Command="{Binding HelpPrefixesCommand}" Margin="10,0,0,0" />
</DockPanel>
<CheckBox DockPanel.Dock="Top" IsChecked="{Binding Settings.PrefixControlDisplayAddButton}">
<TextBlock Text="{DynamicResource LOCMetadataUtilitiesSettingsDisplayAddButton}" TextWrapping="Wrap" />
</CheckBox>
<CheckBox DockPanel.Dock="Top" IsChecked="{Binding Settings.PrefixControlDisplayDeleteButton}" Margin="0,10,0,0">
<TextBlock Text="{DynamicResource LOCMetadataUtilitiesSettingsDisplayDeleteButton}" TextWrapping="Wrap" />
</CheckBox>
<CheckBox DockPanel.Dock="Top" IsChecked="{Binding Settings.PrefixControlConfirmDeletion}" Margin="0,10,0,0">
<TextBlock Text="{DynamicResource LOCMetadataUtilitiesSettingsConfirmDeletion}" TextWrapping="Wrap" />
</CheckBox>
<Grid DockPanel.Dock="Top">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<StackPanel>
<CheckBox IsChecked="{Binding Settings.PrefixControlDisplayAddButton}">
<TextBlock Text="{DynamicResource LOCMetadataUtilitiesSettingsDisplayAddButton}" TextWrapping="Wrap" />
</CheckBox>
<CheckBox IsChecked="{Binding Settings.PrefixControlDisplayDeleteButton}" Margin="0,10,0,0">
<TextBlock Text="{DynamicResource LOCMetadataUtilitiesSettingsDisplayDeleteButton}" TextWrapping="Wrap" />
</CheckBox>
<CheckBox IsChecked="{Binding Settings.PrefixControlConfirmDeletion}" Margin="0,10,0,0">
<TextBlock Text="{DynamicResource LOCMetadataUtilitiesSettingsConfirmDeletion}" TextWrapping="Wrap" />
</CheckBox>
</StackPanel>
<Button Content="&#xEFCA;" FontFamily="{DynamicResource FontIcoFont}" Grid.Column="1" VerticalAlignment="Top"
Command="{Binding HelpPrefixesCommand}" Margin="10,0,0,0" ToolTip="{DynamicResource LOCMenuHelpTitle}" />
</Grid>
<ListView Name="LvPrefixes" SelectionMode="Extended" DockPanel.Dock="Top" Margin="0,10,0,0"
ItemsSource="{Binding Settings.PrefixItemTypes}" HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch" VerticalAlignment="Stretch">
Expand Down
2 changes: 1 addition & 1 deletion Generic/MetadataUtilities/extension.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Id: MetadataUtilities_485ab5f0-bfb1-4c17-93cc-20d8338673be
Name: Metadata Utilities
Author: HerrKnarz
Version: 1.5.0
Version: 1.5.1
Module: MetadataUtilities.dll
Type: GenericPlugin
Icon: icon.png
Expand Down
8 changes: 8 additions & 0 deletions Manifest/HerrKnarz_MetadataUtilities.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
AddonId: MetadataUtilities_485ab5f0-bfb1-4c17-93cc-20d8338673be
Packages:
- Version: 1.5.1
RequiredApiVersion: 6.11.0
ReleaseDate: 2024-10-29
PackageUrl: https://github.com/HerrKnarz/Playnite-Extensions/releases/download/2024-10-29/MetadataUtilities_485ab5f0-bfb1-4c17-93cc-20d8338673be_1_5_1.pext
Changelog:
- Fixed error message when closing the "add new item" dialog in the metadata editor with cancel.
- Changed link to the help page for prefixes, after the documentation was updated for all the changes from the last weeks.
- Fixed formatting of some settings
- Version: 1.5.0
RequiredApiVersion: 6.11.0
ReleaseDate: 2024-10-27
Expand Down

0 comments on commit a660b79

Please sign in to comment.