You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Making the store both filtered and sortable works for the TreeView but not the IconView which gets glitchy when using the search field. The error reported is
"Gtk-CRITICAL **: gtk_cell_area_render: assertion `GTK_IS_CELL_AREA_CONTEXT (context)' failed"
But in this tutorial it reads "Instead of using cell renderers, Gtk.IconView requires (blablabla)". So, is your use of a cell renderer in the IconView at fault? Well, not so sure. I've got rid of that text label using a cell renderer and it didn't change a thing.
Maybe it's just that sortable and filtered IconViews are not meant to exist...
A workaround is to only apply the TreeModelSort model to the TreeView. But we'll certainly want to sort the IconView too in the future (e.g. sort by 'last played' would be relevant for the icon view).
[strycore replied: I still haven't had the time to have a look at this but the CellRenderer is, if I remember correctly, the way to fix the extra large padding between icons. This trick comes from Rhythmbox's Cover Art browser plugin, it also uses an icon view so there may be some more code snippets to pick from this project.]
The text was updated successfully, but these errors were encountered:
For the record, I have a project which could be useful for these kind of tasks : https://github.com/strycore/pygobject-demos
You can try coding a minimal solution: one that does only filtering and sorting, and nothing else.
That's how I coded some features in the UI, it's easier to take the experimentation outside the project and integrate it after it as been proved to work.
I've had a better look at the coverart-browser plugin. If I'm correct, their solution is what I was thinking about doing : they made a sort function from scratch, thus didn't wrap the ListStore in a TreeModelSort.
You can see this in their AlbumsModel. It looks too complicated for me, I'm afraid...
Making the store both filtered and sortable works for the TreeView but not the IconView which gets glitchy when using the search field. The error reported is
"Gtk-CRITICAL **: gtk_cell_area_render: assertion `GTK_IS_CELL_AREA_CONTEXT (context)' failed"
But in this tutorial it reads "Instead of using cell renderers, Gtk.IconView requires (blablabla)". So, is your use of a cell renderer in the IconView at fault? Well, not so sure. I've got rid of that text label using a cell renderer and it didn't change a thing.
Maybe it's just that sortable and filtered IconViews are not meant to exist...
A workaround is to only apply the TreeModelSort model to the TreeView. But we'll certainly want to sort the IconView too in the future (e.g. sort by 'last played' would be relevant for the icon view).
[strycore replied: I still haven't had the time to have a look at this but the CellRenderer is, if I remember correctly, the way to fix the extra large padding between icons. This trick comes from Rhythmbox's Cover Art browser plugin, it also uses an icon view so there may be some more code snippets to pick from this project.]
The text was updated successfully, but these errors were encountered: