[Gtk-sharp-list] gtk_text_buffer_paste_clipboard () -related patch

Philip Van Hoof spamfrommailing@freax.org
23 May 2003 13:51:30 +0200


--=-pNEYBcj5SDOOdmsb70pV
Content-Type: text/plain
Content-Transfer-Encoding: 7bit


Hi there Duncan, 

I am E-mailing yout this because you have the E-mail adres that came
first in the ChangeLog of gtk-sharp after I searched for "TextBuffer"
;). I've also placed gtk-sharp-list in CC.

This adds a overloaded method to TextBuffer.PasteClipboard to make it
more easy to paste the clipboard at the cursor



-- 
Philip Van Hoof a.k.a. freax
me at freax dot org
http://www.freax.be -- http://www.freax.eu.org -- http://www.freax.org



--=-pNEYBcj5SDOOdmsb70pV
Content-Disposition: attachment; filename=TextBuffer.custom.diff
Content-Type: text/x-patch; name=TextBuffer.custom.diff; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Index: Dialog.custom
===================================================================
RCS file: /mono/gtk-sharp/gtk/Dialog.custom,v
retrieving revision 1.3
diff -u -u -r1.3 Dialog.custom
--- Dialog.custom	22 Feb 2003 04:34:56 -0000	1.3
+++ Dialog.custom	23 May 2003 11:47:45 -0000
@@ -17,6 +17,16 @@
 	Raw = gtk_dialog_new_with_buttons (title, parent.Handle, (int) flags, IntPtr.Zero);
 }
 
+[DllImport("libgtk-win32-2.0-0.dll")]
+static extern IntPtr gtk_dialog_add_button(IntPtr raw, Stock s, int response_id);
+
+/// <summary> AddButtons Method </summary>
+public Gtk.Widget AddButton(Stock s, int response_id) {
+	IntPtr raw_ret = gtk_dialog_add_button(Handle, s, response_id);
+	Gtk.Widget ret = (Gtk.Widget) GLib.Object.GetObject(raw_ret);
+	return ret;
+}
+
 [DllImport("gtksharpglue")]
 static extern IntPtr gtksharp_dialog_get_vbox (IntPtr i);
 public Gtk.VBox VBox {
@@ -28,4 +38,3 @@
 public Gtk.VBox ActionArea {
 	get { return new Gtk.VBox (gtksharp_dialog_get_action_area (this.Handle)); }
 }
-
Index: TextBuffer.custom
===================================================================
RCS file: /mono/gtk-sharp/gtk/TextBuffer.custom,v
retrieving revision 1.6
diff -u -u -r1.6 TextBuffer.custom
--- TextBuffer.custom	16 Mar 2003 00:08:18 -0000	1.6
+++ TextBuffer.custom	23 May 2003 11:47:45 -0000
@@ -22,3 +22,9 @@
 
         return iter;
 }
+
+/// <summary> PasteClipboard Method </summary>
+/// <remarks> Pastes the contents of a clipboard at the cursor </remarks>
+public void PasteClipboard(Gtk.Clipboard clipboard, bool default_editable) {
+        gtk_text_buffer_paste_clipboard(Handle, clipboard.Handle, null, default_editable);
+}

--=-pNEYBcj5SDOOdmsb70pV--