On Wed, 27 Nov 2013 14:19:37 +0100, Colomban Wendling
<lists....@herbesfolles.org> wrote:
> Le 27/11/2013 12:57, Jarosław Sobieszek a écrit :
>> Hello,
>> 
>> I'm trying to dynamically modify list based on some action. Program
below
>> should add 3 rows at the top and 3 rows at the bottom of the list for
>> every
>> click of the button. For some reason it doesn't work - I'm seeing
partial
>> updates with random amount of data (only 2 top rows on first click,
then
>> 5
>> at the bottom, on 3rd click the list looks ok (9 rows added at the top
>> and
>> 9 rows added at the bottom)). I've tested this under gtk2 and it works
>> ok.
>> Am I missing something or is it a bug in gtk3 (gtk3-3.8.6 under Fedora
>> 19)?
> 
> I'd say it's a bug in tree view sizing in GTK3.
> 
> Actually, the list is correctly updated, but the view only request space
> for the initial data, and not for the newly added.  And since in your
> case you don't pack it in a ScrolledWindow, the view should grow its
> size request.
> 
> You can see what really happens by making your tree view expand
> (gtk_box_pack_start(GTK_BOX(box), tree, TRUE, TRUE, 0) instead of
> container_add(box, tree)): you will see that if you resize the window
> manually you see the "missing" rows.

Yes I'd normally put it in ScrolledWindow but I wanted to test something
and skipped that step. The partial refresh was a bit baffling (and probably
slightly buggy) since I'd expect it to either update everything or nothing
at all, but it's easy to work around that.

Thanks for both answers.

Jarek
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to