[Monodevelop-patches-list] r842 - in trunk/MonoDevelop/src: AddIns/DisplayBindings/SourceEditor/Gui Main/Base/Services/DisplayBinding
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Mon Feb 9 01:11:49 EST 2004
Author: tberman
Date: 2004-02-09 01:11:49 -0500 (Mon, 09 Feb 2004)
New Revision: 842
Modified:
trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorBuffer.cs
trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs
trunk/MonoDevelop/src/Main/Base/Services/DisplayBinding/DisplayBindingService.cs
Log:
now you can open a lot of non-.cs files without lots of segfault lovin.
btw: 'shit'
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorBuffer.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorBuffer.cs 2004-02-09 05:22:51 UTC (rev 841)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorBuffer.cs 2004-02-09 06:11:49 UTC (rev 842)
@@ -72,8 +72,11 @@
public void LoadText (string text, string mime)
{
- Language = slm.GetLanguageFromMimeType (mime);
+ SourceLanguage lang = slm.GetLanguageFromMimeType (mime);
+ if (lang != null)
+ Language = lang;
+
using (NoUndo n = new NoUndo (this))
Text = text;
@@ -351,4 +354,4 @@
#endregion
}
-}
\ No newline at end of file
+}
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs 2004-02-09 05:22:51 UTC (rev 841)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs 2004-02-09 06:11:49 UTC (rev 842)
@@ -57,7 +57,7 @@
if (language == "C#")
language = "text/x-csharp";
else
- language = null;
+ language = "text/plain";
w.LoadString (language, content);
return w;
@@ -71,7 +71,7 @@
if (language == "C#")
language = "text/x-csharp";
else
- language = null;
+ language = "text/plain";
w.LoadString (language, content);
return w;
Modified: trunk/MonoDevelop/src/Main/Base/Services/DisplayBinding/DisplayBindingService.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Services/DisplayBinding/DisplayBindingService.cs 2004-02-09 05:22:51 UTC (rev 841)
+++ trunk/MonoDevelop/src/Main/Base/Services/DisplayBinding/DisplayBindingService.cs 2004-02-09 06:11:49 UTC (rev 842)
@@ -52,7 +52,7 @@
}
}
}
- Console.WriteLine ("Didnt match on mimetype, trying filename");
+ Console.WriteLine ("Didnt match on mimetype: " + mimetype + ", trying filename");
foreach (DisplayBindingCodon binding in bindings) {
if (binding.DisplayBinding != null && binding.DisplayBinding.CanCreateContentForFile(filename)) {
return binding;
More information about the Monodevelop-patches-list
mailing list