mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-28 17:23:09 +03:00
Indicate when tabs are loading. Currently this only works with the AISS theme (and
probably only under OS4.1), showing a yellow flag on tabs which are currently loading. In the future this could be expanded to show a proper animated throbber on loading tabs, maybe instead of the main throbber. svn path=/trunk/netsurf/; revision=9548
This commit is contained in:
parent
dac634f6fd
commit
a3d57f2c3c
25
amiga/gui.c
25
amiga/gui.c
@ -1705,6 +1705,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
|
||||
char reload[100],reload_s[100],reload_g[100];
|
||||
char home[100],home_s[100],home_g[100];
|
||||
char closetab[100],closetab_s[100],closetab_g[100];
|
||||
char tabthrobber[100];
|
||||
|
||||
if((bw->browser_window_type == BROWSER_WINDOW_IFRAME) && option_no_iframes) return NULL;
|
||||
|
||||
@ -1884,6 +1885,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
|
||||
ami_get_theme_filename(closetab,"theme_closetab");
|
||||
ami_get_theme_filename(closetab_s,"theme_closetab_s");
|
||||
ami_get_theme_filename(closetab_g,"theme_closetab_g");
|
||||
ami_get_theme_filename(tabthrobber,"theme_tab_loading");
|
||||
|
||||
gwin->shared->objects[OID_MAIN] = WindowObject,
|
||||
WA_ScreenTitle,nsscreentitle,
|
||||
@ -2046,6 +2048,11 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
|
||||
GA_Underscore,13, // disable kb shortcuts
|
||||
CLICKTAB_Labels,&gwin->shared->tab_list,
|
||||
CLICKTAB_LabelTruncate,TRUE,
|
||||
CLICKTAB_FlagImage, BitMapObject,
|
||||
BITMAP_SourceFile, tabthrobber,
|
||||
BITMAP_Screen,scrn,
|
||||
BITMAP_Masking,TRUE,
|
||||
BitMapEnd,
|
||||
ClickTabEnd,
|
||||
CHILD_CacheDomain,FALSE,
|
||||
LayoutEnd,
|
||||
@ -3003,7 +3010,13 @@ void gui_window_start_throbber(struct gui_window *g)
|
||||
|
||||
if(!g) return;
|
||||
|
||||
if(g->tab_node) GetAttr(CLICKTAB_Current,g->shared->gadgets[GID_TABS],(ULONG *)&cur_tab);
|
||||
if(g->tab_node)
|
||||
{
|
||||
GetAttr(CLICKTAB_Current,g->shared->gadgets[GID_TABS],(ULONG *)&cur_tab);
|
||||
SetClickTabNodeAttrs(g->tab_node, TNA_Flagged, TRUE, TAG_DONE);
|
||||
RefreshGadgets((APTR)g->shared->gadgets[GID_TABS],
|
||||
g->shared->win, NULL);
|
||||
}
|
||||
|
||||
g->throbbing = true;
|
||||
|
||||
@ -3024,8 +3037,14 @@ void gui_window_stop_throbber(struct gui_window *g)
|
||||
|
||||
if(!g) return;
|
||||
|
||||
if(g->tab_node) GetAttr(CLICKTAB_Current, g->shared->gadgets[GID_TABS],
|
||||
(ULONG *)&cur_tab);
|
||||
if(g->tab_node)
|
||||
{
|
||||
GetAttr(CLICKTAB_Current, g->shared->gadgets[GID_TABS],
|
||||
(ULONG *)&cur_tab);
|
||||
SetClickTabNodeAttrs(g->tab_node, TNA_Flagged, FALSE, TAG_DONE);
|
||||
RefreshGadgets((APTR)g->shared->gadgets[GID_TABS],
|
||||
g->shared->win, NULL);
|
||||
}
|
||||
|
||||
g->throbbing = false;
|
||||
|
||||
|
@ -30,6 +30,7 @@ theme_list_sslcert:*TBImages:list_crypt
|
||||
theme_throbber:Throbber
|
||||
theme_throbber_frames:13
|
||||
theme_throbber_delay:100
|
||||
theme_tab_loading:*TBImages:list_flagyellow
|
||||
ptr_default:*PROGDIR:Resources/Pointers/Default
|
||||
ptr_point:*PROGDIR:Resources/Pointers/Point
|
||||
ptr_caret:*PROGDIR:Resources/Pointers/Caret
|
||||
|
@ -43,6 +43,7 @@ theme_list_sslcert:
|
||||
theme_throbber:Throbber
|
||||
theme_throbber_frames:9
|
||||
theme_throbber_delay:100
|
||||
theme_tab_loading:
|
||||
ptr_default:*PROGDIR:Resources/Pointers/Default
|
||||
ptr_point:*PROGDIR:Resources/Pointers/Point
|
||||
ptr_caret:*PROGDIR:Resources/Pointers/Caret
|
||||
|
Loading…
Reference in New Issue
Block a user