From 1d976329585117ae2214dbec749389b075137fd9 Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Thu, 19 Feb 2004 23:18:43 +0000 Subject: [PATCH] =?UTF-8?q?2004-02-19=20=20Thiago=20Milczarek=20Say?= =?UTF-8?q?=EF=BF=BD=EF=BF=BDo=20=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gtk/TextBuffer.custom : new InsertWithTags method. svn path=/trunk/gtk-sharp/; revision=23262 --- ChangeLog | 4 ++++ gtk/TextBuffer.custom | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2781838cc..519e46fe4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-02-19 Thiago Milczarek SayĆ£o + + * gtk/TextBuffer.custom : new InsertWithTags method. + 2004-02-18 Mike Kestner * gdk/Gdk.metadata : hide EventFocus and EventConfigure. diff --git a/gtk/TextBuffer.custom b/gtk/TextBuffer.custom index b9631afd0..98835d770 100644 --- a/gtk/TextBuffer.custom +++ b/gtk/TextBuffer.custom @@ -22,3 +22,16 @@ public void PasteClipboard (Gtk.Clipboard clipboard) gtk_text_buffer_paste_clipboard(Handle, clipboard.Handle, IntPtr.Zero, true); } +public void InsertWithTags (string text, params TextTag[] tags) +{ + TextIter iter; + + this.Insert (EndIter, text); + iter = this.GetIterAtOffset (EndIter.Offset - text.Length); + + foreach (TextTag t in tags) + { + this.ApplyTag (t, iter, EndIter); + } +} +