Remove periodic blinking function.

Mon, 23 Jul 2012 20:03:44 -0400

author
Elliott Sales de Andrade <qulogic@pidgin.im>
date
Mon, 23 Jul 2012 20:03:44 -0400
changeset 33117
d89119696a3f
parent 33116
34cdcc6507d7
child 33118
3113b96a5b7b

Remove periodic blinking function.

This timer was only necessary to blank and then re-show the status icon,
but the status icon has a function to enable blinking itself.

pidgin/gtkdocklet.c file | annotate | diff | comparison | revisions
--- a/pidgin/gtkdocklet.c	Mon Jul 23 03:52:32 2012 -0400
+++ b/pidgin/gtkdocklet.c	Mon Jul 23 20:03:44 2012 -0400
@@ -59,7 +59,6 @@
 static gboolean pending = FALSE;
 static gboolean connecting = FALSE;
 static gboolean enable_join_chat = FALSE;
-static guint docklet_blinking_timer = 0;
 static gboolean visible = FALSE;
 static gboolean visibility_manager = FALSE;
 
@@ -112,27 +111,6 @@
 	}
 }
 
-static gboolean
-docklet_blink_icon(gpointer data)
-{
-	static gboolean blinked = FALSE;
-	gboolean ret = FALSE; /* by default, don't keep blinking */
-
-	blinked = !blinked;
-
-	if(pending && !connecting) {
-		if (!blinked) {
-			docklet_gtk_status_update_icon(status, connecting, pending);
-		}
-		ret = TRUE; /* keep blinking */
-	} else {
-		docklet_blinking_timer = 0;
-		blinked = FALSE;
-	}
-
-	return ret;
-}
-
 static GList *
 get_pending_list(guint max)
 {
@@ -253,12 +231,6 @@
 		connecting = newconnecting;
 
 		docklet_gtk_status_update_icon(status, connecting, pending);
-
-		/* and schedule the blinker function if messages are pending */
-		if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/docklet/blink")
-			&& pending && !connecting && docklet_blinking_timer == 0) {
-			docklet_blinking_timer = g_timeout_add(500, docklet_blink_icon, NULL);
-		}
 	}
 
 	return FALSE; /* for when we're called by the glib idle handler */
@@ -841,10 +813,6 @@
 			pidgin_blist_visibility_manager_remove();
 			visibility_manager = FALSE;
 		}
-		if (docklet_blinking_timer) {
-			g_source_remove(docklet_blinking_timer);
-			docklet_blinking_timer = 0;
-		}
 		visible = FALSE;
 		status = PURPLE_STATUS_OFFLINE;
 	}

mercurial