diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2016-09-10 20:36:11 +0100 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2016-09-10 20:36:11 +0100 |
commit | 1f96c0a413c26db03cd2921ef795972c47997747 (patch) | |
tree | 2b8dea3ba719068601da18c7c1a8b73dd87e8f40 /frontends/amiga/gui.c | |
parent | 7cbff32f92596119896582925978016e9d672f58 (diff) | |
download | netsurf-1f96c0a413c26db03cd2921ef795972c47997747.tar.gz netsurf-1f96c0a413c26db03cd2921ef795972c47997747.tar.bz2 |
Add an ACTIVE switch to the OPEN ARexx command to force new tabs to be active
Diffstat (limited to 'frontends/amiga/gui.c')
-rw-r--r-- | frontends/amiga/gui.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c index 9aaf182ee..0a324ca68 100644 --- a/frontends/amiga/gui.c +++ b/frontends/amiga/gui.c @@ -3476,6 +3476,19 @@ void ami_gui_set_scale(struct gui_window *gw, float scale) browser_window_set_scale(gw->bw, scale, true); } +void ami_gui_switch_to_new_tab(struct gui_window_2 *gwin) +{ + if(nsoption_bool(new_tab_is_active) == true) return; + + /* Switch to the just-opened tab (if new_tab_is_active, we already did!) */ + RefreshSetGadgetAttrs((struct Gadget *)gwin->objects[GID_TABS], + gwin->win, NULL, + CLICKTAB_CurrentNode, gwin->last_new_tab, + TAG_DONE); + + ami_switch_tab(gwin, false); +} + nserror ami_gui_new_blank_tab(struct gui_window_2 *gwin) { nsurl *url; @@ -3497,15 +3510,7 @@ nserror ami_gui_new_blank_tab(struct gui_window_2 *gwin) return error; } - if(nsoption_bool(new_tab_is_active) == false) { - /* Because this is a new blank tab, switch to it (if new_tab_is_active, we already did!) */ - RefreshSetGadgetAttrs((struct Gadget *)gwin->objects[GID_TABS], - gwin->win, NULL, - CLICKTAB_CurrentNode, gwin->last_new_tab, - TAG_DONE); - - ami_switch_tab(gwin, false); - } + ami_gui_switch_to_new_tab(gwin); return NSERROR_OK; } |