Skip to content

Commit 320e3e0

Browse files
committed
editors: "update" button now sets search filter as current version minus patch, move download context menus under "Download" root menuitem, add Check Updates context menu,
1 parent 188eb9f commit 320e3e0

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

UnityLauncherPro/MainWindow.xaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -715,12 +715,15 @@
715715
<MenuItem x:Name="menuItemCopyEditorPath" Header="Copy Editor Path" Click="MenuItemCopyPath_Click" />
716716
<MenuItem x:Name="menuItemShowUnityInExplorer" Header="Show in Explorer" Click="MenuItemShowProjectInExplorer_Click" />
717717
<MenuItem x:Name="menuItemSetPreferredUnityVersion" Header="Set as Preferred Version" Click="MenuItemSetPreferredUnityVersion_Click"/>
718+
<MenuItem x:Name="menuCheckUnityUpdates" Header="Check Updates" Click="BtnUpdateUnity_Click"/>
718719
<!--<MenuItem x:Name="menuItemEditPackages" Header="Edit Packages" Click="MenuItemEditPackages_Click"/>-->
719720
<Separator></Separator>
720-
<MenuItem x:Name="menuItemDownloadAndroidModule" Header="Download Android module" Click="MenuItemDownloadAndroidModule_Click"/>
721-
<MenuItem x:Name="menuItemDownloadIOSModule" Header="Download IOS module" Click="MenuItemDownloadIOSModule_Click"/>
722-
<MenuItem x:Name="menuItemDownloadWebGLModule" Header="Download WebGL module" Click="MenuItemDownloadWebGLModule_Click" />
723-
<MenuItem x:Name="menuItemDownloadLinuxModule" Header="Download Linux modules" Click="MenuItemDownloadLinuxModule_Click"/>
721+
<MenuItem Header="Download">
722+
<MenuItem x:Name="menuItemDownloadAndroidModule" Header="Download Android module" Click="MenuItemDownloadAndroidModule_Click"/>
723+
<MenuItem x:Name="menuItemDownloadIOSModule" Header="Download IOS module" Click="MenuItemDownloadIOSModule_Click"/>
724+
<MenuItem x:Name="menuItemDownloadWebGLModule" Header="Download WebGL module" Click="MenuItemDownloadWebGLModule_Click" />
725+
<MenuItem x:Name="menuItemDownloadLinuxModule" Header="Download Linux modules" Click="MenuItemDownloadLinuxModule_Click"/>
726+
</MenuItem>
724727
</ContextMenu>
725728
</DataGrid.ContextMenu>
726729

UnityLauncherPro/MainWindow.xaml.cs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -573,22 +573,15 @@ async void GoLookForUpdatesForThisUnity()
573573

574574
var unity = GetSelectedUnity();
575575
if (unity == null) return;
576-
// NOTE for now, just select the same version.. then user can see what has been released after this
576+
577+
577578
// NOTE if updates are not loaded, should wait for that
578579
if (dataGridUpdates.ItemsSource != null)
579580
{
580581
tabControl.SelectedIndex = 2;
581-
// find matching version
582-
for (int i = 0; i < dataGridUpdates.Items.Count; i++)
583-
{
584-
Updates row = (Updates)dataGridUpdates.Items[i];
585-
if (row.Version == unity.Version)
586-
{
587-
dataGridUpdates.SelectedIndex = i;
588-
dataGridUpdates.ScrollIntoView(row);
589-
break;
590-
}
591-
}
582+
583+
// NOTE for now, just set filter to current version, minus patch version "2021.1.7f1" > "2021.1"
584+
txtSearchBoxUpdates.Text = unity.Version.Substring(0, unity.Version.LastIndexOf('.'));
592585
}
593586
}
594587

0 commit comments

Comments
 (0)