← Back to team overview

ayatana-commits team mailing list archive

[Branch ~notify-osd-developers/notify-osd/main] Rev 400: Merged my fix-435116 branch after review and approval by Neil. Now the

 

Merge authors:
  Mirco Müller (macslow)
------------------------------------------------------------
revno: 400 [merge]
committer: Mirco Müller <mirco.mueller@xxxxxxxxxx>
branch nick: notify-osd
timestamp: Tue 2009-09-29 14:57:33 +0200
message:
  Merged my fix-435116 branch after review and approval by Neil. Now the
  throbbing-animation is correctly triggered and displayed again, when
  a indicator-value of -1 or 101 is passed as an integer hint.
modified:
  src/bubble.c


--
lp:notify-osd
https://code.launchpad.net/~notify-osd-developers/notify-osd/main

Your team ayatana-commits is subscribed to branch lp:notify-osd.
To unsubscribe from this branch go to https://code.launchpad.net/~notify-osd-developers/notify-osd/main/+edit-subscription.
=== modified file 'src/bubble.c'
--- src/bubble.c	2009-09-24 10:12:42 +0000
+++ src/bubble.c	2009-09-28 14:09:27 +0000
@@ -1300,12 +1300,34 @@
 	      gdouble  alpha_normal,
 	      gdouble  alpha_blur)
 {
-	tile_paint (self->priv->tile_icon,
+	BubblePrivate*   priv = GET_PRIVATE (self);
+	cairo_pattern_t* pattern;
+
+	tile_paint (priv->tile_icon,
 		    cr,
 		    x,
 		    y,
 		    alpha_normal,
 		    alpha_blur);
+
+	if (priv->alpha)
+	{
+		cairo_push_group (cr);
+		tile_paint (priv->tile_icon,
+			    cr,
+			    x,
+			    y,
+			    0.0f,
+			    (gfloat) egg_alpha_get_alpha (priv->alpha) /
+			    (gfloat) EGG_ALPHA_MAX_ALPHA);
+		pattern = cairo_pop_group (cr);
+		if (priv->value == -1)
+			cairo_set_source_rgba (cr, 0.0f, 0.0f, 0.0f, 1.0f);
+		if (priv->value == 101)
+			cairo_set_source_rgba (cr, 1.0f, 1.0f, 1.0f, 1.0f);
+		cairo_mask (cr, pattern);
+		cairo_pattern_destroy (pattern);
+	}
 }
 
 void
@@ -1348,12 +1370,34 @@
 		   gdouble  alpha_normal,
 		   gdouble  alpha_blur)
 {
-	tile_paint (self->priv->tile_indicator,
+	BubblePrivate*   priv = GET_PRIVATE (self);
+	cairo_pattern_t* pattern;
+
+	tile_paint (priv->tile_indicator,
 		    cr,
 		    x,
 		    y,
 		    alpha_normal,
 		    alpha_blur);
+
+	if (priv->alpha)
+	{
+		cairo_push_group (cr);
+		tile_paint (priv->tile_indicator,
+			    cr,
+			    x,
+			    y,
+			    0.0f,
+			    (gfloat) egg_alpha_get_alpha (priv->alpha) /
+			    (gfloat) EGG_ALPHA_MAX_ALPHA);
+		pattern = cairo_pop_group (cr);
+		if (priv->value == -1)
+			cairo_set_source_rgba (cr, 0.0f, 0.0f, 0.0f, 1.0f);
+		if (priv->value == 101)
+			cairo_set_source_rgba (cr, 1.0f, 1.0f, 1.0f, 1.0f);
+		cairo_mask (cr, pattern);
+		cairo_pattern_destroy (pattern);
+	}
 }
 
 void