diff audacious/playstatus.c @ 1273:3b990c26fc46 trunk

[svn] - Support for the buffer indicator in playpaus.png that was apparently ignored by XMMS devs. Supports mp3 streams only, at the moment.
author nhjm449
date Fri, 16 Jun 2006 02:17:33 -0700
parents 0ee0b9b6db7e
children f12d7e208b43
line wrap: on
line diff
--- a/audacious/playstatus.c	Fri Jun 16 01:45:08 2006 -0700
+++ b/audacious/playstatus.c	Fri Jun 16 02:17:33 2006 -0700
@@ -34,8 +34,13 @@
         return;
 
     obj = ps->ps_widget.parent;
-
-    if (ps->ps_status == STATUS_PLAY)
+    if (ps->ps_status == STATUS_STOP && ps->ps_status_buffering == TRUE)
+        ps->ps_status_buffering = FALSE;
+    if (ps->ps_status == STATUS_PLAY && ps->ps_status_buffering == TRUE)
+        skin_draw_pixmap(bmp_active_skin, obj, ps->ps_widget.gc,
+                         SKIN_PLAYPAUSE, 39, 0, ps->ps_widget.x,
+                         ps->ps_widget.y, 3, 9);
+    else if (ps->ps_status == STATUS_PLAY)
         skin_draw_pixmap(bmp_active_skin, obj, ps->ps_widget.gc,
                          SKIN_PLAYPAUSE, 36, 0, ps->ps_widget.x,
                          ps->ps_widget.y, 3, 9);
@@ -72,6 +77,16 @@
     widget_draw(WIDGET(ps));
 }
 
+void
+playstatus_set_status_buffering(PlayStatus * ps, gboolean status)
+{
+    if (!ps)
+        return;
+
+    ps->ps_status_buffering = status;
+    widget_draw(WIDGET(ps));
+}
+
 PlayStatus *
 create_playstatus(GList ** wlist, GdkPixmap * parent,
                   GdkGC * gc, gint x, gint y)