[Gtk-sharp-list] A small patch

Duncan Mak duncan@ximian.com
25 Nov 2002 20:03:51 -0500


--=-a9h+b4qBAovB4l3pi2Bj
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hey,

I think it was Jaime on #mono that was having trouble getting the text
out of a TextBuffer. I whipped up this little patch. Should I check it
in? Should I leave the SetText method as is?

-- 
Duncan Mak <duncan@ximian.com>

--=-a9h+b4qBAovB4l3pi2Bj
Content-Disposition: attachment; filename=text.diff
Content-Transfer-Encoding: quoted-printable
Content-Type: text/x-patch; name=text.diff; charset=ISO-8859-1

Index: TextBuffer.custom
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/public/gtk-sharp/gtk/TextBuffer.custom,v
retrieving revision 1.1
diff -u -r1.1 TextBuffer.custom
--- TextBuffer.custom	25 Aug 2002 05:49:38 -0000	1.1
+++ TextBuffer.custom	25 Nov 2002 01:34:29 -0000
@@ -1,4 +1,11 @@
=20
-public void SetText (string text) {
-	gtk_text_buffer_set_text (Handle, text, text.Length);
+public string Text {
+=09
+	set {
+		gtk_text_buffer_set_text (Handle, value, value.Length);
+	}
+=09
+	get {
+		return GetText (StartIter, EndIter, false);
+	}
 }

--=-a9h+b4qBAovB4l3pi2Bj--