diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2010-06-26 16:26:05 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2010-06-26 16:26:05 +0000 |
commit | d36758ad9768e5f746b82f7f88ea86361365de52 (patch) | |
tree | 91d4849178ebdaa22815258d24ef3ad72ab7b1fe /amiga/gui.c | |
parent | cd8e367ce47c6b52f9119db015b755c15712b218 (diff) | |
download | netsurf-d36758ad9768e5f746b82f7f88ea86361365de52.tar.gz netsurf-d36758ad9768e5f746b82f7f88ea86361365de52.tar.bz2 |
Fix some types
If "easy" charset conversion fails, return a copy of the original string.
svn path=/trunk/netsurf/; revision=10580
Diffstat (limited to 'amiga/gui.c')
-rwxr-xr-x | amiga/gui.c | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/amiga/gui.c b/amiga/gui.c index c78967ebd..a3200bc18 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -2950,26 +2950,29 @@ void gui_window_set_title(struct gui_window *g, const char *title) { node = g->tab_node; - SetGadgetAttrs((struct Gadget *)g->shared->objects[GID_TABS], - g->shared->win, NULL, - CLICKTAB_Labels, ~0, - TAG_DONE); - - SetClickTabNodeAttrs(node, TNA_Text, utf8title, - TNA_HintInfo, utf8title, - TAG_DONE); - - RefreshSetGadgetAttrs((struct Gadget *)g->shared->objects[GID_TABS], + if((g->tabtitle == NULL) || (strcmp(utf8title, g->tabtitle))) + { + SetGadgetAttrs((struct Gadget *)g->shared->objects[GID_TABS], g->shared->win, NULL, - CLICKTAB_Labels, &g->shared->tab_list, + CLICKTAB_Labels, ~0, TAG_DONE); - if(g->tabtitle) ami_utf8_free(g->tabtitle); - g->tabtitle = utf8title; + SetClickTabNodeAttrs(node, TNA_Text, utf8title, + TNA_HintInfo, utf8title, + TAG_DONE); - if(ClickTabBase->lib_Version < 53) - RethinkLayout((struct Gadget *)g->shared->objects[GID_TABLAYOUT], - g->shared->win, NULL, TRUE); + RefreshSetGadgetAttrs((struct Gadget *)g->shared->objects[GID_TABS], + g->shared->win, NULL, + CLICKTAB_Labels, &g->shared->tab_list, + TAG_DONE); + + if(g->tabtitle) ami_utf8_free(g->tabtitle); + g->tabtitle = utf8title; + + if(ClickTabBase->lib_Version < 53) + RethinkLayout((struct Gadget *)g->shared->objects[GID_TABLAYOUT], + g->shared->win, NULL, TRUE); + } GetAttr(CLICKTAB_Current, g->shared->objects[GID_TABS], (ULONG *)&cur_tab); |