[Gtk-sharp-list] gtksourceview-sharp fix against gtk-sharp-1.9.3

Peter Johanson latexer@gentoo.org
Wed, 13 Apr 2005 18:28:05 -0700

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hey all,

Updated to the 1.9.3 gtk-sharp that showed up on SF, and found that SVN
MD had a crasher in the Editor highlighting properties page. Source of
the problem is in the SList created in SourceLanguagesManager, which is
constructed without an explicit System.Type.

Patch to fix is attached, but what all changed from the previous SList
behavior that this can no longer be inferred?


Peter Johanson

Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="gtksourceview-svn-slist-fix.diff"

Index: gtksourceview/SourceLanguagesManager.custom
--- gtksourceview/SourceLanguagesManager.custom	(revision 42972)
+++ gtksourceview/SourceLanguagesManager.custom	(working copy)
@@ -5,7 +5,7 @@
 		public SourceLanguage[] AvailableLanguages {
 			get {
 				IntPtr raw_ret = gtk_source_languages_manager_get_available_languages(Handle);
-				GLib.SList list = new GLib.SList(raw_ret);
+				GLib.SList list = new GLib.SList(raw_ret, typeof(SourceLanguage));
 				SourceLanguage[] result = new SourceLanguage [list.Count];
 				for (int i = 0; i < list.Count; i++)
 					result  [i] = list [i] as SourceLanguage;