From 1acc32b3a952c5d5526193ac546389c0a42420e3 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sun, 31 Jan 2016 17:10:47 +0000 Subject: [PATCH] Force always show tabs when clicktab.gadget is older than v53 --- amiga/gui.c | 8 ++++---- amiga/gui_options.c | 7 ++++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/amiga/gui.c b/amiga/gui.c index 41a0a4559..2eb498487 100644 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -556,6 +556,10 @@ static nserror ami_set_options(struct nsoption_s *defaults) */ nsoption_set_bool(core_select_menu, true); + /* ClickTab < 53 doesn't work with the auto show/hide tab-bar (for reasons forgotten) */ + if(ClickTabBase->lib_Version < 53) + nsoption_set_bool(tab_always_show, true); + /* Some AmigaOS3 overrides */ #ifndef __amigaos4__ nsoption_set_bool(download_notify, false); @@ -3985,7 +3989,6 @@ gui_window_create(struct browser_window *bw, if(ClickTabBase->lib_Version < 53) { -//#ifdef __amigaos4__ addtabclosegadget = LAYOUT_AddChild; g->shared->objects[GID_CLOSETAB] = ButtonObj, GA_ID, GID_CLOSETAB, @@ -4007,9 +4010,6 @@ gui_window_create(struct browser_window *bw, GA_Text, "+", BUTTON_RenderImage, g->shared->objects[GID_ADDTAB_BM], ButtonEnd; -//#else -//#warning OS3 tab bar permanently disabled! -//#endif } else { diff --git a/amiga/gui_options.c b/amiga/gui_options.c index cd238801a..3be0cd55f 100755 --- a/amiga/gui_options.c +++ b/amiga/gui_options.c @@ -504,7 +504,7 @@ void ami_gui_opts_open(void) BOOL disableanims, animspeeddisabled = FALSE, acceptlangdisabled = FALSE; BOOL scaleselected = nsoption_bool(scale_quality), scaledisabled = FALSE; BOOL ditherdisable = TRUE, nativebm_disable = FALSE; - BOOL download_notify_disabled = FALSE; + BOOL download_notify_disabled = FALSE, tab_always_show_disabled = FALSE; BOOL ptr_disable = FALSE; char animspeed[10]; char *homepage_url_lc = ami_utf8_easy(nsoption_charp(homepage_url)); @@ -602,6 +602,10 @@ void ami_gui_opts_open(void) nsoption_set_bool(download_notify, FALSE); } + if(ClickTabBase->lib_Version < 53) { + tab_always_show_disabled = TRUE; + } + fontsans.ta_Name = ASPrintf("%s.font", nsoption_charp(font_sans)); fontserif.ta_Name = ASPrintf("%s.font", nsoption_charp(font_serif)); fontmono.ta_Name = ASPrintf("%s.font", nsoption_charp(font_mono)); @@ -1344,6 +1348,7 @@ void ami_gui_opts_open(void) GA_RelVerify, TRUE, GA_Text, gadlab[GID_OPTS_TAB_ALWAYS], GA_Selected, nsoption_bool(tab_always_show), + GA_Disabled, tab_always_show_disabled, CheckBoxEnd, LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_CLOSE] = CheckBoxObj, GA_ID, GID_OPTS_TAB_CLOSE,