A few bug fixes to avoid crashes on Linux systems.

This commit is contained in:
Michael Möller
2010-05-22 15:51:59 +00:00
parent 1b36c9c181
commit 3550878a80
3 changed files with 22 additions and 6 deletions

View File

@@ -155,6 +155,15 @@ namespace OpenHardwareMonitor.GUI {
UnitManager.TemperatureUnit == TemperatureUnit.Celcius;
fahrenheitToolStripMenuItem.Checked = !celciusToolStripMenuItem.Checked;
// Hide the system tray and auto startup menu items on Unix
int p = (int)System.Environment.OSVersion.Platform;
if ((p == 4) || (p == 128)) {
startMinMenuItem.Visible = false;
minTrayMenuItem.Visible = false;
startupMenuItem.Visible = false;
separatorMenuItem.Visible = false;
}
if (startMinMenuItem.Checked) {
if (!minTrayMenuItem.Checked) {
WindowState = FormWindowState.Minimized;