← Back to team overview

zim-wiki team mailing list archive

Re: issue #248 -- treeview consistency errors

 

Hi Paul,

The class structure is set up in order to re-use parts for the "tags"
plugin, which has a different organisation of the nodes, but similar
components. This results in an additional interface between the class that
interfaces with the index (PagesTreeModelMixin) and the class that
interfaces with Gtk (PageTreeStoreBase).

The GenericTreeStore is used because this was the recommended way to do
this under pygtk. The main issue it solves is converting between Gtk
TreeIter objects and our custom TreeIter objects.  With the move to Gtk3 I
will remove it using boiler plate from pygtkcompat to do the object
conversion.

Probably what happens in these cases where the model goes out of sync is
that the signals for changes in the index do not come in the expected order
or come to late. What would really help to pinpoint an issue like this is
to find a way to reproducible trigger it. Best would be to have a script
that can be used as a test case.

Regards,

Jaap


On Mon, Dec 4, 2017 at 10:21 PM Paul Becker <raincomplex@xxxxxxxxx> wrote:

> Hello!
>
> I've been looking into this issue, but I'm having trouble navigating the
> maze of class interactions. I suspect the bug may lie in
> PageTreeStoreBase, but I don't have a good enough grasp of the whole
> system (or gtk) to say for sure.
>
> Zim is really awesome and this is the only bug left that I've
> encountered while using it for the last week or so (I submitted pull
> requests for the other two). Someone in the IRC channel suggested I
> start a discussion about this one here.
>
> Highly speculative side note: I was playing around with PyGTK3 a bit to
> better understand TreeViews -- is there a reason Zim implements
> GenericTreeModel instead of just using TreeStore and setting it
> reorderable? If the answer is really complicated, no need to explain. (:
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~zim-wiki
> Post to     : zim-wiki@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~zim-wiki
> More help   : https://help.launchpad.net/ListHelp
>

References