<commit_before>﻿<self:StandardDialog x:Class="PackageExplorer.PackageChooserDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:self="clr-namespace:PackageExplorer" xmlns:effect="clr-namespace:GrayscaleEffect;assembly=GrayscaleEffect" xmlns:settings="clr-namespace:PackageExplorer.Properties" Title="Select Package" ShowInTaskbar="False" WindowStartupLocation="CenterOwner" Tag="{Binding LoadedCommand}" Loaded="Window_Loaded" PreviewKeyDown="Window_PreviewKeyDown" FontSize="{Binding FontSize, Source={x:Static settings:Settings.Default}, Mode=OneWay}" MinHeight="300" MinWidth="450" IsVisibleChanged="StandardDialog_IsVisibleChanged" Closing="StandardDialog_Closing" Height="{Binding PackageChooserDialogHeight, Source={x:Static settings:Settings.Default}, Mode=OneWay}" Width="{Binding PackageChooserDialogWidth, Source={x:Static settings:Settings.Default}, Mode=OneWay}" SizeChanged="OnWindowSizeChanged">

	<Window.Resources>
		<Style TargetType="{x:Type Button}" x:Key="NavigationButtonStyle">
			<Setter Property="Margin" Value="0,0,5,0" />
		</Style>

		<self:PackageInfoDownloadCountConverter x:Key="DownloadCountConverter" />
		<self:FileSizeConverter x:Key="FileSizeConverter" />

		<CollectionViewSource x:Key="PackageCollectionSource" Source="{Binding Packages}">
			<CollectionViewSource.GroupDescriptions>
				<PropertyGroupDescription PropertyName="Id" StringComparison="OrdinalIgnoreCase" />
			</CollectionViewSource.GroupDescriptions>
		</CollectionViewSource>
	</Window.Resources>

	<Grid Margin="10">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
			<RowDefinition Height="*" />
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
		</Grid.RowDefinitions>

		<Grid.ColumnDefinitions>
			<ColumnDefinition />
			<ColumnDefinition Width="Auto" />
		</Grid.ColumnDefinitions>

		<!-- change package source elements -->
		<DockPanel Grid.ColumnSpan="3" Margin="0,0,0,15" LastChildFill="True">
			<Label DockPanel.Dock="Left" Content="_Package source:" Target="{Binding ElementName=PackageSourceBox}" VerticalAlignment="Center" />
			<Button DockPanel.Dock="Right" Content="_Apply" HorizontalAlignment="Center" Padding="10,0" Command="{Binding ChangePackageSourceCommand}" CommandParameter="{Binding Text, ElementName=PackageSourceBox}" Visibility="{Binding AllowsChangingPackageSource, Converter={StaticResource boolToVis}}">
				<Button.IsEnabled>
					<MultiBinding Converter="{StaticResource andConverter}">
						<Binding Path="Text" ElementName="PackageSourceBox" Converter="{StaticResource nullToBoolConverter}" />
						<Binding Path="IsEditable" />
					</MultiBinding>
				</Button.IsEnabled>
			</Button>

			<ComboBox x:Name="PackageSourceBox" ItemsSource="{Binding PackageSources}" IsReadOnly="False" IsEditable="True" PreviewKeyDown="PackageSourceBox_PreviewKeyDown" VerticalContentAlignment="Center" Text="{Binding PackageSource, Mode=OneWay}" Margin="4,0">
				<ComboBox.IsEnabled>
					<MultiBinding Converter="{StaticResource andConverter}">
						<Binding Path="IsEditable" Mode="OneWay" /><commit_msg>Rename Apply button to Reload button. Enable the Reload button in the Plugin Manager dialog.<commit_after>﻿<self:StandardDialog x:Class="PackageExplorer.PackageChooserDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:self="clr-namespace:PackageExplorer" xmlns:effect="clr-namespace:GrayscaleEffect;assembly=GrayscaleEffect" xmlns:settings="clr-namespace:PackageExplorer.Properties" Title="Select Package" ShowInTaskbar="False" WindowStartupLocation="CenterOwner" Tag="{Binding LoadedCommand}" Loaded="Window_Loaded" PreviewKeyDown="Window_PreviewKeyDown" FontSize="{Binding FontSize, Source={x:Static settings:Settings.Default}, Mode=OneWay}" MinHeight="300" MinWidth="450" IsVisibleChanged="StandardDialog_IsVisibleChanged" Closing="StandardDialog_Closing" Height="{Binding PackageChooserDialogHeight, Source={x:Static settings:Settings.Default}, Mode=OneWay}" Width="{Binding PackageChooserDialogWidth, Source={x:Static settings:Settings.Default}, Mode=OneWay}" SizeChanged="OnWindowSizeChanged">

	<Window.Resources>
		<Style TargetType="{x:Type Button}" x:Key="NavigationButtonStyle">
			<Setter Property="Margin" Value="0,0,5,0" />
		</Style>

		<self:PackageInfoDownloadCountConverter x:Key="DownloadCountConverter" />
		<self:FileSizeConverter x:Key="FileSizeConverter" />

		<CollectionViewSource x:Key="PackageCollectionSource" Source="{Binding Packages}">
			<CollectionViewSource.GroupDescriptions>
				<PropertyGroupDescription PropertyName="Id" StringComparison="OrdinalIgnoreCase" />
			</CollectionViewSource.GroupDescriptions>
		</CollectionViewSource>
	</Window.Resources>

	<Grid Margin="10">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
			<RowDefinition Height="*" />
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
		</Grid.RowDefinitions>

		<Grid.ColumnDefinitions>
			<ColumnDefinition />
			<ColumnDefinition Width="Auto" />
		</Grid.ColumnDefinitions>

		<!-- change package source elements -->
		<DockPanel Grid.ColumnSpan="3" Margin="0,0,0,15" LastChildFill="True">
			<Label DockPanel.Dock="Left" Content="_Package source:" Target="{Binding ElementName=PackageSourceBox}" VerticalAlignment="Center" />
			<Button DockPanel.Dock="Right" Content="_Reload" HorizontalAlignment="Center" Padding="10,0" Command="{Binding ChangePackageSourceCommand}" CommandParameter="{Binding Text, ElementName=PackageSourceBox}">
				<Button.IsEnabled>
					<MultiBinding Converter="{StaticResource andConverter}">
						<Binding Path="Text" ElementName="PackageSourceBox" Converter="{StaticResource nullToBoolConverter}" />
						<Binding Path="IsEditable" />
					</MultiBinding>
				</Button.IsEnabled>
			</Button>

			<ComboBox x:Name="PackageSourceBox" ItemsSource="{Binding PackageSources}" IsReadOnly="False" IsEditable="True" PreviewKeyDown="PackageSourceBox_PreviewKeyDown" VerticalContentAlignment="Center" Text="{Binding PackageSource, Mode=OneWay}" Margin="4,0">
				<ComboBox.IsEnabled>
					<MultiBinding Converter="{StaticResource andConverter}">
						<Binding Path="IsEditable" Mode="OneWay" />
{'fraction_non_alphanumeric': 0.13877101995913876, 'fraction_numerical': 0.009743831526009744, 'mean_word_length': 8.026950354609928, 'pattern_counts': {'":': 0, '<': 83, '<?xml version=': 0, '>': 83, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 10}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5513640', 'n_tokens_mistral': 2048, 'n_tokens_neox': 1740, 'n_words': 290}