[Monodevelop-patches-list] r2183 - in trunk/MonoDevelop/Core/src/MonoDevelop.Base: . Gui/Dialogs

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Thu Jan 27 21:10:38 EST 2005


Author: jluke
Date: 2005-01-27 21:10:38 -0500 (Thu, 27 Jan 2005)
New Revision: 2183

Modified:
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/SharpDevelopAboutPanels.cs
Log:
remove some old code


Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog	2005-01-27 22:14:06 UTC (rev 2182)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog	2005-01-28 02:10:38 UTC (rev 2183)
@@ -2,6 +2,8 @@
 
 	* Gui/Dialogs/CommonAboutDialog.cs: use a timeout
 	to make scrolling a more constant speed
+	* Gui/Dialogs/SharpDevelopAboutPanels.cs: remove
+	a bunch of stale code
 
 2005-01-27  John Luke  <john.luke at gmail.com>
 

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/SharpDevelopAboutPanels.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/SharpDevelopAboutPanels.cs	2005-01-27 22:14:06 UTC (rev 2182)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/SharpDevelopAboutPanels.cs	2005-01-28 02:10:38 UTC (rev 2183)
@@ -11,25 +11,20 @@
 using System.Reflection;
 
 using Gtk;
-using MonoDevelop.Gui;
-using MonoDevelop.Core.Properties;
-using MonoDevelop.Core.Services;
-using MonoDevelop.Internal.Project;
 using MonoDevelop.Services;
 
 namespace MonoDevelop.Gui.Dialogs
 {
 	public class AboutMonoDevelopTabPage : VBox
 	{
-		Label versionLabel = new Label ();
-		Label sponsorLabel = new Label ();
-		Label licenseLabel = new Label ();
-		Label copyrightLabel = new Label ();
-		
 		public AboutMonoDevelopTabPage ()
 		{
-			Version v = Assembly.GetEntryAssembly().GetName().Version;
-			versionLabel.Markup = String.Format ("<b>{0}</b>\n    {1}", GettextCatalog.GetString("Version"), v.Major + "." + v.Minor);
+			Label versionLabel = new Label ();
+			Label licenseLabel = new Label ();
+			Label copyrightLabel = new Label ();
+
+			Version v = Assembly.GetEntryAssembly ().GetName ().Version;
+			versionLabel.Markup = String.Format ("<b>{0}</b>\n    {1}", GettextCatalog.GetString ("Version"), v.Major + "." + v.Minor);
 			HBox hboxVersion = new HBox ();
 			hboxVersion.PackStart (versionLabel, false, false, 5);
 			
@@ -37,7 +32,6 @@
 			licenseLabel.Markup = String.Format ("<b>License</b>\n    {0}", GettextCatalog.GetString ("Released under the GNU General Public license."));
 			hboxLicense.PackStart (licenseLabel, false, false, 5);
 
-
 			HBox hboxCopyright = new HBox ();
 			copyrightLabel.Markup = "<b>Copyright</b>\n    (c) 2000-2003 by icsharpcode.net\n    (c) 2004-2005 by MonoDevelop contributors";
 			hboxCopyright.PackStart (copyrightLabel, false, false, 5);
@@ -51,11 +45,6 @@
 	
 	public class VersionInformationTabPage : VBox
 	{
-		private TreeView listView;
-		private Button button;
-		private TreeStore store;
-		private Clipboard clipboard;
-		
 		public VersionInformationTabPage ()
 		{
 			TreeView listView = new TreeView ();
@@ -64,66 +53,33 @@
 			listView.AppendColumn (GettextCatalog.GetString ("Version"), new CellRendererText (), "text", 1);
 			listView.AppendColumn (GettextCatalog.GetString ("Path"), new CellRendererText (), "text", 2);
 			
-			FillListView ();
+			listView.Model = FillListView ();
 			ScrolledWindow sw = new ScrolledWindow ();
 			sw.Add (listView);
-			this.PackStart (sw);
-			
-			HBox hbox = new HBox (false, 0);
-			//button = new Button (Gtk.Stock.Copy);
-			//button.Clicked += new EventHandler(CopyButtonClick);
-			hbox.PackStart (new Label (), false, true, 3);
-			//hbox.PackStart (button, false, false, 3);
-			hbox.PackStart (new Label (), false, true, 3);
-			this.PackStart (hbox, false, false, 6);
-			
-			listView.Model = store;
+			this.PackStart (sw, true, true, 0);
 		}
 		
-		void FillListView()
+		ListStore FillListView()
 		{
-			store = new TreeStore (typeof (string), typeof (string), typeof (string));
+			ListStore store = new ListStore (typeof (string), typeof (string), typeof (string));
 			
-			foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) {
-				AssemblyName name = asm.GetName();
+			foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies ()) {
+				AssemblyName name = asm.GetName ();
 				
 				string loc;
 				
 				try {
 					loc = System.IO.Path.GetFullPath (asm.Location);
-				} catch (Exception) {
+				} catch {
 					loc = GettextCatalog.GetString ("dynamic");
 				}
 				
-				store.AppendValues (name.Name, name.Version.ToString(), loc);
+				store.AppendValues (name.Name, name.Version.ToString (), loc);
 			}
 			
 			store.SetSortColumnId (0, SortType.Ascending);
+			return store;
 		}
-		
-		void CopyButtonClick(object o, EventArgs args)
-		{
-			StringBuilder versionInfo = new StringBuilder();
-			foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) {
-				AssemblyName name = asm.GetName();
-				versionInfo.Append(name.Name);
-				versionInfo.Append(",");
-				versionInfo.Append(name.Version.ToString());
-				versionInfo.Append(",");
-				try {
-					versionInfo.Append(System.IO.Path.GetFullPath (asm.Location));
-				} catch (Exception) {
-					versionInfo.Append(GettextCatalog.GetString ("dynamic"));
-				}
-				
-				versionInfo.Append(Environment.NewLine);
-			}
-			
-			// set to both the X and normal clipboards
-			clipboard = Clipboard.Get (Gdk.Atom.Intern ("CLIPBOARD", false));
-			clipboard.SetText (versionInfo.ToString ());
-			clipboard = Clipboard.Get (Gdk.Atom.Intern ("PRIMARY", false));
-			clipboard.SetText (versionInfo.ToString ());
-		}
 	}
 }
+




More information about the Monodevelop-patches-list mailing list