<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"	>
<channel>
	<title>Comments on: Adding to a GtkTreeView as you scroll?</title>
	<atom:link href="http://tecnocode.co.uk/2007/10/02/adding-to-a-gtktreeview-as-you-scroll/feed/" rel="self" type="application/rss+xml" />
	<link>http://tecnocode.co.uk/2007/10/02/adding-to-a-gtktreeview-as-you-scroll/</link>
	<description>Ramblings on computers…</description>
	<lastBuildDate>Wed, 25 Aug 2010 15:38:30 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Philip</title>
		<link>http://tecnocode.co.uk/2007/10/02/adding-to-a-gtktreeview-as-you-scroll/comment-page-1/#comment-99</link>
		<dc:creator>Philip</dc:creator>
		<pubDate>Thu, 31 Jan 2008 07:48:02 +0000</pubDate>
		<guid isPermaLink="false">http://tecnocode.co.uk/wordpress/?p=61#comment-99</guid>
		<description>You could compile Totem from SVN, but I&#039;d probably try getting a .deb from Hardy first, as I&#039;m not sure that Gutsy&#039;s GData package is fully-functional (for example, it doesn&#039;t work properly with Python 2.5), and last time I tested, this meant that the YouTube plugin didn&#039;t work on Gutsy. A .deb from Hardy should be patched to deal with this, if appropriate.

