Force always show tabs when clicktab.gadget is older than v53

This commit is contained in:
Chris Young 2016-01-31 17:10:47 +00:00
parent 7729d93696
commit 1acc32b3a9
2 changed files with 10 additions and 5 deletions

View File

@ -556,6 +556,10 @@ static nserror ami_set_options(struct nsoption_s *defaults)
*/ */
nsoption_set_bool(core_select_menu, true); 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 */ /* Some AmigaOS3 overrides */
#ifndef __amigaos4__ #ifndef __amigaos4__
nsoption_set_bool(download_notify, false); nsoption_set_bool(download_notify, false);
@ -3985,7 +3989,6 @@ gui_window_create(struct browser_window *bw,
if(ClickTabBase->lib_Version < 53) if(ClickTabBase->lib_Version < 53)
{ {
//#ifdef __amigaos4__
addtabclosegadget = LAYOUT_AddChild; addtabclosegadget = LAYOUT_AddChild;
g->shared->objects[GID_CLOSETAB] = ButtonObj, g->shared->objects[GID_CLOSETAB] = ButtonObj,
GA_ID, GID_CLOSETAB, GA_ID, GID_CLOSETAB,
@ -4007,9 +4010,6 @@ gui_window_create(struct browser_window *bw,
GA_Text, "+", GA_Text, "+",
BUTTON_RenderImage, g->shared->objects[GID_ADDTAB_BM], BUTTON_RenderImage, g->shared->objects[GID_ADDTAB_BM],
ButtonEnd; ButtonEnd;
//#else
//#warning OS3 tab bar permanently disabled!
//#endif
} }
else else
{ {

View File

@ -504,7 +504,7 @@ void ami_gui_opts_open(void)
BOOL disableanims, animspeeddisabled = FALSE, acceptlangdisabled = FALSE; BOOL disableanims, animspeeddisabled = FALSE, acceptlangdisabled = FALSE;
BOOL scaleselected = nsoption_bool(scale_quality), scaledisabled = FALSE; BOOL scaleselected = nsoption_bool(scale_quality), scaledisabled = FALSE;
BOOL ditherdisable = TRUE, nativebm_disable = 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; BOOL ptr_disable = FALSE;
char animspeed[10]; char animspeed[10];
char *homepage_url_lc = ami_utf8_easy(nsoption_charp(homepage_url)); 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); 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)); fontsans.ta_Name = ASPrintf("%s.font", nsoption_charp(font_sans));
fontserif.ta_Name = ASPrintf("%s.font", nsoption_charp(font_serif)); fontserif.ta_Name = ASPrintf("%s.font", nsoption_charp(font_serif));
fontmono.ta_Name = ASPrintf("%s.font", nsoption_charp(font_mono)); fontmono.ta_Name = ASPrintf("%s.font", nsoption_charp(font_mono));
@ -1344,6 +1348,7 @@ void ami_gui_opts_open(void)
GA_RelVerify, TRUE, GA_RelVerify, TRUE,
GA_Text, gadlab[GID_OPTS_TAB_ALWAYS], GA_Text, gadlab[GID_OPTS_TAB_ALWAYS],
GA_Selected, nsoption_bool(tab_always_show), GA_Selected, nsoption_bool(tab_always_show),
GA_Disabled, tab_always_show_disabled,
CheckBoxEnd, CheckBoxEnd,
LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_CLOSE] = CheckBoxObj, LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_CLOSE] = CheckBoxObj,
GA_ID, GID_OPTS_TAB_CLOSE, GA_ID, GID_OPTS_TAB_CLOSE,