<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Johns Blog &#187; GNOME</title>
	<atom:link href="http://blogs.gnome.org/johncarr/tag/gnome/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.gnome.org/johncarr</link>
	<description>Making your brain invert and fall out of your ear since 2007</description>
	<lastBuildDate>Tue, 11 Aug 2009 09:59:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Playing with RDF</title>
		<link>http://blogs.gnome.org/johncarr/2009/05/15/playing-with-rdf/</link>
		<comments>http://blogs.gnome.org/johncarr/2009/05/15/playing-with-rdf/#comments</comments>
		<pubDate>Fri, 15 May 2009 14:48:08 +0000</pubDate>
		<dc:creator>John Carr</dc:creator>
				<category><![CDATA[Nerd]]></category>
		<category><![CDATA[Conduit]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[RDF]]></category>
		<category><![CDATA[Tracker]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/johncarr/?p=118</guid>
		<description><![CDATA[I&#8217;ve been playing with the master branch of tracker and i&#8217;m loving it &#8211; it looks like its finally reached the stage where I won&#8217;t just turn it straight off after a fresh install.
It now brings GNOME an RDF store with a SPARQL interface. Powerful joo-joo, but kinda scary if you haven&#8217;t seen it before. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing with the master branch of <a href="http://projects.gnome.org/tracker/">tracker</a> and i&#8217;m loving it &#8211; it looks like its finally reached the stage where I won&#8217;t just turn it straight off after a fresh install.</p>
<p>It now brings GNOME an RDF store with a SPARQL interface. Powerful joo-joo, but kinda scary if you haven&#8217;t seen it before. Most conversations about it lead to words like graphs, triples, ontologies&#8230; My eyes start to gloss over.. I need to learn by doing. So i&#8217;ve been playing with writing some python <a href="http://github.com/Jc2k/tralchemy/tree/master">wrappers</a> to hide tracker and just provide a familiar pythonic interface.</p>
<p>Any object type that tracker knows about will be available in python via the wonders of introspection. All properties of the class are available, with docstrings explaining the intent of the property and its type. Obviously you can get, set and delete and do simple queries. And behind the scenes are SPARQL queries in all their glory. Theres a lot still to do, but enough done that I can synchronise my address book to Tracker with Conduit (see my <a href="http://github.com/Jc2k/conduit/tree/tracker">tracker</a> branch).</p>
<p>So far it looks something like this (but its subject to very rapid change):</p>
<p><code>import tralchemy<br />
from tralchemy.nco import Contact</code></p>
<p><code># add a contact<br />
c = Contact.create()<br />
c.fullname = "John Carr"<br />
c.firstname = "John"<br />
c.nickname = "Jc2k"<br />
c.commit()</code></p>
<p><code># find all the people called John<br />
for c in Contact.get(firstname="John"):<br />
&nbsp;&nbsp;print c.uri, c.fullname</code></p>
<p><code># subscribe to any contact changes<br />
def callback(subjects):<br />
&nbsp;&nbsp;print subjects<br />
Contact.notifications.connect("SubjectsAdded", callback)</code></p>
<p><code># Will probably be just:<br />
Contact.added.connect(callback)</code></p>
<p>While get() is a nice way to do simple queries, what if you wanted to do something a little more complicated. It always feels messy when you have SQL or SPARQL nested in other code. Existing SQL ORM tools are a great place to start at avoiding this, but i quite like the LINQ style generator-to-SPARQL. Something like:</p>
<p><code><br />
q = Query(Contact.firstname for Contact in Store if Contact.nickname == 'Jc2k')<br />
</code></p>
<p>or</p>
<p><code><br />
q = Query(c.firstname for c in Store if c is Contact and c.nickname == 'Jc2k')<br />
</code></p>
<p>Hmm decisions. Hope to implement similar abstractions in JavaScript, C# (via LINQ) and Vala (via Magic). Anyone wanna share their cloning tech?</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/johncarr/2009/05/15/playing-with-rdf/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Sysadmin Team</title>
		<link>http://blogs.gnome.org/johncarr/2009/04/17/sysadmin-team/</link>
		<comments>http://blogs.gnome.org/johncarr/2009/04/17/sysadmin-team/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 14:09:07 +0000</pubDate>
		<dc:creator>John Carr</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/johncarr/?p=111</guid>
		<description><![CDATA[Owen just announced the formation of formal sysadmin team which I will be coordinating on an interim basis.
Want to join the team? Want to get your pet peeve fixed? Everything will unfold on the gnome-infrastructure mailing list, so sign up there if you want to get involved!
]]></description>
			<content:encoded><![CDATA[<p>Owen just <a href="http://mail.gnome.org/archives/gnome-infrastructure/2009-April/msg00075.html">announced</a> the formation of formal sysadmin team which I will be coordinating on an interim basis.</p>
<p>Want to join the team? Want to get your pet peeve fixed? Everything will unfold on the gnome-infrastructure mailing list, so sign up there if you want to get involved!</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/johncarr/2009/04/17/sysadmin-team/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Personal Catastrophic Fail Event</title>
		<link>http://blogs.gnome.org/johncarr/2009/01/08/personal-catastrophic-fail-event/</link>
		<comments>http://blogs.gnome.org/johncarr/2009/01/08/personal-catastrophic-fail-event/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 15:41:29 +0000</pubDate>
		<dc:creator>John Carr</dc:creator>
				<category><![CDATA[Nerd]]></category>
		<category><![CDATA[Bazaar]]></category>
		<category><![CDATA[dulwich]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[GNOME]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/johncarr/?p=101</guid>
		<description><![CDATA[A couple of days ago I was pondering DVCS whilst wandering along an icy road. Not focusing on the ice proved disastrous. My right foot flew forward and i landed flat on my ****, much to the amusement of my fellow codethinkers. My head bounced off the tarmac and my elbow hit.. well who knows, [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of days ago I was pondering DVCS whilst wandering along an icy road. Not focusing on the ice proved disastrous. My right foot flew forward and i landed flat on my ****, much to the amusement of my fellow codethinkers. My head bounced off the tarmac and my elbow hit.. well who knows, but my elbow ended up pretty damn swollen. The day after brought little mercy &#8211; I seemed to have pulled muscles i didn&#8217;t even know I had and looking far left or right proved challenging, as did the simple act of putting my bag over my shoulder. Difficulty sleeping followed.</p>
<p>My point is, all this talk of DVCS caused me physical harm. Discussion considered harmful, lesson learned.</p>
<p>A couple of interesting points were raised about the git-serve bridge which I would like to answer, regardless of what infrastructure GNOME migrates to. I should have been more clear from the start, but the bulk of the work to implement the Git protocol is happening in an upstream project called <a href="http://launchpad.net/dulwich">dulwich</a>. Theres no relation to Bazaar, and might be a nice library for anyone doing Git work in python (it doesnt need to spawn git processes to operate). The code there is based on some earlier work by <a href="http://jameswestby.net/weblog">James Westby</a> and its current maintainer is <a href="http://www.samba.org/~jelmer/">Jelmer Vernooij</a>. Any code for the git-serve mapping between Git and Bazaar is getting added to the bzr-git plugin, and again i&#8217;m working with Jelmer.</p>
<p>I&#8217;ve written some basic responses to the common gut reactions on the <a href="http://bazaar-vcs.org/BzrForeignBranches/Git/Server">Bazaar wiki</a>.</p>
<p>In the context of GNOME, a more interesting question was about how to merge branches from people not using GNOME infrastructure and a different VCS to the maintainer. First of all, why arent they using us? But one interesting thing i&#8217;d like to see is a code review system with tight VCS integration. For example, using dulwich to allow people to push a branch to <a href="http://www.review-board.org">review board</a> and convert it into a review automatically. (The Git protocol will send only the commits that need to be merged). Anyone can push, no plugins or setup needed by the contributor. Then we can allow people to land a merge from review-board in the browser, or merge from review-board into their local branch or even request buildbot test the branch first. git:// is a protocol. We implement lots of other protocols in the freedesktop world, lots of them far more complicated, lots of them much less open. So this doesnt scare me. Its just an efficient way of swapping patches. And of course we can reuse bzrlib for supporting Bazaar.</p>
<p>Most points that have been raised have a valid counter-argument if you approach them with a &#8220;we can&#8221; attitude, but going over them would likely lead to more ice slipping. I will be at FOSDEM, be sure to bring a stick.</p>
<p>Even if we don&#8217;t use Bazaar (and dulwich) as the platform for our core source code hosting, we can still build lots of cool tools and services around GNOME with it. If you want to help out get in touch, or get in #gnome-bzr.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/johncarr/2009/01/08/personal-catastrophic-fail-event/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>JHBuild and DVCS</title>
		<link>http://blogs.gnome.org/johncarr/2008/12/11/jhbuild-and-dvcs/</link>
		<comments>http://blogs.gnome.org/johncarr/2008/12/11/jhbuild-and-dvcs/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 16:13:19 +0000</pubDate>
		<dc:creator>John Carr</dc:creator>
				<category><![CDATA[Nerd]]></category>
		<category><![CDATA[Bazaar]]></category>
		<category><![CDATA[DVCS]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[JHBuild]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/johncarr/?p=95</guid>
		<description><![CDATA[A while ago I opened a bug asking to make it easier to use bzr-mirror.gnome.org with JHBuild. I proposed a patch which still needed some love, but wasn&#8217;t really sure how to finish it. It added a flag so you can say, &#8220;if there is a mirror of this for {bzr,git} users, use it&#8221;. Recently, [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago I opened a bug asking to make it easier to use bzr-mirror.gnome.org with JHBuild. I proposed a patch which still needed some love, but wasn&#8217;t really sure how to finish it. It added a flag so you can say, &#8220;if there is a mirror of this for {bzr,git} users, use it&#8221;. Recently, thanks to zeenix pestering, I finished it. Of course he quickly identified some issues, which led to changes to the JHBuild code for svn, git and bzr. Among other things, SVN finally got tag support, and has a more consistent decision making path. And JHBuild-controlled-Git can handle branches a lot nicer now.</p>
<p>We really need to start cleaning the modulesets &#8211; one of the biggest problems we had is that the properties are getting misused. &#8220;../branches/foobar&#8221; is not a module, its part of a path! This is the route to pain, misery and suffering! As I find time I hope to clean this up, but for now the JHBuild mirror seems to be working.</p>
<p>To start using it, just set mirror_policy to &#8220;bzr&#8221; or &#8220;git&#8221; in your .jhbuildrc. You probably want a clean slate for this &#8211; it won&#8217;t doing anything clever in terms of taking over existing SVN checkouts. Another option is</p>
<pre>module_mirror_policy = {
  "conduit": "bzr",
  "foobar": "git,
}</pre>
<p>I hope to get JHBuild to automate git-svn a little here too (and automatically git-svn init) where appropriate.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/johncarr/2008/12/11/jhbuild-and-dvcs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>DVCS for GNOME</title>
		<link>http://blogs.gnome.org/johncarr/2008/12/11/dvcs-for-gnome/</link>
		<comments>http://blogs.gnome.org/johncarr/2008/12/11/dvcs-for-gnome/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 02:02:00 +0000</pubDate>
		<dc:creator>John Carr</dc:creator>
				<category><![CDATA[Nerd]]></category>
		<category><![CDATA[Bazaar]]></category>
		<category><![CDATA[DVCS]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[GNOME]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/johncarr/?p=93</guid>
		<description><![CDATA[The more I think about it the more I don&#8217;t want to pick a single DVCS for GNOME. It should be up to whoever is doing the work to use whatever tools they want. Unfortunately having each module choose its own hosting format has its own problems &#8211; do i need to check out gnome-super-cool [...]]]></description>
			<content:encoded><![CDATA[<p>The more I think about it the more I don&#8217;t want to pick a single DVCS for GNOME. It should be up to whoever is doing the work to use whatever tools they want. Unfortunately having each module choose its own hosting format has its own problems &#8211; do i need to check out gnome-super-cool from bzr.gnome.org or darcs.gnome.org? What if maintainer A likes cvs and maintainer B likes Git.</p>
<p>&lt;snipped out the bit where i ramble about all the different options people have already suggested. me rambling FTYawn&gt;</p>
<p>There is another approach. The Git protocol is quite easy. The Git pack container format is easy. The basic Git objects are easy. Who says i have to store Git packs in Git? As long as the client Git can grab packs and push packs it is happy. All other operations are local.</p>
<p>So lets take bzr-playground and run something that provides git:// and git+ssh:// access to the bazaar repositories. Push and pull. We&#8217;ll still have a central point from which we can view and checkout a GNOME module and the infra work can focus on a single platform. But the choice of tool i use to do my work is (partially at least) back down to me.</p>
<p>I am currently able to read and write the pack container format as well as speak a decent amount of the git-upload-pack and git-receive-pack protocols. It won&#8217;t be the first time i&#8217;ve serialized or deserialized git objects, so that won&#8217;t take very long. Then its just a case of storing things in Bazaar and maintaining a cache of sha1 to bazaar id. Sure, i&#8217;m trivializing here, but i am confident that this is doable.</p>
<p>I&#8217;m linking to the code I have so far (its an extension of bzr-git) as a gesture that this isnt total vaporware, but it&#8217;s not really anything you can try yet.</p>
<p><a href="http://code.launchpad.net/~johncarr/bzr-git/git-serve">lp:~johncarr/bzr-git/git-serve</a></p>
<p>At this point im mainly interested in collecting +1&#8217;s and -1&#8217;s on the basic concept.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/johncarr/2008/12/11/dvcs-for-gnome/feed/</wfw:commentRss>
		<slash:comments>36</slash:comments>
		</item>
		<item>
		<title>Congratulations Xfce</title>
		<link>http://blogs.gnome.org/johncarr/2008/09/16/congratulations-xfce/</link>
		<comments>http://blogs.gnome.org/johncarr/2008/09/16/congratulations-xfce/#comments</comments>
		<pubDate>Tue, 16 Sep 2008 10:27:24 +0000</pubDate>
		<dc:creator>John Carr</dc:creator>
				<category><![CDATA[Nerd]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[XFCE]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/johncarr/2008/09/16/congratulations-xfce/</guid>
		<description><![CDATA[Last night I caught wind of the Xfce 4.6 alpha (codenamed Pinkie). Congratulations guys, it looks like its shaping up to be a fine release.
Why blog about this (other than its awesomeness)? Well one bit I did notice was that they have a gconf alternative called xfconf, and of course unlike our current gconf it [...]]]></description>
			<content:encoded><![CDATA[<p>Last night I caught wind of the Xfce 4.6 alpha (codenamed <a href="http://foo-projects.org/pipermail/xfce-announce/2008-September/000052.html">Pinkie</a>). Congratulations guys, it looks like its shaping up to be a fine release.</p>
<p>Why blog about this (other than its awesomeness)? Well one bit I did notice was that they have a <a href="http://www.gnome.org/projects/gconf/">gconf</a> alternative called <a href="http://svn.xfce.org/index.cgi/xfce/browse/xfconf/trunk">xfconf</a>, and of course unlike our current gconf it is entirely dbus based. And, on hearing a suggestion, a rumor, a murmur that GNOME is all about the people and the community&#8230; I think it would be cool if we could work with the Xfce guys on this one. I mean their project uses GObject, dbus and has the same goal, right? I&#8217;m told we want an ORBitless desktop. So whats stopping us from sharing this part of our desktop?</p>
<p>If you see technical limitations of their system (I haven&#8217;t looked, I assume sanity and beauty), instead of a rant about it here why not go forth and help them out? Community, community, community.</p>
<p>Of course it could be that dconf or gconf-dbus (our 2 non-mainline gconf-orbit replacements) would be a good fit for Xfce too.</p>
<p>Heres to a *conf-dbus for GNOME 2.26.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/johncarr/2008/09/16/congratulations-xfce/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>git-mirrror &#8211; making it suck less</title>
		<link>http://blogs.gnome.org/johncarr/2008/08/22/git-mirrror-making-it-suck-less/</link>
		<comments>http://blogs.gnome.org/johncarr/2008/08/22/git-mirrror-making-it-suck-less/#comments</comments>
		<pubDate>Fri, 22 Aug 2008 16:12:25 +0000</pubDate>
		<dc:creator>John Carr</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[Mercurial]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/johncarr/2008/08/22/git-mirrror-making-it-suck-less/</guid>
		<description><![CDATA[Federico notes of a change that every single git-mirror user needs to make to every one of their clones to have its tags stay up to date properly. So, dear lazyweb, my question is simply this: How can I (as git-mirror guy) make this annoying git-foo go away? I hate stupid crazy repetitive manual crap [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.gnome.org/~federico/news-2008-08.html#21">Federico</a> notes of a change that every single git-mirror user needs to make to every one of their clones to have its tags stay up to date properly. So, dear lazyweb, my question is simply this: How can I (as git-mirror guy) make this annoying git-foo go away? I hate stupid crazy repetitive manual crap that every one of my users has to put up with !</p>
<p>You can see how the mirrors are currently <a href="http://git-mirror.gnome.org/?p=vcs-mirror;a=blob;f=actions/git-create.sh">created</a> and <a href="http://git-mirror.gnome.org/?p=vcs-mirror;a=blob;f=actions/git-update.sh">updated</a> in the <a href="http://git-mirror.gnome.org/?p=vcs-mirror;a=tree">vcs-mirror</a> repository. To share in my vodka and whisky spoils for setting up git-mirror (which, despite idle threats to the contrary, i&#8217;m still waiting for) your solution should not disturb existing clones&#8230;.</p>
<p>(And yes, that is a <a href="http://git-mirror.gnome.org/?p=vcs-mirror;a=blob;f=actions/hg-create.sh">hg</a> script you see).</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/johncarr/2008/08/22/git-mirrror-making-it-suck-less/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Conduit and Accessibility</title>
		<link>http://blogs.gnome.org/johncarr/2008/08/04/conduit-and-accessibility/</link>
		<comments>http://blogs.gnome.org/johncarr/2008/08/04/conduit-and-accessibility/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 21:22:21 +0000</pubDate>
		<dc:creator>John Carr</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Conduit]]></category>
		<category><![CDATA[GNOME]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/johncarr/2008/08/04/conduit-and-accessibility/</guid>
		<description><![CDATA[This blog post is a friendly note to application maintainers out there to think carefully about how accessible your software is, especially when using non-standard widgets or canvases. Accessibility is important and it can also be hard. So think about it early and think about it often. Below are some notes from in the trenches, [...]]]></description>
			<content:encoded><![CDATA[<p>This blog post is a friendly note to application maintainers out there to think carefully about how accessible your software is, especially when using non-standard widgets or canvases. Accessibility is important and it can also be hard. So think about it early and think about it often. Below are some notes from in the trenches, and if you think about a11y from the beginning things won&#8217;t end up this way for you.</p>
<p>One issue to rise out of the current module proposal discussion is Conduit and its accessibility. In order to be a good GNOME application, Conduit needs to be accessible. The use of a canvas to render shiny goodness manually means that we sacrifice lots of ready made accessibility.</p>
<p>Conduit has two major issues on the accessibility front. Can I control it without using a mouse? And can I tell what is happening when i&#8217;m using a screen reader? Sadly, the current answer is <a href="http://bugzilla.gnome.org/show_bug.cgi?id=545430">no</a> and <a href="http://bugzilla.gnome.org/show_bug.cgi?id=545431">no</a>. Having decided to change this, I&#8217;ve spent the weekend looking at how to pass more useful information to the accessibility infrastructure.</p>
<p>We use GooCanvas, which is actually already accessible. Each item that is added to the canvas is available to accessibility tools, be it a raw canvas item or a gtk widget. Basic information such as its size and position is exposed without any effort on the part of the application author. Whilst experimenting, I have hit the following limitations:</p>
<p>1. Without implementing more ATK interfaces, the only Conduit relevant information I can expose is a name and a description for each object. Its not easy to implement new interfaces without throwing away the existing interface. This is really quite limiting, and I don&#8217;t think it will make for a good enough user experience. (I don&#8217;t consider this a GooCanvas bug, but instead something that Conduit needs to fix on its own).</p>
<p>2. GooCanvas doesn&#8217;t seem to implement the children-changed signal. In testing this has meant that accerciser is unaware of changes on the canvas, and i&#8217;ve needed to keep restarting accerciser.</p>
<p>So GooCanvas needs a patch to fix children-changed. Lets defer that to later, i&#8217;ll look at it early in the next cycle. For now I need to work on fixing Conduit. Hopefully I can derive from the existing Goocanvas ATK objects and extend, as opposed to rewriting it all. Sadly not, the GooCanvas accessibility code isn&#8217;t available from python, so I need to re-implement everything. Again, potential patch to pygoocanvas deferred to early next cycle.</p>
<p>From reading the Devhelp for ATK, it seems that I just need to implement an atk.Object (and assorted interfaces) and an atk.ObjectFactory for each accessible GObject I want to have. So how do I implement an interface in python? My initial thought was that I would just have to derive from them:</p>
<p><code>&gt;&gt;&gt; import gobject<br />
&gt;&gt;&gt; import atk<br />
&gt;&gt;&gt; class Foo(atk.Object, atk.Component):<br />
...        def some_method(self, param):<br />
...                pass<br />
...</code></p>
<p>Is it enough?</p>
<p><code>&gt;&gt;&gt; gobject.type_interfaces(Foo)<br />
[]</code></p>
<p>GObject doesn&#8217;t seem to know that I want to implement an interface. So my code is not enough. After poking this for some time it turns out there are two fundamental pieces of fail with my first attempt.</p>
<p>At some point, pygtk claimed to automatically register things for me. In this case, maybe more generally, this is not the case. I need to register my class with the GObject type system:</p>
<p><code>&gt;&gt;&gt; gobject.type_register(Foo)<br />
&gt;&gt;&gt; gobject.type_interfaces(Foo)<br />
[<gtype>&lt;GType AtkComponent (136469760)&gt;]</gtype></code></p>
<p>Victory! At this point I was hoping my code would spring to life, but it didn&#8217;t. Poke, poke, poke. When overriding a GObject method from python or implementing an interface you need a do_ prefix. Presumably this is to make the introspection foo a little less scary. So I needed:</p>
<p><code>&gt;&gt;&gt; class Foo(atk.Object, atk.Component):<br />
&gt;&gt;&gt;        def do_some_method(self, param):<br />
&gt;&gt;&gt;               pass</code></p>
<p>Once you have implemented your accessible object, you need an accessible object factory, and you need to register it with the default ATK registry. I&#8217;m leaving some bits out here, but basically:</p>
<p><code>&gt;&gt;&gt; class FooFactory(atk.ObjectFactory):<br />
...         def do_create_accessible(self, obj):<br />
...                 return Foo(obj)<br />
...<br />
&gt;&gt;&gt; gobject.type_register(FooFactory)<br />
&gt;&gt;&gt; atk.get_default_registry().set_factory_type(GooFoo, FooFactory)</code></p>
<p>Now when ATK encounters a GooFoo object it should ask FooFactory for an accessible version of it. It will get a new Foo object.</p>
<p>Unfortunately this is not what happens. !&#8221;£$. A new FooFactory is instanced, and then a GCritical fires, because create_accessible isn&#8217;t happening and something is then trying to ref a null. Sigh. Epic Fail. After examining pygtk, it turns out that the create_accessible method of atk is blacklisted when bindings are generated. I unblacklisted it and encountered a nice compile error. If you poke around (or ask Rob), you&#8217;ll see that create_accessible is defined without a self, its essentially a @staticmethod. This is an edge case that the code generator doesn&#8217;t currently handle, and the wrapper ends up trying to pass too many arguments. So now I need to figure out a suitable patch for pyatk (or the code generator) before I can continue&#8230;</p>
<p>Big thanks to <a href="http://blog.floopily.org/">Rob</a> for helping me with this so far, your big chunk of clue has been most welcome. You can has beer.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/johncarr/2008/08/04/conduit-and-accessibility/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>83% of statistics are made up on the spot</title>
		<link>http://blogs.gnome.org/johncarr/2008/07/07/83-of-statistics-are-made-up-on-the-spot/</link>
		<comments>http://blogs.gnome.org/johncarr/2008/07/07/83-of-statistics-are-made-up-on-the-spot/#comments</comments>
		<pubDate>Mon, 07 Jul 2008 12:50:13 +0000</pubDate>
		<dc:creator>John Carr</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Bazaar]]></category>
		<category><![CDATA[DVCS]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[GNOME]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/johncarr/2008/07/07/83-of-statistics-are-made-up-on-the-spot/</guid>
		<description><![CDATA[Got up early for some healthy debate on the differences between Bazaar and Git at the DVCS Bof. Maybe the slot was changed when I wasn&#8217;t looking, but it turned into a &#8220;introduction to Git and Gitorious&#8221; presentation, with a packed audience. For a session meant to focus on DVCS in general, and how GNOME [...]]]></description>
			<content:encoded><![CDATA[<p>Got up early for some healthy debate on the differences between Bazaar and Git at the DVCS Bof. Maybe the slot was changed when I wasn&#8217;t looking, but it turned into a &#8220;introduction to Git and Gitorious&#8221; presentation, with a packed audience. For a session meant to focus on DVCS in general, and how GNOME can move from SVN to $DVCS, it was a bit of a shame. BUT THEN&#8230;</p>
<p>There was a second smaller talk on DVCS that was slightly more productive. Neither side has managed to provide an action plan so far. When the Bazaar and the Git advocates can come to GNOME and say &#8220;we have a plan, this is how we are migrating and this is how we are going to fix all the systems that depend on GNOME&#8221;.. then we can talk. This whole issue needs some JFDI &#8211; we can&#8217;t cry/shout until our DVCS is picked, and then expect the sysadmins to take care of it.</p>
<p>On a lighter note, got some swag. Quite happy with the laptop bag, and the T-shirt is quite nice. Doesn&#8217;t match the codethink t-shirts though <img src='http://blogs.gnome.org/johncarr/wp-content/mu-plugins/tango-smilies/tango/face-wink.png' alt=';)' class='wp-smiley' /> </p>
<p>Now back to cleaning up the Git code so Rob doesn&#8217;t harm me.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/johncarr/2008/07/07/83-of-statistics-are-made-up-on-the-spot/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Loggerhead + Search</title>
		<link>http://blogs.gnome.org/johncarr/2008/06/26/loggerhead-search/</link>
		<comments>http://blogs.gnome.org/johncarr/2008/06/26/loggerhead-search/#comments</comments>
		<pubDate>Thu, 26 Jun 2008 20:52:09 +0000</pubDate>
		<dc:creator>John Carr</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Bazaar]]></category>
		<category><![CDATA[GNOME]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/johncarr/2008/06/26/loggerhead-search/</guid>
		<description><![CDATA[TWIB blogged about a little something we have been working on with the Bazaar guys. The Bazaar mirror now has loggerhead and search, based on the bzr-search plugin. This lets it search over the whole history of trunk. When beuno finishes skinning it i&#8217;ll integrate it in to the main site. In the mean time, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jam-bazaar.blogspot.com/2008/06/this-week-in-bazaar_26.html">TWIB</a> blogged about a little something we have been working on with the Bazaar guys. The Bazaar mirror now has <a href="http://bzr-mirror.gnome.org:8080/cheese/trunk/changes">loggerhead</a> and search, based on the bzr-search plugin. This lets it search over the whole history of trunk. When beuno finishes skinning it i&#8217;ll integrate it in to the main site. In the mean time, enjoy.</p>
<p>Oh, it also shows off something I badly explained the other day. See <a href="http://bzr-mirror.gnome.org:8080/vcs-mirror/trunk/changes">here</a>. Revision 5 was committed by myself, but bzr-svn also saved the &#8211;author property, attributing that code to Jelmer correctly.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/johncarr/2008/06/26/loggerhead-search/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
