[Monodevelop-patches-list] r1550 - in trunk/MonoDevelop/src/Main/Base: . Gui/Dialogs/OptionPanels Gui/Dialogs/ReferenceDialog

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Thu Apr 29 18:05:33 EDT 2004


Author: tberman
Date: 2004-04-29 18:05:32 -0400 (Thu, 29 Apr 2004)
New Revision: 1550

Modified:
   trunk/MonoDevelop/src/Main/Base/ChangeLog
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/ExternalToolPanel.cs
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/SelectReferenceDialog.cs
Log:
gac integration.
gtk-sharp from cvs tracking.


Modified: trunk/MonoDevelop/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/Main/Base/ChangeLog	2004-04-29 13:46:55 UTC (rev 1549)
+++ trunk/MonoDevelop/src/Main/Base/ChangeLog	2004-04-29 22:05:32 UTC (rev 1550)
@@ -1,3 +1,14 @@
+2004-04-29  Todd Berman  <tberman at sevenl.net>
+
+	* Gui/Dialogs/OptionPanels/ExternalToolPanel.cs: fix up to match gtk#
+	from cvs.
+	* Gui/Dialogs/ReferenceDialog/SelectReferenceDialog.cs:
+	* Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs:
+	Now we actually pull assemblies from the gac.
+	NOTE: Until gtk-sharp, and other libraries actually start using the gac
+	it will not be possible to add a proper gac reference to them.
+	This will be fixed on their end by beta1 however.
+
 2004-04-28  Todd Berman  <tberman at sevenl.net>
 
 	* Internal/Project/Project/AbstractProject.cs: Actually make that check

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/ExternalToolPanel.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/ExternalToolPanel.cs	2004-04-29 13:46:55 UTC (rev 1549)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/ExternalToolPanel.cs	2004-04-29 22:05:32 UTC (rev 1550)
@@ -296,7 +296,7 @@
 					foreach(TreeIter toDelete in selectedIters) {
 						TreeIter itr = toDelete;
 						toolListBoxItemCount --;
-						((ListStore)lv).Remove(out itr);
+						((ListStore)lv).Remove(ref itr);
 					}
 					 
 					if (toolListBoxItemCount == 0) {

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs	2004-04-29 13:46:55 UTC (rev 1549)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs	2004-04-29 22:05:32 UTC (rev 1550)
@@ -1,4 +1,4 @@
-// <file>
+// <file>
 //     <copyright see="prj:///doc/copyright.txt"/>
 //     <license see="prj:///doc/license.txt"/>
 //     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
@@ -16,6 +16,8 @@
 using MonoDevelop.Core.Services;
 using MonoDevelop.Services;
 
+using System.IO;
+
 using Gtk;
 
 namespace MonoDevelop.Gui.Dialogs
@@ -61,7 +63,6 @@
 		
 		public void AddReference(object sender, Gtk.ToggledArgs e)
 		{
-			//foreach (ListViewItem item in SelectedItems) {
 			Gtk.TreeIter iter;
 			store.GetIterFromString (out iter, e.Path);
 			if ((bool)store.GetValue (iter, 3) == false) {
@@ -73,8 +74,8 @@
 			} else {
 				store.SetValue (iter, 3, false);
 				selectDialog.RemoveReference (ReferenceType.Gac,
-				                             (string)store.GetValue (iter, 0),
-							     (string)store.GetValue (iter, 2));
+											  (string)store.GetValue (iter, 0),
+											  (string)store.GetValue (iter, 2));
 			}
 		}
 
@@ -115,28 +116,22 @@
 				Items.Add(item);
 			}
 #endif
-			//FIXME: Oh wow this is *hackery* but it will work
-			//FIXME: on mono alone. well, this tosses xplatform
-			//FIXME: out the window a hell of a lot more than
-			//FIXME: gnome or not ;)
-			//FIXME: This needs to change once mono gets a real
-			//FIXME: gac.
 			System.Reflection.MethodInfo gac = typeof (System.Environment).GetMethod ("internalGetGacPath", System.Reflection.BindingFlags.Static|System.Reflection.BindingFlags.NonPublic);
 			if (gac == null) {
 				Console.WriteLine (GettextCatalog.GetString ("ERROR: non-mono runtime detected, please use the mono runtime for this piece of MonoDevelop for the time being"));
 				Environment.Exit (1);
 			}
 			string gac_path = System.IO.Path.Combine ((string)gac.Invoke (null, null), "");
-			string[] assemblies = System.IO.Directory.GetFiles (gac_path, "*.dll");
-			foreach (string assembly in assemblies) {
-				try {
-					System.Reflection.AssemblyName an = System.Reflection.AssemblyName.GetAssemblyName (assembly);
-
-					string name = an.Name;
-					string ver = an.Version.ToString ();
+			DirectoryInfo d = new DirectoryInfo (System.IO.Path.Combine (System.IO.Path.Combine (gac_path, "mono"), "gac"));
+			foreach (DirectoryInfo namedDir in d.GetDirectories ()) {
+				foreach (DirectoryInfo assemblyDir in namedDir.GetDirectories ()) {
+					FileInfo[] files = assemblyDir.GetFiles ("*.dll");
+					try {
+						System.Reflection.AssemblyName an = System.Reflection.AssemblyName.GetAssemblyName (files[0].FullName);
 					
-					store.AppendValues (name, ver, assembly, false, an.FullName);
-				} catch {
+						store.AppendValues (an.Name, an.Version.ToString (), System.IO.Path.GetFileName (files[0].FullName), false, an.FullName);
+					} catch {
+					}
 				}
 			}
 		}

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/SelectReferenceDialog.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/SelectReferenceDialog.cs	2004-04-29 13:46:55 UTC (rev 1549)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/SelectReferenceDialog.cs	2004-04-29 22:05:32 UTC (rev 1550)
@@ -91,9 +91,8 @@
 				}
 			}
 			mainBook.RemovePage (mainBook.CurrentPage);
-			mainBook.AppendPage (gacRefPanel, new Gtk.Label (GettextCatalog.GetString ("System Assemblies")));
+			mainBook.AppendPage (gacRefPanel, new Gtk.Label (GettextCatalog.GetString ("Global Assembly Cache")));
 			mainBook.AppendPage (new ProjectReferencePanel (this), new Gtk.Label (GettextCatalog.GetString ("Projects")));
-			// FIXME il8n the assembly tab name			
 			mainBook.AppendPage (new AssemblyReferencePanel (this), new Gtk.Label (GettextCatalog.GetString (".Net Assembly")));
 			//comTabPage.Controls.Add(new COMReferencePanel(this));
 			AddReferenceDialog.ShowAll ();
@@ -106,8 +105,8 @@
 
 		void AddGacReference (ProjectReference refInfo)
 		{
-			gacRefPanel.SignalRefChange (System.IO.Path.GetFullPath (refInfo.GetReferencedFileName (configureProject)), true);
-			refTreeStore.AppendValues (System.IO.Path.GetFileName (refInfo.Reference), refInfo.ReferenceType.ToString (), System.IO.Path.GetFullPath (refInfo.GetReferencedFileName (configureProject)), refInfo);
+			gacRefPanel.SignalRefChange (refInfo.Reference, true);
+			refTreeStore.AppendValues (refInfo.Reference, refInfo.ReferenceType.ToString (), refInfo.Reference, refInfo);
 		}
 
 		public void RemoveReference (ReferenceType referenceType, string referenceName, string referenceLocation)




More information about the Monodevelop-patches-list mailing list