# HG changeset patch # User moel.mich # Date 1274543519 0 # Node ID b1278888d9a96af0e74421110f204eec052720ff # Parent b68a6f3b82a337bb4f703568b51e4df3d82cfec1 A few bug fixes to avoid crashes on Linux systems. diff -r b68a6f3b82a3 -r b1278888d9a9 GUI/MainForm.Designer.cs --- a/GUI/MainForm.Designer.cs Sat May 22 12:12:50 2010 +0000 +++ b/GUI/MainForm.Designer.cs Sat May 22 15:51:59 2010 +0000 @@ -92,7 +92,7 @@ this.startMinMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.minTrayMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.startupMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripSeparator(); + this.separatorMenuItem = new System.Windows.Forms.ToolStripSeparator(); this.temperatureUnitsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.celciusToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.fahrenheitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -362,7 +362,7 @@ this.startMinMenuItem, this.minTrayMenuItem, this.startupMenuItem, - this.toolStripMenuItem3, + this.separatorMenuItem, this.temperatureUnitsToolStripMenuItem, this.toolStripMenuItem4, this.hddMenuItem}); @@ -395,8 +395,8 @@ // // toolStripMenuItem3 // - this.toolStripMenuItem3.Name = "toolStripMenuItem3"; - this.toolStripMenuItem3.Size = new System.Drawing.Size(204, 6); + this.separatorMenuItem.Name = "toolStripMenuItem3"; + this.separatorMenuItem.Size = new System.Drawing.Size(204, 6); // // temperatureUnitsToolStripMenuItem // @@ -580,7 +580,7 @@ private System.Windows.Forms.ToolStripSeparator toolStripMenuItem2; private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem minTrayMenuItem; - private System.Windows.Forms.ToolStripSeparator toolStripMenuItem3; + private System.Windows.Forms.ToolStripSeparator separatorMenuItem; private System.Windows.Forms.ContextMenuStrip sensorContextMenuStrip; private System.Windows.Forms.ToolStripMenuItem startMinMenuItem; private System.Windows.Forms.ToolStripMenuItem startupMenuItem; diff -r b68a6f3b82a3 -r b1278888d9a9 GUI/MainForm.cs --- a/GUI/MainForm.cs Sat May 22 12:12:50 2010 +0000 +++ b/GUI/MainForm.cs Sat May 22 15:51:59 2010 +0000 @@ -155,6 +155,15 @@ 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; diff -r b68a6f3b82a3 -r b1278888d9a9 Hardware/CPU/CPUGroup.cs --- a/Hardware/CPU/CPUGroup.cs Sat May 22 12:12:50 2010 +0000 +++ b/Hardware/CPU/CPUGroup.cs Sat May 22 15:51:59 2010 +0000 @@ -101,6 +101,11 @@ } public CPUGroup() { + // No implementation for cpuid on Unix systems + int p = (int)System.Environment.OSVersion.Platform; + if ((p == 4) || (p == 128)) + return; + if (!WinRing0.IsCpuid()) return; @@ -158,7 +163,9 @@ } public string GetReport() { - + if (threads == null) + return null; + StringBuilder r = new StringBuilder(); r.AppendLine("CPUID");