non-working "always show tabbar" option

This commit is contained in:
Chris Young 2012-12-09 20:00:11 +00:00
parent 3ef843fcb4
commit 388ddc6dbd
2 changed files with 10 additions and 4 deletions

View File

@ -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);

View File

@ -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 }, \