From 1c1347a215ff6c47b1494ff6edf9029bf7cf2dd1 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sun, 1 Feb 2009 13:26:21 +0000 Subject: Convert UTF-8 titles to local charset for display in tabs Disable keyboard shortcuts for tabs as an underscore in the title was causing keypresses to be ignored or tabs to be switched unexpectedly svn path=/trunk/netsurf/; revision=6329 --- amiga/gui.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'amiga/gui.c') diff --git a/amiga/gui.c b/amiga/gui.c index 0abedd45f..7fcf0ac36 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -1819,6 +1819,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw, LAYOUT_AddChild, gwin->shared->gadgets[GID_TABS] = ClickTabObject, GA_ID,GID_TABS, GA_RelVerify,TRUE, + GA_Underscore,13, // disable kb shortcuts CLICKTAB_Labels,&gwin->shared->tab_list, CLICKTAB_LabelTruncate,TRUE, ClickTabEnd, @@ -2004,7 +2005,7 @@ void gui_window_set_title(struct gui_window *g, const char *title) { struct Node *node; ULONG cur_tab = 0; - STRPTR oldtitle; + STRPTR newtitle = NULL; if(!g) return; @@ -2015,7 +2016,9 @@ void gui_window_set_title(struct gui_window *g, const char *title) SetGadgetAttrs(g->shared->gadgets[GID_TABS],g->shared->win,NULL, CLICKTAB_Labels,~0, TAG_DONE); - SetClickTabNodeAttrs(node,TNA_Text,title,TAG_DONE); + newtitle = ami_utf8_easy(title); + SetClickTabNodeAttrs(node,TNA_Text,ami_utf8_easy(newtitle),TAG_DONE); + if(newtitle) ami_utf8_free(newtitle); RefreshSetGadgetAttrs(g->shared->gadgets[GID_TABS],g->shared->win,NULL, CLICKTAB_Labels,&g->shared->tab_list, TAG_DONE); -- cgit v1.2.3