summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2011-04-30 11:11:34 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2011-04-30 11:11:34 +0000
commit9f9436bf40609d1b0a334683729d9513b27b0862 (patch)
tree1bb8581f5cbe4c6e8ab84551a035ac5ceccfcc95 /amiga
parentebd0145eafa5bf13d704f6f56898e3e864fb5848 (diff)
downloadnetsurf-9f9436bf40609d1b0a334683729d9513b27b0862.tar.gz
netsurf-9f9436bf40609d1b0a334683729d9513b27b0862.tar.bz2
Ensure drags to string gadgets are in local charset
svn path=/trunk/netsurf/; revision=12262
Diffstat (limited to 'amiga')
-rwxr-xr-xamiga/clipboard.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/amiga/clipboard.c b/amiga/clipboard.c
index 314692731..a8122f1bd 100755
--- a/amiga/clipboard.c
+++ b/amiga/clipboard.c
@@ -330,6 +330,7 @@ void ami_drag_selection(struct selection *s)
struct box *text_box;
int x;
int y;
+ char *utf8text;
struct ami_text_selection *sel;
struct IFFHandle *old_iffh = iffh;
struct gui_window_2 *gwin = ami_window_at_pointer();
@@ -365,18 +366,22 @@ void ami_drag_selection(struct selection *s)
{
if(sel = ami_selection_to_text(gwin))
{
+ utf8text = ami_utf8_easy(sel->text);
RefreshSetGadgetAttrs((struct Gadget *)gwin->objects[GID_URL],
- gwin->win, NULL, STRINGA_TextVal, sel->text, TAG_DONE);
+ gwin->win, NULL, STRINGA_TextVal, utf8text, TAG_DONE);
FreeVec(sel);
+ ami_utf8_free(utf8text);
}
}
else if(ami_gadget_hit(gwin->objects[GID_SEARCHSTRING], x, y))
{
if(sel = ami_selection_to_text(gwin))
{
+ utf8text = ami_utf8_easy(sel->text);
RefreshSetGadgetAttrs((struct Gadget *)gwin->objects[GID_SEARCHSTRING],
- gwin->win, NULL, STRINGA_TextVal, sel->text, TAG_DONE);
+ gwin->win, NULL, STRINGA_TextVal, utf8text, TAG_DONE);
FreeVec(sel);
+ ami_utf8_free(utf8text);
}
}
else