https://bugs.gpodder.org/show_bug.cgi?id=60
--- Comment #46 from Janne Makela <[email protected]> 2009-10-24 21:30:13 BST --- (In reply to comment #43) > Since I've split the model and view, you could easily enhance the > PodcastListModel class in gpodder.gtkui.model to show a new item "All > podcasts" > as first item and then another row that can be set to be displayed as a > separator (see > http://www.pygtk.org/docs/pygtk/class-gtktreeview.html#method-gtktreeview--set-row-separator-func). > > After that, some code in the main window that still assumes there is one > channel per item in the podcast list has to be updated. Maybe the podcast list > model can give a fake "proxy" podcast object back to the main window (in > column > C_CHANNEL in the PodcastListModel) that has functions like get_all_episodes() > that simply calls that function on every podcast that is in the model and > returns a concatenated list of that. I scribbled together an experimental implementation. It looks pretty good and functional. The required proxy class for the "all episodes" probably ends up to be quite small too. So, now it does pretty much what I want, but there's a small problem with sluggishness. The proxy object has to query all the channels for all the episodes, and it causes a noticiable delay even when I got a fair amount of CPU power under the hood. I can only imagine what this would do on Maemo platform. The episode collection is done with list comprehension, so it probably can't be done much faster than how I did it. I only have about ten channels and their episodes, but querying takes approx. 1-2 seconds. I can actually live with that, because I only have to click once to get the view I want. But others might not be so patient. I guess channel.get_all_episodes() must become faster (maybe by implementing some sort of caching) or I have to query episodes directly from the database with one single query. Caching in the proxy object doesn't make sense, because it would have to monitor changes in channel objects anyway. So which way would you recommend? Or maybe you have a third option in mind? -- Configure bugmail: https://bugs.gpodder.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes. _______________________________________________ gPodder-Bugs mailing list [email protected] https://lists.berlios.de/mailman/listinfo/gpodder-bugs
