Use core clipboard copy function. ami_selection_to_text() will need fixing as it still needs selection_traverse()

This commit is contained in:
Chris Young 2012-08-03 18:19:54 +01:00
parent 18db6826f1
commit cc3b9435ea

View File

@ -247,23 +247,6 @@ bool gui_commit_clipboard(void)
return true;
}
bool ami_clipboard_copy(const char *text, size_t length, struct box *box,
void *handle, const char *whitespace_text,size_t whitespace_length)
{
if (whitespace_text)
{
if(!ami_add_to_clipboard(whitespace_text,whitespace_length, false)) return false;
}
if(text)
{
bool add_space = box != NULL ? box->space != 0 : false;
if (!ami_add_to_clipboard(text, length, add_space)) return false;
}
return true;
}
bool gui_copy_to_clipboard(struct selection *s)
{
bool success;
@ -271,7 +254,7 @@ bool gui_copy_to_clipboard(struct selection *s)
if(s->defined == false) return false;
if(!gui_empty_clipboard()) return false;
success = selection_traverse(s, ami_clipboard_copy, NULL);
success = selection_copy_to_clipboard(s);
/* commit regardless, otherwise we leave the clipboard in an unusable state */
gui_commit_clipboard();