summaryrefslogtreecommitdiff
path: root/amiga/theme.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2015-01-02 23:14:49 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2015-01-02 23:14:49 +0000
commita10aaea9893976889746dfd984b3e3db061e198c (patch)
tree380f9c38ca014c2de6110bd5a393084409d09db6 /amiga/theme.c
parentc45be2ecf42b45fe127522ef7fb149d4bcfdf916 (diff)
downloadnetsurf-a10aaea9893976889746dfd984b3e3db061e198c.tar.gz
netsurf-a10aaea9893976889746dfd984b3e3db061e198c.tar.bz2
Greatly simplify finding out if our gui_window is the one being displayed.
Diffstat (limited to 'amiga/theme.c')
-rw-r--r--amiga/theme.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/amiga/theme.c b/amiga/theme.c
index f7754c8ec..b7099e897 100644
--- a/amiga/theme.c
+++ b/amiga/theme.c
@@ -405,15 +405,11 @@ void ami_mouse_pointers_free(void)
void gui_window_start_throbber(struct gui_window *g)
{
- ULONG cur_tab = 0;
-
if(!g) return;
if(nsoption_bool(kiosk_mode)) return;
if(g->tab_node && (g->shared->tabs > 1))
{
- GetAttr(CLICKTAB_Current, g->shared->objects[GID_TABS],
- (ULONG *)&cur_tab);
SetClickTabNodeAttrs(g->tab_node, TNA_Flagged, TRUE, TAG_DONE);
RefreshGadgets((APTR)g->shared->objects[GID_TABS],
g->shared->win, NULL);
@@ -427,22 +423,18 @@ void gui_window_start_throbber(struct gui_window *g)
void gui_window_stop_throbber(struct gui_window *g)
{
struct IBox *bbox;
- int cur_tab = 0;
if(!g) return;
if(nsoption_bool(kiosk_mode)) return;
if(g->tab_node && (g->shared->tabs > 1))
{
- GetAttr(CLICKTAB_Current, g->shared->objects[GID_TABS],
- (ULONG *)&cur_tab);
SetClickTabNodeAttrs(g->tab_node, TNA_Flagged, FALSE, TAG_DONE);
RefreshGadgets((APTR)g->shared->objects[GID_TABS],
g->shared->win, NULL);
}
- if((cur_tab == g->tab) || (g->shared->tabs <= 1))
- {
+ if(g == g->shared->gw) {
if(ami_gui_get_space_box(g->shared->objects[GID_THROBBER], &bbox) != NSERROR_OK) {
warn_user("NoMemory", "");
return;
@@ -463,7 +455,6 @@ static void ami_throbber_update(void *p)
struct gui_window *g = (struct gui_window *)p;
struct IBox *bbox;
int frame = 0;
- int cur_tab = 0;
if(!g) return;
if(!g->shared->objects[GID_THROBBER]) return;
@@ -475,14 +466,7 @@ static void ami_throbber_update(void *p)
g->shared->throbber_frame=1;
}
- if(g->tab_node && (g->shared->tabs > 1))
- {
- GetAttr(CLICKTAB_Current, g->shared->objects[GID_TABS],
- (ULONG *)&cur_tab);
- }
-
- if((cur_tab == g->tab) || (g->shared->tabs <= 1))
- {
+ if(g->shared->gw == g) {
if(ami_gui_get_space_box(g->shared->objects[GID_THROBBER], &bbox) != NSERROR_OK) {
warn_user("NoMemory", "");
return;