summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2011-07-02 22:40:45 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2011-07-02 22:40:45 +0000
commitbb7408a56e4c2841ceee3ce6127b52695d8e131c (patch)
tree44a6c74bd4a96c6a668a268d4b72c8c3c105e5d2
parent18ca27a56f4b5b0f2a788e23ada0cdd843011a0e (diff)
downloadnetsurf-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
-rwxr-xr-xamiga/gui.c10
-rwxr-xr-xamiga/gui.h1
-rw-r--r--amiga/options.h2
3 files changed, 11 insertions, 2 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],
diff --git a/amiga/gui.h b/amiga/gui.h
index d7602da4b..2264a350e 100755
--- a/amiga/gui.h
+++ b/amiga/gui.h
@@ -114,6 +114,7 @@ struct gui_window
struct gui_window_2 *shared;
int tab;
struct Node *tab_node;
+ struct Node *last_new_tab;
int c_x; /* Caret X posn */
int c_y; /* Caret Y posn */
int c_w; /* Caret width */
diff --git a/amiga/options.h b/amiga/options.h
index 7101bbfe8..ec650ff86 100644
--- a/amiga/options.h
+++ b/amiga/options.h
@@ -80,7 +80,7 @@ bool option_sticky_context_menu = false; \
bool option_truecolour_mouse_pointers = false; \
bool option_use_os_pointers = true; \
bool option_new_tab_active = false; \
-bool option_new_tab_last = true; \
+bool option_new_tab_last = false; \
bool option_kiosk_mode = false; \
char *option_search_engines_file = 0; \
char *option_search_ico_file = 0; \