Hi,

On Wed, 2006-04-19 at 22:00 -0300, Gustavo Sverzut Barbieri wrote:
> On 4/19/06, Jan Arne Petersen <[EMAIL PROTECTED]> wrote:
> > Disable checkbox-mode:
> >
> > g_object_set(G_OBJECT(tree_view), "allow-checkbox-mode", FALSE, NULL);
> 
> No it doesn't help and I have an example code to demonstrate it, see
> attached file.

It fixed the problem here. I tried it with the modified example
(attached).
> 
> From that code, Gaim and my library, it seems that _FIRST_ append'ed
> column that have a GtkCellRendererToogle fails, others works as
> expected.

That is the maemo checkbox-mode: The first checkbox in a row is active
if and only if the row is selected.

Regards
Jan Arne Petersen
#!/usr/bin/env python2.4

import gtk
import gobject

app = gtk.Window()

c1 = gtk.TreeViewColumn( "text", gtk.CellRendererText(), text=0 )
c2 = gtk.TreeViewColumn( "b1", gtk.CellRendererToggle(), active=1 )
c3 = gtk.TreeViewColumn( "b2", gtk.CellRendererToggle(), active=2 )
c4 = gtk.TreeViewColumn( "b3", gtk.CellRendererToggle(), active=1 ) # use 1 again!

m = gtk.ListStore( gobject.TYPE_STRING, gobject.TYPE_BOOLEAN, gobject.TYPE_BOOLEAN )
m.append( [ 'True', True, True ] )
m.append( [ 'False', False, False ] )

t = gtk.TreeView( m )
t.set_property ( 'allow-checkbox-mode', False )
t.set_headers_visible( True )
t.append_column( c1 )
t.append_column( c2 )
t.append_column( c3 )
t.append_column( c4 )

app.add( t )
app.show_all()

app.connect( "delete-event", gtk.main_quit )
gtk.main()
_______________________________________________
maemo-developers mailing list
[email protected]
https://maemo.org/mailman/listinfo/maemo-developers

Reply via email to