Skip to content

Commit e16e225

Browse files
committed
Update Unity installer URL parser (fixes #155), #BUILD
1 parent f7ec679 commit e16e225

File tree

3 files changed

+179
-131
lines changed

3 files changed

+179
-131
lines changed

UnityLauncherPro/MainWindow.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@
440440
<RadioButton x:Name="rdoBetas" Content="Beta" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="400,2,0,0" Checked="rdoAll_Checked" GroupName="groupUpdateFilter" />
441441

442442
<!-- hash build downloader, hidden for now, until have some UI ideas -->
443-
<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" />
443+
<!--<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" />-->
444444

445445
<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"/>
446446
<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">

UnityLauncherPro/MainWindow.xaml.cs

+10-1
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,8 @@ void FilterUpdates()
289289
{
290290
_filterString = txtSearchBoxUpdates.Text;
291291
ICollectionView collection = CollectionViewSource.GetDefaultView(dataGridUpdates.ItemsSource);
292+
if (collection == null) return;
293+
292294
collection.Filter = UpdatesFilter;
293295
if (dataGridUpdates.Items.Count > 0)
294296
{
@@ -360,7 +362,7 @@ private bool UpdatesFilter(object item)
360362
bool matchBetas = checkedBetas && Tools.IsBeta(unity.Version);
361363

362364
// match search string and some radiobutton
363-
if (haveSearchString)
365+
if (haveSearchString == true)
364366
{
365367
if (checkedAlls) return matchString;
366368
if (checkedLTSs) return matchString && matchLTS;
@@ -1297,6 +1299,13 @@ private void GridRecent_PreviewKeyDown(object sender, KeyEventArgs e)
12971299
case Key.End: // override end
12981300
// if edit mode, dont override keys
12991301
if (IsEditingCell(gridRecent) == true) return;
1302+
// if in args column, dont jump to end of list, but end of this field
1303+
if (gridRecent.CurrentCell.Column.DisplayIndex == 4)
1304+
{
1305+
// start editing this cell
1306+
gridRecent.BeginEdit();
1307+
return;
1308+
}
13001309
gridRecent.SelectedIndex = gridRecent.Items.Count - 1;
13011310
gridRecent.ScrollIntoView(gridRecent.SelectedItem);
13021311
e.Handled = true;

0 commit comments

Comments
 (0)