+
+ /* special handling for the copy menu item -- copy the uri to the clipboard */
+ /* if it's a copy thingy, the uri will look like 'copy:http://slashdot.org' */
+ if (g_str_has_prefix (action_name, URI_ACTION_COPY)) {
+ GtkClipboard *clipboard = gtk_clipboard_get (GDK_NONE);
+ action_name += strlen(URI_ACTION_COPY); /* jump past the prefix */
+
+ if (g_str_has_prefix (action_name, "mailto:")) /* ignore mailto: prefixes */
+ action_name += strlen ("mailto:");
+
+ gtk_clipboard_set_text (clipboard, action_name, strlen (action_name));
+ return; /* we're done */
+ }