diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2011-07-02 22:40:45 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2011-07-02 22:40:45 +0000 |
commit | bb7408a56e4c2841ceee3ce6127b52695d8e131c (patch) | |
tree | 44a6c74bd4a96c6a668a268d4b72c8c3c105e5d2 /amiga/gui.c | |
parent | 18ca27a56f4b5b0f2a788e23ada0cdd843011a0e (diff) | |
download | netsurf-bb7408a56e4c2841ceee3ce6127b52695d8e131c.tar.gz netsurf-bb7408a56e4c2841ceee3ce6127b52695d8e131c.tar.bz2 |
When opening new tabs next to the active one, open them sequentially until the tab is
switched away from. This is more akin to how Firefox etc do it. Make this the
default.
svn path=/trunk/netsurf/; revision=12561
Diffstat (limited to 'amiga/gui.c')
-rwxr-xr-x | amiga/gui.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/amiga/gui.c b/amiga/gui.c index 6e115c2d8..f97434cf2 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -2068,6 +2068,9 @@ void ami_switch_tab(struct gui_window_2 *gwin,bool redraw) struct Node *tabnode; struct IBox *bbox; + /* Clear the last new tab list */ + gwin->bw->window->last_new_tab = NULL; + if(gwin->tabs == 0) return; gui_window_get_scroll(gwin->bw->window,&gwin->bw->window->scrollx,&gwin->bw->window->scrolly); @@ -2417,7 +2420,12 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw, } else { - Insert(&gwin->shared->tab_list, gwin->tab_node, clone->window->tab_node); + struct Node *insert_after = clone->window->tab_node; + + if(clone->window->last_new_tab) + insert_after = clone->window->last_new_tab; + Insert(&gwin->shared->tab_list, gwin->tab_node, insert_after); + clone->window->last_new_tab = gwin->tab_node; } RefreshSetGadgetAttrs((struct Gadget *)gwin->shared->objects[GID_TABS], |