[Monodevelop-patches-list] r1555 - in trunk/MonoDevelop: . src/Main/Base src/Main/Base/Gui/Pads src/Main/Base/Services/ParserService
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Sat May 1 16:24:29 EDT 2004
Author: tberman
Date: 2004-05-01 16:24:29 -0400 (Sat, 01 May 2004)
New Revision: 1555
Modified:
trunk/MonoDevelop/configure.in
trunk/MonoDevelop/src/Main/Base/ChangeLog
trunk/MonoDevelop/src/Main/Base/Gui/Pads/OpenTaskView.cs
trunk/MonoDevelop/src/Main/Base/Services/ParserService/DefaultParserService.cs
Log:
gac fixes, and a gtk+ 2.4 regression
*abi compat my ass*
Modified: trunk/MonoDevelop/configure.in
===================================================================
--- trunk/MonoDevelop/configure.in 2004-04-30 19:26:38 UTC (rev 1554)
+++ trunk/MonoDevelop/configure.in 2004-05-01 20:24:29 UTC (rev 1555)
@@ -103,7 +103,8 @@
enable_xdgmime="yes"
fi
-AM_CONDITIONAL(ENABLE_DEBUGGER, test "x$enable_debugger" = "xyes")
+dnl AM_CONDITIONAL(ENABLE_DEBUGGER, test "x$enable_debugger" = "xyes")
+AM_CONDITIONAL(ENABLE_DEBUGGER, test "yes" = "no")
AM_CONDITIONAL(ENABLE_XDGMIME, test "x$enable_xdgmime" = "xyes")
dnl Intl
Modified: trunk/MonoDevelop/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/Main/Base/ChangeLog 2004-04-30 19:26:38 UTC (rev 1554)
+++ trunk/MonoDevelop/src/Main/Base/ChangeLog 2004-05-01 20:24:29 UTC (rev 1555)
@@ -1,3 +1,9 @@
+2004-05-01 Todd Berman <tberman at sevenl.net>
+
+ * Gui/Pads/OpenTaskView.cs: Fix gtk+2.4 regression.
+ * Services/ParserService/DefaultParserService.cs: load assemblies
+ out of the GAC for indexing.
+
2004-04-30 Todd Berman <tberman at sevenl.net>
* Gui/Pads/HelpBrowser/MonodocTreePad.cs: Hide doc nodes without
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Pads/OpenTaskView.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Pads/OpenTaskView.cs 2004-04-30 19:26:38 UTC (rev 1554)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Pads/OpenTaskView.cs 2004-05-01 20:24:29 UTC (rev 1555)
@@ -61,7 +61,7 @@
store = new Gtk.ListStore (
- typeof (string), // stock id
+ typeof (Gdk.Pixbuf), // image
typeof (int), // line
typeof (string), // desc
typeof (string), // path
@@ -93,7 +93,6 @@
void AddColumns ()
{
Gtk.CellRendererPixbuf iconRender = new Gtk.CellRendererPixbuf ();
- iconRender.StockSize = Gtk.IconSize.SmallToolbar;
Gtk.CellRendererToggle toggleRender = new Gtk.CellRendererToggle ();
toggleRender.Toggled += new ToggledHandler (ItemToggled);
@@ -101,7 +100,7 @@
Gtk.CellRendererText line = new Gtk.CellRendererText (), desc = new Gtk.CellRendererText () , path = new Gtk.CellRendererText (),
file = new Gtk.CellRendererText ();
- view.AppendColumn ("!" , iconRender , "stock-id", COL_TYPE);
+ view.AppendColumn ("!" , iconRender , "pixbuf", COL_TYPE);
view.AppendColumn ("" , toggleRender , "active" , COL_MARKED, "activatable", COL_READ);
view.AppendColumn (GettextCatalog.GetString ("Line") , line , "text" , COL_LINE, "weight", COL_READ_WEIGHT);
view.AppendColumn (GettextCatalog.GetString ("Description") , desc , "text" , COL_DESC, "weight", COL_READ_WEIGHT, "strikethrough", COL_MARKED);
@@ -159,19 +158,19 @@
TaskService taskService = (TaskService) ServiceManager.Services.GetService (typeof (TaskService));
foreach (Task t in taskService.Tasks) {
- string stock;
+ Gdk.Pixbuf stock;
switch (t.TaskType) {
case TaskType.Warning:
- stock = Gtk.Stock.DialogWarning;
+ stock = sw.RenderIcon (Gtk.Stock.DialogWarning, Gtk.IconSize.SmallToolbar, "");
break;
case TaskType.Error:
- stock = Gtk.Stock.DialogError;
+ stock = sw.RenderIcon (Gtk.Stock.DialogError, Gtk.IconSize.SmallToolbar, "");
break;
case TaskType.Comment:
- stock = Gtk.Stock.DialogInfo;
+ stock = sw.RenderIcon (Gtk.Stock.DialogInfo, Gtk.IconSize.SmallToolbar, "");
break;
case TaskType.SearchResult:
- stock = Gtk.Stock.DialogQuestion;
+ stock = sw.RenderIcon (Gtk.Stock.DialogQuestion, Gtk.IconSize.SmallToolbar, "");
break;
default:
stock = null;
Modified: trunk/MonoDevelop/src/Main/Base/Services/ParserService/DefaultParserService.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Services/ParserService/DefaultParserService.cs 2004-04-30 19:26:38 UTC (rev 1554)
+++ trunk/MonoDevelop/src/Main/Base/Services/ParserService/DefaultParserService.cs 2004-05-01 20:24:29 UTC (rev 1555)
@@ -103,7 +103,45 @@
return assemblyList;
}
}
+
+ string LoadAssemblyFromGac (string name) {
+ MethodInfo gac_get = typeof (System.Environment).GetMethod ("internalGetGacPath", BindingFlags.Static|BindingFlags.NonPublic);
+
+ if (gac_get == null)
+ return String.Empty;
+
+ string use_name = name;
+ string asmb_path;
+ string [] canidates;
+ if (name == "mscorlib")
+ return Path.Combine ((string) gac_get.Invoke (null, null), name + ".dll");
+
+ if (name.EndsWith (".dll"))
+ use_name = name.Substring (0, name.Length - 4);
+
+ asmb_path = Path.Combine (Path.Combine (Path.Combine ((string) gac_get.Invoke (null, null), "mono"), "gac"), use_name);
+
+ if (!Directory.Exists (asmb_path))
+ return String.Empty;
+
+ canidates = Directory.GetDirectories (asmb_path, GetSysVersion () + "*");
+ if (canidates.Length == 0)
+ canidates = Directory.GetDirectories (asmb_path);
+ if (canidates.Length == 0)
+ return String.Empty;
+
+ return Path.Combine (canidates [0], use_name + ".dll");
+ }
+
+ string sys_version;
+ string GetSysVersion () {
+ if (sys_version != null)
+ return sys_version;
+ sys_version = typeof (object).Assembly.GetName ().Version.ToString ();
+ return sys_version;
+ }
+
/// <remarks>
/// The initialize method writes the location of the code completion proxy
/// file to this string.
@@ -167,11 +205,11 @@
// convert all assemblies
for (int i = 0; i < assemblyList.Length; ++i) {
try {
- FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
- string path = fileUtilityService.GetDirectoryNameWithSeparator(System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory());
-
+ //FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
+ //string path = fileUtilityService.GetDirectoryNameWithSeparator(System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory());
+
AssemblyInformation frameworkAssemblyInformation = new AssemblyInformation();
- frameworkAssemblyInformation.Load(String.Concat(path, assemblyList[i], ".dll"), false);
+ frameworkAssemblyInformation.Load(LoadAssemblyFromGac (assemblyList[i]), false);
// create all class proxies
foreach (IClass newClass in frameworkAssemblyInformation.Classes) {
ClassProxy newProxy = new ClassProxy(newClass);
More information about the Monodevelop-patches-list
mailing list