From a3d57f2c3c2579d59af546c31765287d1d820182 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sun, 6 Sep 2009 11:23:35 +0000 Subject: 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 --- amiga/gui.c | 25 ++++++++++++++++++++++--- amiga/resources/Themes/AISS/Theme | 1 + amiga/resources/Themes/Default/Theme | 1 + 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/amiga/gui.c b/amiga/gui.c index cea91c786..ab121582a 100755 --- a/amiga/gui.c +++ b/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; diff --git a/amiga/resources/Themes/AISS/Theme b/amiga/resources/Themes/AISS/Theme index 6b1203564..83b4729a7 100755 --- a/amiga/resources/Themes/AISS/Theme +++ b/amiga/resources/Themes/AISS/Theme @@ -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 diff --git a/amiga/resources/Themes/Default/Theme b/amiga/resources/Themes/Default/Theme index fb63a71d0..f1ae80605 100755 --- a/amiga/resources/Themes/Default/Theme +++ b/amiga/resources/Themes/Default/Theme @@ -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 -- cgit v1.2.3