summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2009-02-01 13:26:21 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2009-02-01 13:26:21 +0000
commit1c1347a215ff6c47b1494ff6edf9029bf7cf2dd1 (patch)
tree9a44d7d57113cb35d0b0db5d5e5c06c6aea43bd0 /amiga
parentfb0a2116a35b7424609e3e698b521f8a08bc5e1f (diff)
downloadnetsurf-1c1347a215ff6c47b1494ff6edf9029bf7cf2dd1.tar.gz
netsurf-1c1347a215ff6c47b1494ff6edf9029bf7cf2dd1.tar.bz2
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
Diffstat (limited to 'amiga')
-rwxr-xr-xamiga/gui.c7
1 files changed, 5 insertions, 2 deletions
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);