Re: [Vala] Gtk.TreeView + Cellrender + text different colors ???

2016-08-11 Thread Michael Gratton
On Fri, Aug 12, 2016 at 10:44 AM, Flavio Danesse  
wrote:
Now I understand that those declared in the fields TreeStore not 
correspond to the columns.
make it work achieved thanks for your attention and apologize for any 
inconvenience.


No problem, it always confuses me after I haven't been using a TreeView 
for a while.


I'm glad you got it working! :)

--
⊨ Michael Gratton, Percept Wrangler.
⚙ 


___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Gtk.TreeView + Cellrender + text different colors ???

2016-08-11 Thread Flavio Danesse
OK thanks.
Now I understand that those declared in the fields TreeStore not correspond
to the columns.
make it work achieved thanks for your attention and apologize for any
inconvenience.

2016-08-11 1:10 GMT-03:00 Michael Gratton :

> On Thu, Aug 11, 2016 at 1:09 PM, Flavio Danesse 
> wrote:
>
>> That does not work.
>> According to the documentation you must specify the column number.
>>
>
> Oh yes, right you are. If you add the column numbers to the ::set() call
> then the example should work.
>
> In my example I have two columns but I want to change the color of the
>> letter only in the second column and the color varies according to row.
>>
>
> This is more of a general GTK+ question than specifically about Vala, but
> just create a model with at least three columns: One for the first view
> column's text, one for the second view column's text, and one for the
> second view column's colour:
>
> Gtk.ListStore list_store = new Gtk.ListStore(3,
>> typeof(string),
>> typeof(string),
>> typeof(string)
>> );
>>
>
> Then create the second view column that hools up the cell renderer's
> properties so they refer to the second two model columns:
>
> insert_column_with_attributes(-1, "Content",
>>   new Gtk.CellRendererText(),
>>   "text", 1,
>>   "foreground", 2,
>>   null);
>>
>
> //Mike
>
> --
> ⊨ Michael Gratton, Percept Wrangler.
> ⚙ 
>
>
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] refcounting, signals and closures

2016-08-11 Thread Michael Gratton
On Thu, Aug 11, 2016 at 4:51 PM, pelzflorian (Florian Pelz) 
 wrote:

While I have no idea about the problem at hand, is it not possible to
find the potential owners using a gdb conditional breakpoint like
https://developer.gnome.org/gobject/stable/tools-refdb.html ?


I'm not sure if that will help because I don't know the address of the 
widget instances in advance - I assume that everything that holds a ref 
to it will have it already soon after it is constructed and added to 
the UI.


//Mike

--
⊨ Michael Gratton, Percept Wrangler.
⚙ 


___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list