# HG changeset patch # User Stu Tomlinson # Date 1131305118 0 # Node ID c7a36461b00c6b7f5523c219a59208ab8e439535 # Parent 9ccbd9f8e8c608d2cbf6476c28ba32534d23417d [gaim-migrate @ 14282] Stop the docklet blinking going crazy committer: Tailor Script diff -r 9ccbd9f8e8c6 -r c7a36461b00c plugins/docklet/docklet.c --- a/plugins/docklet/docklet.c Sun Nov 06 19:16:32 2005 +0000 +++ b/plugins/docklet/docklet.c Sun Nov 06 19:25:18 2005 +0000 @@ -54,6 +54,7 @@ static DockletStatus status = DOCKLET_STATUS_OFFLINE; static gulong gtkblist_delete_cb_id = 0; static gboolean enable_join_chat = FALSE; +static guint docklet_blinking_timer = 0; /************************************************************************** * docklet status and utility functions @@ -79,6 +80,7 @@ ret = TRUE; /* keep blinking */ break; default: + docklet_blinking_timer = 0; blinked = FALSE; break; } @@ -158,9 +160,10 @@ ui_ops->update_icon(status); /* and schedule the blinker function if messages are pending */ - if (status == DOCKLET_STATUS_ONLINE_PENDING - || status == DOCKLET_STATUS_AWAY_PENDING) { - g_timeout_add(500, docklet_blink_icon, &handle); + if ((status == DOCKLET_STATUS_ONLINE_PENDING + || status == DOCKLET_STATUS_AWAY_PENDING) + && docklet_blinking_timer == 0) { + docklet_blinking_timer = g_timeout_add(500, docklet_blink_icon, &handle); } }