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:
Chris Young 2009-09-06 11:23:35 +00:00
parent dac634f6fd
commit a3d57f2c3c
3 changed files with 24 additions and 3 deletions

View File

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

View File

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

View File

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