See here for the Hardy packages: http://packages.ubuntu.com/hardy/gnome/totem</description>
		<content:encoded><![CDATA[<p>You could compile Totem from SVN, but I&#8217;d probably try getting a .deb from Hardy first, as I&#8217;m not sure that Gutsy&#8217;s GData package is fully-functional (for example, it doesn&#8217;t work properly with Python 2.5), and last time I tested, this meant that the YouTube plugin didn&#8217;t work on Gutsy. A .deb from Hardy should be patched to deal with this, if appropriate.</p>
<p>See here for the Hardy packages: <a href="http://packages.ubuntu.com/hardy/gnome/totem" rel="nofollow">http://packages.ubuntu.com/hardy/gnome/totem</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: v.r</title>
		<link>http://tecnocode.co.uk/2007/10/02/adding-to-a-gtktreeview-as-you-scroll/comment-page-1/#comment-98</link>
		<dc:creator>v.r</dc:creator>
		<pubDate>Thu, 31 Jan 2008 05:18:59 +0000</pubDate>
		<guid isPermaLink="false">http://tecnocode.co.uk/wordpress/?p=61#comment-98</guid>
		<description>I use Ubuntu 7.10 &amp; synaptic.
The Gdata Libary 1.0-1 is in the universe repository.
Do i have to compile SVN Totem or is there a .deb?</description>
		<content:encoded><![CDATA[<p>I use Ubuntu 7.10 &amp; synaptic.<br />
The Gdata Libary 1.0-1 is in the universe repository.<br />
Do i have to compile SVN Totem or is there a .deb?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pvanhoof</title>
		<link>http://tecnocode.co.uk/2007/10/02/adding-to-a-gtktreeview-as-you-scroll/comment-page-1/#comment-69</link>
		<dc:creator>pvanhoof</dc:creator>
		<pubDate>Wed, 03 Oct 2007 16:14:56 +0000</pubDate>
		<guid isPermaLink="false">http://tecnocode.co.uk/wordpress/?p=61#comment-69</guid>
		<description>GtkTreeView does not have this behaviour if you set it to have fixed-row-height. The reason why it does this, is to calculate the scrollbar. You can ask Kristian Rietfield about the details for this. With fixed-row-height only the visible rows (and a few more rows, but not much) are kept in &#039;referenced state&#039;. You have a method called ref and one called unref to implement in the custom tree model, those are the ones you need.

Try it with a printf first, you&#039;ll notice the behaviour and whether the fixed-row-height property of the view improves it.

You can also take a look at the wiki page, which I wrote, that somebody mentioned here. In a way, it does the exact same thing: you provide a hook for just before the rendering of the cell. It&#039;s, however, not possible to know when the cell becomes invisible (or not easy).</description>
		<content:encoded><![CDATA[<p>GtkTreeView does not have this behaviour if you set it to have fixed-row-height. The reason why it does this, is to calculate the scrollbar. You can ask Kristian Rietfield about the details for this. With fixed-row-height only the visible rows (and a few more rows, but not much) are kept in &#8216;referenced state&#8217;. You have a method called ref and one called unref to implement in the custom tree model, those are the ones you need.</p>
<p>Try it with a printf first, you&#8217;ll notice the behaviour and whether the fixed-row-height property of the view improves it.</p>
<p>You can also take a look at the wiki page, which I wrote, that somebody mentioned here. In a way, it does the exact same thing: you provide a hook for just before the rendering of the cell. It&#8217;s, however, not possible to know when the cell becomes invisible (or not easy).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrys</title>
		<link>http://tecnocode.co.uk/2007/10/02/adding-to-a-gtktreeview-as-you-scroll/comment-page-1/#comment-68</link>
		<dc:creator>Patrys</dc:creator>
		<pubDate>Wed, 03 Oct 2007 13:23:15 +0000</pubDate>
		<guid isPermaLink="false">http://tecnocode.co.uk/wordpress/?p=61#comment-68</guid>
		<description>You mean something that Google Reader uses I believe. Maybe add a timer that waits until you let go of the handle and then update the treeview?</description>
		<content:encoded><![CDATA[<p>You mean something that Google Reader uses I believe. Maybe add a timer that waits until you let go of the handle and then update the treeview?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian Hergert</title>
		<link>http://tecnocode.co.uk/2007/10/02/adding-to-a-gtktreeview-as-you-scroll/comment-page-1/#comment-67</link>
		<dc:creator>Christian Hergert</dc:creator>
		<pubDate>Wed, 03 Oct 2007 08:38:53 +0000</pubDate>
		<guid isPermaLink="false">http://tecnocode.co.uk/wordpress/?p=61#comment-67</guid>
		<description>The one thing that still sucks about doing your own treemodel and using integer row offsets for the GtkTreeIter-&gt;user_data is that GtkTreeView finds it necessary to iterate through every row on initialization. You can see how this would get annoying with say a million records.

This is especially a problem if your user_data is larger than sizeof(void*) because that means you cannot store an integer in the pointer space. I&#039;m thinking 64bit primary keys in this example.

As I get older, I&#039;m wondering if XUL isn&#039;t the right way to go for my new development. God I wish it was mainstream to embed python in XUL so you could do xpcom + script embed python.

Oh, and can the captcha&#039;s suck any harder in this place???</description>
		<content:encoded><![CDATA[<p>The one thing that still sucks about doing your own treemodel and using integer row offsets for the GtkTreeIter-&gt;user_data is that GtkTreeView finds it necessary to iterate through every row on initialization. You can see how this would get annoying with say a million records.</p>
<p>This is especially a problem if your user_data is larger than sizeof(void*) because that means you cannot store an integer in the pointer space. I&#8217;m thinking 64bit primary keys in this example.</p>
<p>As I get older, I&#8217;m wondering if XUL isn&#8217;t the right way to go for my new development. God I wish it was mainstream to embed python in XUL so you could do xpcom + script embed python.</p>
<p>Oh, and can the captcha&#8217;s suck any harder in this place???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pvanhoof</title>
		<link>http://tecnocode.co.uk/2007/10/02/adding-to-a-gtktreeview-as-you-scroll/comment-page-1/#comment-66</link>
		<dc:creator>pvanhoof</dc:creator>
		<pubDate>Tue, 02 Oct 2007 23:24:53 +0000</pubDate>
		<guid isPermaLink="false">http://tecnocode.co.uk/wordpress/?p=61#comment-66</guid>
		<description>Euh, yes. Implement a custom treemodel and you&#039;ll know exactly when a row is to become visible and when it&#039;s to become invisible. You can (must) then provide the data for that row (for each column) and at that time you can load your data.

In other words: follow the Model View Controller pattern.</description>
		<content:encoded><![CDATA[<p>Euh, yes. Implement a custom treemodel and you&#8217;ll know exactly when a row is to become visible and when it&#8217;s to become invisible. You can (must) then provide the data for that row (for each column) and at that time you can load your data.</p>
<p>In other words: follow the Model View Controller pattern.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian Hergert</title>
		<link>http://tecnocode.co.uk/2007/10/02/adding-to-a-gtktreeview-as-you-scroll/comment-page-1/#comment-64</link>
		<dc:creator>Christian Hergert</dc:creator>
		<pubDate>Tue, 02 Oct 2007 20:48:10 +0000</pubDate>
		<guid isPermaLink="false">http://tecnocode.co.uk/wordpress/?p=61#comment-64</guid>
		<description>XUL currently has support for doing this using their tree widgets. Unfortunately since widget drawing is done from a theming api, its probably not useful here.

What i have done in the past is write my own treemodels and lazy load the data as it is required. The key to making this fast is using the integer row offset as the user_data in the GtkTreeIter. You can also speed the results here with a LRU cache or similar.

I have a couple different implementations of this using sqlite for storage in C and python.

http://vwdude.com/dropbox/pystore/
http://vwdude.com/dropbox/egg-sqlite-store/

I have a better version of the python implementation around somewhere if this isnt enough to get you going.</description>
		<content:encoded><![CDATA[<p>XUL currently has support for doing this using their tree widgets. Unfortunately since widget drawing is done from a theming api, its probably not useful here.</p>
<p>What i have done in the past is write my own treemodels and lazy load the data as it is required. The key to making this fast is using the integer row offset as the user_data in the GtkTreeIter. You can also speed the results here with a LRU cache or similar.</p>
<p>I have a couple different implementations of this using sqlite for storage in C and python.</p>
<p><a href="http://vwdude.com/dropbox/pystore/" rel="nofollow">http://vwdude.com/dropbox/pystore/</a><br />
<a href="http://vwdude.com/dropbox/egg-sqlite-store/" rel="nofollow">http://vwdude.com/dropbox/egg-sqlite-store/</a></p>
<p>I have a better version of the python implementation around somewhere if this isnt enough to get you going.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Athropos</title>
		<link>http://tecnocode.co.uk/2007/10/02/adding-to-a-gtktreeview-as-you-scroll/comment-page-1/#comment-63</link>
		<dc:creator>Athropos</dc:creator>
		<pubDate>Tue, 02 Oct 2007 20:17:03 +0000</pubDate>
		<guid isPermaLink="false">http://tecnocode.co.uk/wordpress/?p=61#comment-63</guid>
		<description>Maybe you could immediately set the size of the adjustment to reflect the total number of rows you plan to put in your TreeView (if you know it). That way, you would avoid the problem of always being at 80% of the way down since you would just have to load the current &quot;frame&quot; of rows. I never tried that though, so I don&#039;t know if that&#039;s possible.</description>
		<content:encoded><![CDATA[<p>Maybe you could immediately set the size of the adjustment to reflect the total number of rows you plan to put in your TreeView (if you know it). That way, you would avoid the problem of always being at 80% of the way down since you would just have to load the current &quot;frame&quot; of rows. I never tried that though, so I don&#8217;t know if that&#8217;s possible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Travis</title>
		<link>http://tecnocode.co.uk/2007/10/02/adding-to-a-gtktreeview-as-you-scroll/comment-page-1/#comment-62</link>
		<dc:creator>Travis</dc:creator>
		<pubDate>Tue, 02 Oct 2007 19:38:26 +0000</pubDate>
		<guid isPermaLink="false">http://tecnocode.co.uk/wordpress/?p=61#comment-62</guid>
		<description>Perhaps http://www.pvanhoof.be/wiki/index.php/Smart_ways_of_using_GtkTreeView would be helpful. Not sure what you&#039;re trying to do though.</description>
		<content:encoded><![CDATA[<p>Perhaps <a href="http://www.pvanhoof.be/wiki/index.php/Smart_ways_of_using_GtkTreeView" rel="nofollow">http://www.pvanhoof.be/wiki/index.php/Smart_ways_of_using_GtkTreeView</a> would be helpful. Not sure what you&#8217;re trying to do though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eetu Huisman</title>
		<link>http://tecnocode.co.uk/2007/10/02/adding-to-a-gtktreeview-as-you-scroll/comment-page-1/#comment-61</link>
		<dc:creator>Eetu Huisman</dc:creator>
		<pubDate>Tue, 02 Oct 2007 19:16:55 +0000</pubDate>
		<guid isPermaLink="false">http://tecnocode.co.uk/wordpress/?p=61#comment-61</guid>
		<description>I don&#039;t think I&#039;ve ever seen/used a Gnome application which does this, but for example Google Reader does. Maybe you&#039;ve seen the feature in a web application as well? I guess this wasn&#039;t helpful at all...</description>
		<content:encoded><![CDATA[<p>I don&#8217;t think I&#8217;ve ever seen/used a Gnome application which does this, but for example Google Reader does. Maybe you&#8217;ve seen the feature in a web application as well? I guess this wasn&#8217;t helpful at all&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.283 seconds -->
