Pulsing CellRendererProgress - Patch



Hi List

While playing with ProgressBars in a Treeview I've found a stange
behavior. pulsing and progressing rows seem to be interfering with each
other. (i.g. pulse offset gets reset by the progressing row)

You can find an pyGTK example of that behavior on
https://nopaste.eof.name/912 (comment out the line in update_cells to
set all rows to pulsing mode - and get them to pulse without resetting
each other)

My colleague (Jakob Oswald) and I suggest to set the offset to the value
provided as pulse instead of incrementing the old offset value (which is
still set from the row above). 

This means a slight API change. The user will have to increment the
pulse value by 1 each time to get a "fluent" pulse. But most users may
use that anyway from what I've seen. - Anyway it's better than a
nonworking Pulsing CellRendererProgress.

See our Patch attached.


Greetings from Berlin
Kristian Mueller
-- 
/* Web:     http://www.mput.de  | Tel:    +49 (0)170/6692447      *
 * Blog:    http://mput.de/blog | ICQ:    93248497                *
 * GPG-ID:  4BBB6525 (..2009)   | Jabber: kristian mput de        *
 * Twitter: kristian_m          | MSN:    mueller kristian vdi de */
--- orig/trunk/gtk/gtkcellrendererprogress.c	2008-12-03 18:39:17.000000000 +0100
+++ trunk/gtk/gtkcellrendererprogress.c	2008-12-03 18:48:06.000000000 +0100
@@ -396,10 +396,10 @@
 
    if (pulse != priv->pulse)
      {
-       if (priv->pulse <= 0)
+       if (pulse <= 0)
          priv->offset = 0;
        else
-         priv->offset++;
+		 priv->offset = pulse;
      }
 
    priv->pulse = pulse;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]