2008-01-08 Luca Bruno <lethalman88@gmail.com>
[WebKit-https.git] / WebCore / platform / gtk / PasteboardGtk.cpp
index c500a6dcf085c283317f1bd572b6f5071a42cf7e..7395a38cc6b1bbf9da1ff3bf7cbe77eeb854d7ea 100644 (file)
@@ -114,9 +114,13 @@ void Pasteboard::writeSelection(Range* selectedRange, bool canSmartCopyOrDelete,
     gtk_target_table_free(targets, n_targets);
 }
 
-void Pasteboard::writeURL(const KURL&, const String&, Frame*)
+void Pasteboard::writeURL(const KURL& url, const String&, Frame* frame)
 {
-    notImplemented();
+    if (url.isEmpty())
+        return;
+
+    GtkClipboard* clipboard = m_helper->getClipboard(frame);
+    gtk_clipboard_set_text(clipboard, url.string().utf8().data(), url.string().utf8().length());
 }
 
 void Pasteboard::writeImage(Node* node, const KURL&, const String&)
@@ -155,7 +159,7 @@ bool Pasteboard::canSmartReplace()
 PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame* frame, PassRefPtr<Range> context,
                                                           bool allowPlainText, bool& chosePlainText)
 {
-#if GLIB_CHECK_VERSION(2,10,0)
+#if GTK_CHECK_VERSION(2,10,0)
     GdkAtom textHtml = gdk_atom_intern_static_string("text/html");
 #else
     GdkAtom textHtml = gdk_atom_intern("text/html", false);