Toggle the tab bar to the correct state if the option to always show it is changed and only one tab is currently open
This commit is contained in:
parent
af8c3ef0c3
commit
02a4bfd375
27
amiga/gui.c
27
amiga/gui.c
|
@ -2703,6 +2703,33 @@ void ami_toggletabbar(struct gui_window_2 *gwin, bool show)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ami_gui_tabs_toggle_all(void)
|
||||||
|
{
|
||||||
|
struct nsObject *node;
|
||||||
|
struct nsObject *nnode;
|
||||||
|
struct gui_window_2 *gwin;
|
||||||
|
|
||||||
|
if(IsMinListEmpty(window_list)) return;
|
||||||
|
|
||||||
|
node = (struct nsObject *)GetHead((struct List *)window_list);
|
||||||
|
|
||||||
|
do {
|
||||||
|
nnode=(struct nsObject *)GetSucc((struct Node *)node);
|
||||||
|
gwin = node->objstruct;
|
||||||
|
|
||||||
|
if(node->Type == AMINS_WINDOW)
|
||||||
|
{
|
||||||
|
if(gwin->tabs == 1) {
|
||||||
|
if(nsoption_bool(tab_always_show) == true) {
|
||||||
|
ami_toggletabbar(gwin, true);
|
||||||
|
} else {
|
||||||
|
ami_toggletabbar(gwin, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} while(node = nnode);
|
||||||
|
}
|
||||||
|
|
||||||
struct gui_window *gui_create_browser_window(struct browser_window *bw,
|
struct gui_window *gui_create_browser_window(struct browser_window *bw,
|
||||||
struct browser_window *clone, bool new_tab)
|
struct browser_window *clone, bool new_tab)
|
||||||
{
|
{
|
||||||
|
|
|
@ -154,6 +154,7 @@ bool ami_text_box_at_point(struct gui_window_2 *gwin, ULONG *x, ULONG *y);
|
||||||
BOOL ami_gadget_hit(Object *obj, int x, int y);
|
BOOL ami_gadget_hit(Object *obj, int x, int y);
|
||||||
void ami_gui_history(struct gui_window_2 *gwin, bool back);
|
void ami_gui_history(struct gui_window_2 *gwin, bool back);
|
||||||
void ami_gui_hotlist_toolbar_update_all(void);
|
void ami_gui_hotlist_toolbar_update_all(void);
|
||||||
|
void ami_gui_tabs_toggle_all(void);
|
||||||
|
|
||||||
struct TextFont *origrpfont;
|
struct TextFont *origrpfont;
|
||||||
struct MinList *window_list;
|
struct MinList *window_list;
|
||||||
|
|
|
@ -1450,6 +1450,7 @@ void ami_gui_opts_use(bool save)
|
||||||
struct TextAttr *tattr;
|
struct TextAttr *tattr;
|
||||||
char *dot;
|
char *dot;
|
||||||
bool rescan_fonts = false;
|
bool rescan_fonts = false;
|
||||||
|
bool old_tab_always_show;
|
||||||
|
|
||||||
SetWindowPointer(gow->win,
|
SetWindowPointer(gow->win,
|
||||||
WA_BusyPointer, TRUE,
|
WA_BusyPointer, TRUE,
|
||||||
|
@ -1689,12 +1690,17 @@ void ami_gui_opts_use(bool save)
|
||||||
}
|
}
|
||||||
|
|
||||||
GetAttr(GA_Selected,gow->objects[GID_OPTS_TAB_ALWAYS],(ULONG *)&data);
|
GetAttr(GA_Selected,gow->objects[GID_OPTS_TAB_ALWAYS],(ULONG *)&data);
|
||||||
|
old_tab_always_show = nsoption_bool(tab_always_show);
|
||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
nsoption_set_bool(tab_always_show, true);
|
nsoption_set_bool(tab_always_show, true);
|
||||||
} else {
|
} else {
|
||||||
nsoption_set_bool(tab_always_show, false);
|
nsoption_set_bool(tab_always_show, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(old_tab_always_show != nsoption_bool(tab_always_show))
|
||||||
|
ami_gui_tabs_toggle_all();
|
||||||
|
|
||||||
GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_SEARCH_PROV],(ULONG *)&nsoption_int(search_provider));
|
GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_SEARCH_PROV],(ULONG *)&nsoption_int(search_provider));
|
||||||
search_web_provider_details(nsoption_int(search_provider));
|
search_web_provider_details(nsoption_int(search_provider));
|
||||||
search_web_retrieve_ico(false);
|
search_web_retrieve_ico(false);
|
||||||
|
|
Loading…
Reference in New Issue