From 388ddc6dbd11e28740538a4d39d04f086e16c0c0 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sun, 9 Dec 2012 20:00:11 +0000 Subject: non-working "always show tabbar" option --- amiga/gui.c | 11 +++++++---- amiga/options.h | 3 +++ 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'amiga') diff --git a/amiga/gui.c b/amiga/gui.c index c30489e27..e2728c270 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -2318,7 +2318,7 @@ void ami_quit_netsurf_delayed(void) DisplayBeep(NULL); - int32 res = TimedDosRequesterTags(TDR_ImageType, TDRIMAGE_INFO, + res = TimedDosRequesterTags(TDR_ImageType, TDRIMAGE_INFO, TDR_TitleString, messages_get("NetSurf"), TDR_FormatString, utf8text, TDR_GadgetString, utf8gadgets, @@ -2697,8 +2697,10 @@ void ami_toggletabbar(struct gui_window_2 *gwin, bool show) RethinkLayout((struct Gadget *)gwin->objects[GID_MAIN], gwin->win, NULL, TRUE); - gwin->redraw_required = true; - gwin->bw->reformat_pending = true; + if(gwin->bw) { + gwin->redraw_required = true; + gwin->bw->reformat_pending = true; + } } struct gui_window *gui_create_browser_window(struct browser_window *bw, @@ -3264,6 +3266,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw, g->shared->win, NULL); ami_gui_hotlist_toolbar_add(g->shared); /* is this the right place for this? */ + if(nsoption_bool(tab_always_show)) ami_toggletabbar(g->shared, true); } else { @@ -3425,7 +3428,7 @@ void gui_window_destroy(struct gui_window *g) g->shared->tabs--; ami_switch_tab(g->shared,true); - if(g->shared->tabs == 1) + if((g->shared->tabs == 1) && (nsoption_bool(tab_always_show))) ami_toggletabbar(g->shared, false); ami_utf8_free(g->tabtitle); diff --git a/amiga/options.h b/amiga/options.h index 4b477b66c..dc0274da2 100644 --- a/amiga/options.h +++ b/amiga/options.h @@ -40,6 +40,7 @@ bool new_tab_active; \ bool new_tab_last; \ bool tab_close_warn; \ + bool tab_always_show; \ bool kiosk_mode; \ char *search_engines_file; \ char *arexx_dir; \ @@ -104,6 +105,7 @@ .new_tab_active = false, \ .new_tab_last = false, \ .tab_close_warn = true, \ + .tab_always_show = false, \ .kiosk_mode = false, \ .search_engines_file = NULL, \ .arexx_dir = NULL, \ @@ -167,6 +169,7 @@ { "new_tab_is_active", OPTION_BOOL, &nsoptions.new_tab_active}, \ { "new_tab_last", OPTION_BOOL, &nsoptions.new_tab_last}, \ { "tab_close_warn", OPTION_BOOL, &nsoptions.tab_close_warn}, \ +{ "tab_always_show", OPTION_BOOL, &nsoptions.tab_always_show}, \ { "kiosk_mode", OPTION_BOOL, &nsoptions.kiosk_mode}, \ { "search_engines_file",OPTION_STRING, &nsoptions.search_engines_file }, \ { "arexx_dir", OPTION_STRING, &nsoptions.arexx_dir }, \ -- cgit v1.2.3