Re: simplelist speed



Dan Espen <dane mk telcordia com> writes:
muppet <scott asofyet org> writes:

On Jan 3, 2005, at 9:57 PM, Dan Espen wrote:

I needed to color the foreground of individual cells and the 
background of some rows.  I used pango markup for the foreground and 
cell_data_func to  color the background.

On my 400MHz home machine, I can peg the CPU meter by moving the 
pointer over the window.  When I switch to the desk that shows 2 
instances of this program the text takes about 5 seconds to appear.
To avoid needing to parse pango markup or call a cell data func on 
every cell rendering, try using a hidden column (that is, a model 
column that is not shown in the view) to store the GdkColor to use for 
the foreground and background colors, and calculate them only once.  

Sorry for my previous dumb comments on the hidden column approach.
I've got it working for backgrounds, but foregrounds give me:

GLib-GObject-WARNING **: g_object_set_property:
 object class `GtkCellRendererText'
 has no property named `cell_foreground_gdk' at colorize.pl line 71.

GLib-GObject-WARNING **: g_object_set_property:
 object class `GtkCellRendererToggle'
 has no property named `cell_foreground_gdk' at colorize.pl line 71.

This happens when I change the color_list.pl example like this:

$col->add_attribute ($cell, cell_foreground_gdk => 3);

I see the attribute 'cell_foreground_gdk' in the C source
code, but I don't seem to be able to set it.

Is it not possible, or am I making another dumb mistake?

-- 
Dan Espen                           E-mail: dane mk telcordia com



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