summaryrefslogtreecommitdiff
path: root/amiga/gui.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2015-01-15 23:44:29 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2015-01-15 23:44:29 +0000
commit6255e8b1dce63995c8eb1fc6db177ce982e69911 (patch)
tree79249eb51fbc0db9a491466a1fb42eb88ea0e8b9 /amiga/gui.c
parent0415edc9c481f83f9741fa18844cf8a0ea92dd7a (diff)
downloadnetsurf-6255e8b1dce63995c8eb1fc6db177ce982e69911.tar.gz
netsurf-6255e8b1dce63995c8eb1fc6db177ce982e69911.tar.bz2
Use clicktab node addresses rather than clicktab numbers. This fixes #2254.
Diffstat (limited to 'amiga/gui.c')
-rw-r--r--amiga/gui.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index c5e65c9a2..e8283707e 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -4043,8 +4043,7 @@ void ami_close_all_tabs(struct gui_window_2 *gwin)
static void gui_window_destroy(struct gui_window *g)
{
- struct Node *ptab;
- int ptabnum = 0;
+ struct Node *ptab = NULL;
int gid;
if(!g) return;
@@ -4073,26 +4072,23 @@ static void gui_window_destroy(struct gui_window *g)
CLICKTAB_Labels,~0,
TAG_DONE);
- GetAttr(CLICKTAB_Current, g->shared->objects[GID_TABS],
- (ULONG *)&ptabnum);
+ GetAttr(CLICKTAB_CurrentNode, g->shared->objects[GID_TABS], (ULONG *)&ptab);
- if(ptabnum == g->tab)
- {
+ if(ptab == g->tab_node) {
ptab = GetSucc(g->tab_node);
if(!ptab) ptab = GetPred(g->tab_node);
-
- GetClickTabNodeAttrs(ptab,TNA_Number,(ULONG *)&ptabnum,TAG_DONE);
}
Remove(g->tab_node);
FreeClickTabNode(g->tab_node);
- RefreshSetGadgetAttrs((struct Gadget *)g->shared->objects[GID_TABS],g->shared->win,NULL,
- CLICKTAB_Labels,&g->shared->tab_list,
- CLICKTAB_Current,ptabnum,
+ RefreshSetGadgetAttrs((struct Gadget *)g->shared->objects[GID_TABS], g->shared->win, NULL,
+ CLICKTAB_Labels, &g->shared->tab_list,
+ CLICKTAB_CurrentNode, ptab,
TAG_DONE);
if(ClickTabBase->lib_Version < 53)
- RethinkLayout((struct Gadget *)g->shared->objects[GID_TABLAYOUT],g->shared->win,NULL,TRUE);
+ RethinkLayout((struct Gadget *)g->shared->objects[GID_TABLAYOUT],
+ g->shared->win, NULL, TRUE);
g->shared->tabs--;
ami_switch_tab(g->shared,true);