Skip to content

Commit 509b42c

Browse files
committed
Csharpier
1 parent 898bcb0 commit 509b42c

4 files changed

Lines changed: 22 additions & 19 deletions

File tree

YMouseButtonControl.Core/Services/StartMenuInstaller/IStartMenuInstallerService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ public interface IStartMenuInstallerService
55
bool InstallStatus();
66
void Install();
77
void Uninstall();
8-
}
8+
}

YMouseButtonControl.Core/ViewModels/MainWindow/GlobalSettingsDialogViewModel.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,10 @@ IThemeService themeService
5959
x => x.LoggingEnabled,
6060
selector: val => val != enableLoggingService.GetLoggingState()
6161
);
62-
var startMenuChanged = this.WhenAnyValue(x => x.StartMenuChecked,
63-
selector: val => val != startMenuInstallerService.InstallStatus());
62+
var startMenuChanged = this.WhenAnyValue(
63+
x => x.StartMenuChecked,
64+
selector: val => val != startMenuInstallerService.InstallStatus()
65+
);
6466
var themeChanged = this.WhenAnyValue(
6567
x => x.ThemeSetting.IntValue,
6668
selector: val =>
@@ -117,7 +119,7 @@ public bool StartMenuChecked
117119
get => _startMenuChecked;
118120
set => this.RaiseAndSetIfChanged(ref _startMenuChecked, value);
119121
}
120-
122+
121123
public bool StartMenuEnabled { get; init; }
122124

123125
public SettingBoolVm StartMinimized
@@ -151,4 +153,4 @@ public ObservableCollection<ThemeVm> ThemeCollection
151153
}
152154

153155
public ReactiveCommand<Unit, Unit> ApplyCommand { get; init; }
154-
}
156+
}

YMouseButtonControl.Linux/Services/StartMenuInstallerService.cs

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ namespace YMouseButtonControl.Linux.Services;
55
public class StartMenuInstallerService : IStartMenuInstallerService
66
{
77
private const string DesktopFile = """
8-
[Desktop Entry]
9-
Type=Application
10-
Exec={0}
11-
Path={1}
12-
Hidden=false
13-
NoDisplay=false
14-
X-GNOME-Autostart-enabled=true
15-
Name=YMouseButtonControl
16-
Comment=YMouseButtonControl
17-
""";
8+
[Desktop Entry]
9+
Type=Application
10+
Exec={0}
11+
Path={1}
12+
Hidden=false
13+
NoDisplay=false
14+
X-GNOME-Autostart-enabled=true
15+
Name=YMouseButtonControl
16+
Comment=YMouseButtonControl
17+
""";
1818

1919
private readonly string _localShare = Environment.GetFolderPath(
2020
Environment.SpecialFolder.LocalApplicationData
@@ -28,8 +28,9 @@ public StartMenuInstallerService()
2828
_desktopFilePath = Path.Combine(applicationsDir, "YMouseButtonControl.desktop");
2929
}
3030

31-
public bool InstallStatus() => File.Exists(_desktopFilePath) &&
32-
File.ReadAllText(_desktopFilePath).Contains($"Exec={GetCurExePath()}");
31+
public bool InstallStatus() =>
32+
File.Exists(_desktopFilePath)
33+
&& File.ReadAllText(_desktopFilePath).Contains($"Exec={GetCurExePath()}");
3334

3435
public void Install() =>
3536
File.WriteAllText(
@@ -45,4 +46,4 @@ private static string GetCurExeParentPath() =>
4546

4647
private static string GetCurExePath() =>
4748
Environment.ProcessPath ?? throw new Exception("Error retrieving process path");
48-
}
49+
}

YMouseButtonControl.MacOS/Services/StartMenuInstaller.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ public void Uninstall()
1818
{
1919
throw new System.NotImplementedException();
2020
}
21-
}
21+
}

0 commit comments

Comments
 (0)