banshee r3162 - in trunk/banshee: . src/Backends/Banshee.Gnome src/Backends/Banshee.Unix src/Core/Hyena.Gui/Hyena.Gui.Dialogs
- From: abock svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3162 - in trunk/banshee: . src/Backends/Banshee.Gnome src/Backends/Banshee.Unix src/Core/Hyena.Gui/Hyena.Gui.Dialogs
- Date: Thu, 7 Feb 2008 07:19:55 +0000 (GMT)
Author: abock
Date: Thu Feb 7 07:19:55 2008
New Revision: 3162
URL: http://svn.gnome.org/viewvc/banshee?rev=3162&view=rev
Log:
2008-02-07 Aaron Bockover <abock gnome org>
* src/Core/Hyena.Gui/Hyena.Gui.Dialogs/ExceptionDialog.cs: Use
AppendFormat instead of allocating a bunch of separate strings; added
a platform check to skip collecting kernel, distro, and LSB information
if the platform is not Unix; added some exception handling when gathering
this information just in case
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Backends/Banshee.Gnome/ (props changed)
trunk/banshee/src/Backends/Banshee.Unix/ (props changed)
trunk/banshee/src/Core/Hyena.Gui/Hyena.Gui.Dialogs/ExceptionDialog.cs
Modified: trunk/banshee/src/Core/Hyena.Gui/Hyena.Gui.Dialogs/ExceptionDialog.cs
==============================================================================
--- trunk/banshee/src/Core/Hyena.Gui/Hyena.Gui.Dialogs/ExceptionDialog.cs (original)
+++ trunk/banshee/src/Core/Hyena.Gui/Hyena.Gui.Dialogs/ExceptionDialog.cs Thu Feb 7 07:19:55 2008
@@ -145,23 +145,31 @@
};
msg.Append("\n");
- msg.Append(".NET Version: " + Environment.Version.ToString());
- msg.Append("\n\nAssembly Version Information:\n\n");
+ msg.AppendFormat(".NET Version: {0}\n", Environment.Version);
+ msg.AppendFormat("OS Version: {0}\n", Environment.OSVersion);
+ msg.Append("\nAssembly Version Information:\n\n");
foreach(Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) {
AssemblyName name = asm.GetName();
- msg.Append(name.Name + " (" + name.Version.ToString() + ")\n");
+ msg.AppendFormat("{0} ({1})\n", name.Name, name.Version);
}
-
- msg.Append("\nPlatform Information: " + BuildPlatformString());
-
- msg.Append("\n\nDisribution Information:\n\n");
-
- Dictionary<string, string> lsb = LsbVersionInfo.Harvest;
-
- foreach(string lsbfile in lsb.Keys) {
- msg.Append("[" + lsbfile + "]\n");
- msg.Append(lsb[lsbfile] + "\n");
+
+ if(Environment.OSVersion.Platform != PlatformID.Unix) {
+ return msg.ToString();
+ }
+
+ try {
+ msg.AppendFormat("\nPlatform Information: {0}", BuildPlatformString());
+
+ msg.Append("\n\nDisribution Information:\n\n");
+
+ Dictionary<string, string> lsb = LsbVersionInfo.Harvest;
+
+ foreach(string lsbfile in lsb.Keys) {
+ msg.AppendFormat("[{0}]\n", lsbfile);
+ msg.AppendFormat("{0}\n", lsb[lsbfile]);
+ }
+ } catch {
}
return msg.ToString();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]