[Monodevelop-patches-list] r746 - trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Sun Feb 1 18:52:06 EST 2004
Author: benm
Date: 2004-02-01 18:52:06 -0500 (Sun, 01 Feb 2004)
New Revision: 746
Modified:
trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs
Log:
use vfs to get mime type --> highlight all kinds of files
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs 2004-02-01 23:41:21 UTC (rev 745)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs 2004-02-01 23:52:06 UTC (rev 746)
@@ -13,6 +13,8 @@
using Gtk;
using GtkSharp;
+using MonoDevelop.GuiUtils;
+
namespace MonoDevelop.SourceEditor.Gui {
public class SourceEditorDisplayBinding : IDisplayBinding {
@@ -131,11 +133,8 @@
public override void Load (string fileName)
{
- if (fileName.EndsWith (".cs"))
- se.Buffer.LoadFile (fileName, "text/x-csharp");
- else
- se.Buffer.LoadFile (fileName);
-
+ se.Buffer.LoadFile (fileName, Vfs.GetMimeType (fileName));
+
ContentName = fileName;
}
More information about the Monodevelop-patches-list
mailing list