diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2009-09-06 11:23:35 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2009-09-06 11:23:35 +0000 |
commit | a3d57f2c3c2579d59af546c31765287d1d820182 (patch) | |
tree | adb8e433cd0770f66c5c3dc04bbe38306b6d4cec /amiga/gui.c | |
parent | dac634f6fd638b327356f42198ee88ddeef374c9 (diff) | |
download | netsurf-a3d57f2c3c2579d59af546c31765287d1d820182.tar.gz netsurf-a3d57f2c3c2579d59af546c31765287d1d820182.tar.bz2 |
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
Diffstat (limited to 'amiga/gui.c')
-rwxr-xr-x | amiga/gui.c | 25 |
1 files changed, 22 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; |