Skip to content

Commit

Permalink
Update Unity installer URL parser (fixes #155), #BUILD
Browse files Browse the repository at this point in the history
  • Loading branch information
unitycoder committed Jun 10, 2024
1 parent f7ec679 commit e16e225
Show file tree
Hide file tree
Showing 3 changed files with 179 additions and 131 deletions.
2 changes: 1 addition & 1 deletion UnityLauncherPro/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@
<RadioButton x:Name="rdoBetas" Content="Beta" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="400,2,0,0" Checked="rdoAll_Checked" GroupName="groupUpdateFilter" />

<!-- hash build downloader, hidden for now, until have some UI ideas -->
<TextBox x:Name="txtDownloadFromHash" BorderBrush="Transparent" CaretBrush="{DynamicResource ThemeSearchCaret}" Background="{DynamicResource ThemeTextBoxBackground}" SelectionBrush="{DynamicResource ThemeSearchSelection}" Foreground="{DynamicResource ThemeSearchForeground}" MinWidth="80" ToolTip="Try to download hidden release using Build Hash" Padding="0,3,0,0" Margin="640,4,138,0" VerticalAlignment="Top" Width="100" PreviewKeyDown="txtDownloadFromHash_PreviewKeyDown" Visibility="Hidden" />
<!--<TextBox x:Name="txtDownloadFromHash" BorderBrush="Transparent" CaretBrush="{DynamicResource ThemeSearchCaret}" Background="{DynamicResource ThemeTextBoxBackground}" SelectionBrush="{DynamicResource ThemeSearchSelection}" Foreground="{DynamicResource ThemeSearchForeground}" MinWidth="80" ToolTip="Try to download hidden release using this ChangeSet Hash" Padding="0,3,0,0" Margin="730,4,48,0" VerticalAlignment="Top" Width="100" PreviewKeyDown="txtDownloadFromHash_PreviewKeyDown" />-->

<Button Style="{StaticResource CustomButton}" ToolTip="Fetch released versions" x:Name="btnRefreshUpdatesList" Content="" Height="22" Width="26" HorizontalAlignment="Right" VerticalAlignment="Top" FontSize="16" Margin="0,4,3,0" Padding="1,-2,1,1" BorderBrush="{x:Null}" Click="OnGetUnityUpdatesClick"/>
<DataGrid x:Name="dataGridUpdates" SelectionMode="Single" Margin="4,30,2,42" Background="{x:Null}" BorderBrush="{x:Null}" ColumnHeaderStyle="{StaticResource HeaderStyle}" Padding="0" HorizontalScrollBarVisibility="Disabled" HeadersVisibility="Column" Foreground="{DynamicResource ThemeGridForeground}" HorizontalGridLinesBrush="{DynamicResource ThemeDatagridLines}" VerticalGridLinesBrush="{DynamicResource ThemeGridVerticalGridLines}" AutoGenerateColumns="False" PreviewKeyDown="DataGridUpdates_PreviewKeyDown" PreviewMouseDoubleClick="DataGridUpdates_PreviewMouseDoubleClick" Sorting="dataGridUpdates_Sorting">
Expand Down
11 changes: 10 additions & 1 deletion UnityLauncherPro/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ void FilterUpdates()
{
_filterString = txtSearchBoxUpdates.Text;
ICollectionView collection = CollectionViewSource.GetDefaultView(dataGridUpdates.ItemsSource);
if (collection == null) return;

collection.Filter = UpdatesFilter;
if (dataGridUpdates.Items.Count > 0)
{
Expand Down Expand Up @@ -360,7 +362,7 @@ private bool UpdatesFilter(object item)
bool matchBetas = checkedBetas && Tools.IsBeta(unity.Version);

// match search string and some radiobutton
if (haveSearchString)
if (haveSearchString == true)
{
if (checkedAlls) return matchString;
if (checkedLTSs) return matchString && matchLTS;
Expand Down Expand Up @@ -1297,6 +1299,13 @@ private void GridRecent_PreviewKeyDown(object sender, KeyEventArgs e)
case Key.End: // override end
// if edit mode, dont override keys
if (IsEditingCell(gridRecent) == true) return;
// if in args column, dont jump to end of list, but end of this field
if (gridRecent.CurrentCell.Column.DisplayIndex == 4)
{
// start editing this cell
gridRecent.BeginEdit();
return;
}
gridRecent.SelectedIndex = gridRecent.Items.Count - 1;
gridRecent.ScrollIntoView(gridRecent.SelectedItem);
e.Handled = true;
Expand Down
Loading

0 comments on commit e16e225

Please sign in to comment.