From e95b45725c69536f85d85b191b423359d39af890 Mon Sep 17 00:00:00 2001 From: Ole Loots Date: Wed, 14 Dec 2011 21:23:30 +0000 Subject: Remove throbber callback from schedule before scheduling a new one. svn path=/trunk/netsurf/; revision=13272 --- atari/gui.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'atari') diff --git a/atari/gui.c b/atari/gui.c index f931c9d91..8b9d0a9d0 100755 --- a/atari/gui.c +++ b/atari/gui.c @@ -488,12 +488,14 @@ void gui_window_start_throbber(struct gui_window *w) { LGRECT work; if (w == NULL) + return; + if( w->root->toolbar->throbber.running == true ) return; mt_CompGetLGrect(&app, w->root->toolbar->throbber.comp, WF_WORKXYWH, &work); w->root->toolbar->throbber.running = true; w->root->toolbar->throbber.index = THROBBER_MIN_INDEX; - schedule(50, throbber_advance, w ); + schedule(100, throbber_advance, w ); ApplWrite( _AESapid, WM_REDRAW, w->root->handle->handle, work.g_x, work.g_y, work.g_w, work.g_h ); } @@ -502,7 +504,12 @@ void gui_window_stop_throbber(struct gui_window *w) { LGRECT work; if (w == NULL) - return; + return; + if( w->root->toolbar->throbber.running == false ) + return; + + schedule_remove(throbber_advance, w); + mt_CompGetLGrect(&app, w->root->toolbar->throbber.comp, WF_WORKXYWH, &work); w->root->toolbar->throbber.running = false; -- cgit v1.2.3