mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Cleanup new shortcuts functionality
Remove old obsolete option and ensure uninstaller deletes all the new shortcuts
This commit is contained in:
parent
7e95fb4d8f
commit
ab2f5f589a
@ -242,9 +242,21 @@ namespace Bloxstrap
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
var cleanupSequence = new List<Action>
|
||||
{
|
||||
() => File.Delete(DesktopShortcut),
|
||||
() =>
|
||||
{
|
||||
foreach (var file in Directory.GetFiles(Paths.Desktop).Where(x => x.EndsWith("lnk")))
|
||||
{
|
||||
var shortcut = ShellLink.Shortcut.ReadFromFile(file);
|
||||
|
||||
if (shortcut.ExtraData.EnvironmentVariableDataBlock?.TargetUnicode == Paths.Application)
|
||||
File.Delete(file);
|
||||
}
|
||||
},
|
||||
|
||||
() => File.Delete(StartMenuShortcut),
|
||||
|
||||
() => Directory.Delete(Paths.Versions, true),
|
||||
|
@ -26,7 +26,7 @@ namespace Bloxstrap.Models.SettingTasks
|
||||
|
||||
if (NewState)
|
||||
Shortcut.Create(Paths.Application, ExeFlags, ShortcutPath);
|
||||
else
|
||||
else if (File.Exists(ShortcutPath))
|
||||
File.Delete(ShortcutPath);
|
||||
|
||||
OriginalState = NewState;
|
||||
|
@ -11,7 +11,6 @@ namespace Bloxstrap.Models
|
||||
public string BootstrapperIconCustomLocation { get; set; } = "";
|
||||
public Theme Theme { get; set; } = Theme.Default;
|
||||
public bool CheckForUpdates { get; set; } = true;
|
||||
public bool CreateDesktopIcon { get; set; } = true;
|
||||
public bool ConfirmLaunches { get; set; } = false;
|
||||
public string Locale { get; set; } = "nil";
|
||||
public bool ForceRobloxLanguage { get; set; } = false;
|
||||
|
18
Bloxstrap/Resources/Strings.Designer.cs
generated
18
Bloxstrap/Resources/Strings.Designer.cs
generated
@ -1790,24 +1790,6 @@ namespace Bloxstrap.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Bloxstrap will place an icon on the desktop that launches Roblox the next time it launches..
|
||||
/// </summary>
|
||||
public static string Menu_Behaviour_CreateDesktopIcon_Description {
|
||||
get {
|
||||
return ResourceManager.GetString("Menu.Behaviour.CreateDesktopIcon.Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Create desktop icon.
|
||||
/// </summary>
|
||||
public static string Menu_Behaviour_CreateDesktopIcon_Title {
|
||||
get {
|
||||
return ResourceManager.GetString("Menu.Behaviour.CreateDesktopIcon.Title", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Configure what Bloxstrap should do when launching..
|
||||
/// </summary>
|
||||
|
@ -557,12 +557,6 @@ Would you like to upgrade your currently installed version?</value>
|
||||
<data name="Menu.Behaviour.ConfirmLaunches.Title" xml:space="preserve">
|
||||
<value>Prompt to confirm when launching another Roblox instance</value>
|
||||
</data>
|
||||
<data name="Menu.Behaviour.CreateDesktopIcon.Description" xml:space="preserve">
|
||||
<value>Bloxstrap will place an icon on the desktop that launches Roblox the next time it launches.</value>
|
||||
</data>
|
||||
<data name="Menu.Behaviour.CreateDesktopIcon.Title" xml:space="preserve">
|
||||
<value>Create desktop icon</value>
|
||||
</data>
|
||||
<data name="Menu.Behaviour.Description" xml:space="preserve">
|
||||
<value>Configure what Bloxstrap should do when launching.</value>
|
||||
</data>
|
||||
|
@ -17,12 +17,6 @@
|
||||
<StackPanel Margin="0,0,14,14">
|
||||
<TextBlock Margin="0,0,0,8" Text="{x:Static resources:Strings.Menu_Behaviour_Description}" FontSize="14" Foreground="{DynamicResource TextFillColorSecondaryBrush}" />
|
||||
|
||||
<controls:OptionControl
|
||||
Header="{x:Static resources:Strings.Menu_Behaviour_CreateDesktopIcon_Title}"
|
||||
Description="{x:Static resources:Strings.Menu_Behaviour_CreateDesktopIcon_Description}">
|
||||
<ui:ToggleSwitch IsChecked="{Binding CreateDesktopIcon, Mode=TwoWay}" />
|
||||
</controls:OptionControl>
|
||||
|
||||
<controls:OptionControl
|
||||
Header="{x:Static resources:Strings.Menu_Behaviour_AutoUpdate_Title}"
|
||||
Description="{x:Static resources:Strings.Menu_Behaviour_AutoUpdate_Description}">
|
||||
|
@ -5,12 +5,6 @@
|
||||
private string _oldPlayerVersionGuid = "";
|
||||
private string _oldStudioVersionGuid = "";
|
||||
|
||||
public bool CreateDesktopIcon
|
||||
{
|
||||
get => App.Settings.Prop.CreateDesktopIcon;
|
||||
set => App.Settings.Prop.CreateDesktopIcon = value;
|
||||
}
|
||||
|
||||
public bool UpdateCheckingEnabled
|
||||
{
|
||||
get => App.Settings.Prop.CheckForUpdates;
|
||||
|
Loading…
Reference in New Issue
Block a user