protected void OnRepositoryUrlEntryClipboardPasted(object sender, EventArgs e) { Gtk.Clipboard clip = GetClipboard(Gdk.Atom.Intern("CLIPBOARD", false)); clip.RequestText(delegate(Gtk.Clipboard clp, string text) { if (String.IsNullOrEmpty(text)) { return; } Uri url; if (Uri.TryCreate(text, UriKind.Absolute, out url)) { repositoryUrlEntry.Text = text; } }); }
public void PasteText(object obj, EventArgs args) { Gtk.Clipboard clipboard = this.editor.GetClipboard(Gdk.Selection.Clipboard); clipboard.RequestText(new Gtk.ClipboardTextReceivedFunc(PasteReceived)); }
public void PasteClipboard() { Gtk.Clipboard clipboard = this.GetClipboard(Gdk.Selection.Clipboard); clipboard.RequestText(new Gtk.ClipboardTextReceivedFunc(PasteReceived)); }