<?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>Gareth Hunt</title>
	<atom:link href="http://www.garethhunt.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.garethhunt.com</link>
	<description>Firefox Addons, Mobile Web and living in the USA</description>
	<lastBuildDate>Fri, 19 Mar 2010 05:12:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using XUL prefwindow and prefpanes</title>
		<link>http://www.garethhunt.com/2010/03/18/using-xul-prefwindow-and-prefpanes/</link>
		<comments>http://www.garethhunt.com/2010/03/18/using-xul-prefwindow-and-prefpanes/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 05:12:36 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Howto]]></category>

		<guid isPermaLink="false">http://www.garethhunt.com/?p=60</guid>
		<description><![CDATA[
pre {
  margin: 0 20px 10px 20px;
  background-color: #ddd;
}

The combination of &#60;prefwindow&#62; and &#60;prefpane&#62;'s provides Firefox addon developers with an effective mechanism for creating a preferences dialog.  The best example of &#60;prefwindow&#62; usage is the Firefox options dialog.
This tech note will focus on getting all the elements of the &#60;prefwindow&#62; framework right [...]]]></description>
			<content:encoded><![CDATA[<style>
pre {
  margin: 0 20px 10px 20px;
  background-color: #ddd;
}
</style>
<p>The combination of <code>&lt;prefwindow&gt;</code> and <code>&lt;prefpane&gt;</code>'s provides Firefox addon developers with an effective mechanism for creating a preferences dialog.  The best example of <code>&lt;prefwindow&gt;</code> usage is the Firefox options dialog.</p>
<p>This tech note will focus on getting all the elements of the <code>&lt;prefwindow&gt;</code> framework right as it is fairly easy to miss one small element, leaving you scratching your head.  Below is a screenshot of the end result.</p>
<p><a href="http://www.garethhunt.com/wp-content/uploads/2010/03/preferences.png"><img src="http://www.garethhunt.com/wp-content/uploads/2010/03/preferences-300x186.png" alt="" title="XUL prefwindow" width="300" height="186" class="alignnone size-medium wp-image-72" /></a></p>
<h3>Setting up the <code>&lt;prefwindow&gt;</code></h3>
<p>The code below a minimal <code>&lt;prefwindow&gt;</code> page with two <code>&lt;prefpane&gt;</code>'s.  If only one <code>&lt;prefpane&gt;</code> is used, the navigation bar is not displayed.  When two or more <code>&lt;prefpane&gt;</code>'s are used, a navigation bar is added at the top of the page.</p>
<pre>
&lt;?xml version="1.0"?&gt;
&lt;?xml-stylesheet href="chrome://global/skin/global.css"?&gt;

&lt;prefwindow id="modifyheadersPreferences"
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    style="width: 42em; min-height: 37.5em;"&gt;

    &lt;prefpane id="paneProfiles" label="Profiles"
        src="chrome://modifyheaders/content/profiles.xul"/&gt;
    &lt;prefpane id="paneHeaders" label="Headers"
        src="chrome://modifyheaders/content/headers.xul"/&gt;
&lt;/prefwindow&gt;
</pre>
<p>For this example, the contents of each <code>&lt;prefpane&gt;</code> are contained in external files, but you can place content directly between <code>&lt;prefpane&gt;</code> start and end tags.  No content should appear above between the opening <code>&lt;prefwindow&gt;</code> element and the <code>&lt;prefpane&gt;</code> elements.  If any scripts or other content must be defined, place them after the last <code>&lt;prefpane&gt;</code>.</p>
<h3>Defining <code>&lt;prefpane&gt;</code> panels</h3>
<p>There are several rules for defining <code>&lt;prefpane&gt;</code>s in external files:</p>
<ol>
<li>The root tag must be an <code>&lt;overlay&gt;</code>.</li>
<li>The id of the <code>&lt;prefpane&gt;</code> must match the id specified in the <code>&lt;prefwindow&gt;</code></li>
<li>A <code>&lt;preferences&gt;</code> element must be specified, even if it is empty</li>
</ol>
<p>Here is an example for the <code>&lt;prefpane&gt;</code> with <code>id="paneProfiles"</code>.</p>
<pre>
&lt;?xml version="1.0"?&gt;
&lt;overlay id="modifyheaders-profiles-overlay"
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    &lt;prefpane id="paneProfiles" label="Profiles"&gt;
        &lt;preferences/&gt;
        &lt;vbox id="modifyheaders-profiles"&gt;
            &lt;description&gt;Edit Site Profiles&lt;/description&gt;
        &lt;/vbox&gt;
    &lt;/prefpane&gt;
&lt;/overlay&gt;
</pre>
<p>This markup is repeated for each <code>&lt;prefpane&gt;</code> you need to define.  Only the id attribute must be unique.</p>
<h3>Opening the <code>&lt;prefwindow&gt;</code> using javascript</h3>
<p>This is the bit that caught me out.  You have to be careful about which features are specified for the window.  Typically for a XUL dialog, you would use:</p>
<pre>
window.openDialog("chrome://modifyheaders/content/dialog.xul", "modifyheadersDialog", "resizable,dialog,centerscreen,modal", this);
</pre>
<p>The third argument lists the features for the dialog. In this case: resizable, dialog, centerscreen, modal.  For a <code>&lt;prefwindow&gt;</code>, you have to make sure the <em>toolbar</em> feature is specified.  Resizeable can be ignored as it seems to have no affect on this type of window:</p>
<pre>
window.openDialog("chrome://modifyheaders/content/preferences.xul", "modifyheadersPreferences", "chrome,titlebar,toolbar,centerscreen,modal", this);
</pre>
<p>That about wraps it up.  As you can see, it is straightforward enough.  For further information, here are some further references from MDC:</p>
<ul>
<li><a href="https://developer.mozilla.org/en/XUL/prefwindow"><code>&lt;prefwindow&gt;</code></a></li>
<li><a href="https://developer.mozilla.org/en/XUL/prefpane"><code>&lt;prefpane&gt;</code></a></li>
<li><a href="https://developer.mozilla.org/en/XUL/preferences"><code>&lt;preferences&gt;</code></a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.garethhunt.com/2010/03/18/using-xul-prefwindow-and-prefpanes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Released: Mailfrom 0.2.5 and Future Development</title>
		<link>http://www.garethhunt.com/2009/12/13/released-mailfrom-0-2-5-and-future-development/</link>
		<comments>http://www.garethhunt.com/2009/12/13/released-mailfrom-0-2-5-and-future-development/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 05:31:24 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.garethhunt.com/?p=54</guid>
		<description><![CDATA[Mailfrom 0.2.5 was released today.  This version fixed a defect to provide Firefox 3.6 compatibility and provides support for Windows Live Hotmail.
I've realised for some time that Firefox now provides limited out-of-the-box support for Yahoo Mail and GMail as the target for mailto links.  So I'm going to change the purpose of mailfrom from replacing [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://addons.mozilla.org/en-US/firefox/addon/6354">Mailfrom 0.2.5</a> was released today.  This version fixed a defect to provide <a href="http://www.mozilla.com/">Firefox 3.6</a> compatibility and provides support for <a href="http://mail.live.com/">Windows Live Hotmail</a>.</p>
<p>I've realised for some time that Firefox now provides limited out-of-the-box support for Yahoo Mail and GMail as the target for mailto links.  So I'm going to change the purpose of mailfrom from replacing the built-in functionality to enhancing it.</p>
<p>As an experiment, I've moved the source code management to <a href="http://github.com/garethhunt/mailfrom">github</a>.  I've not used git before and I'm interested to see what the fuss is about!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.garethhunt.com/2009/12/13/released-mailfrom-0-2-5-and-future-development/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Firefox 3.6 Compatibility</title>
		<link>http://www.garethhunt.com/2009/12/01/firefox-3-6-compatibility/</link>
		<comments>http://www.garethhunt.com/2009/12/01/firefox-3-6-compatibility/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 18:18:00 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://www.garethhunt.com/?p=49</guid>
		<description><![CDATA[Quick update on Firefox 3.6.  Modify Headers and XHTMLMP have both been successfully tested in beta 4.  The max version for each has been bumped at AMO and both are now available for install into 3.6.
Initial Mailfrom testing has revealed a couple of defects.  I'm going to work on those over the next week and [...]]]></description>
			<content:encoded><![CDATA[<p>Quick update on Firefox 3.6.  <a title="Download Modify Headers" href="https://addons.mozilla.org/en-US/firefox/addon/967">Modify Headers</a> and <a title="Download XHTML Mobile Profile" href="https://addons.mozilla.org/en-US/firefox/addon/1345">XHTMLMP</a> have both been successfully tested in beta 4.  The max version for each has been bumped at <a href="https://addons.mozilla.org/">AMO</a> and both are now available for install into 3.6.</p>
<p>Initial <a title="Download Mailfrom" href="https://addons.mozilla.org/en-US/firefox/addon/6354">Mailfrom</a> testing has revealed a couple of defects.  I'm going to work on those over the next week and hopefully have it done before GA release or Christmas (whichever comes first).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.garethhunt.com/2009/12/01/firefox-3-6-compatibility/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Running with Pineapples</title>
		<link>http://www.garethhunt.com/2009/11/13/running-with-pineapples/</link>
		<comments>http://www.garethhunt.com/2009/11/13/running-with-pineapples/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 03:34:02 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[Living in America]]></category>

		<guid isPermaLink="false">http://www.garethhunt.com/?p=45</guid>
		<description><![CDATA[I'm going to be running the Winter Pineapple Classic, a 5K (3 mile) 'fun' run over obstacles on Saturday November 14.
The event is to support the Leukemia &#38; Lymphoma Society.  Any and all donations are gratefully accepted and can be made up until December 4, 2009 at this special page.
]]></description>
			<content:encoded><![CDATA[<p>I'm going to be running the <a href="http://www.winterpineappleclassic.org">Winter Pineapple Classic</a>, a 5K (3 mile) 'fun' run over obstacles on Saturday November 14.</p>
<p>The event is to support the <a href="http://www.leukemia-lymphoma.org/">Leukemia &amp; Lymphoma Society</a>.  Any and all <a title="Donate to Gareth for the Winter Pineapple Classic" href="http://www.llswa.org/site/TR/Events/WinterPineappleClassic?px=1197861&amp;pg=personal&amp;fr_id=1080">donations</a> are gratefully accepted and can be made up until December 4, 2009 at this <a href="http://www.llswa.org/site/TR/Events/WinterPineappleClassic?px=1197861&amp;pg=personal&amp;fr_id=1080">special page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.garethhunt.com/2009/11/13/running-with-pineapples/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Released: Modify Headers 0.6.6</title>
		<link>http://www.garethhunt.com/2009/06/08/released-modify-headers-066/</link>
		<comments>http://www.garethhunt.com/2009/06/08/released-modify-headers-066/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 02:55:42 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.garethhunt.com/?p=42</guid>
		<description><![CDATA[Back in April I released Modify Headers 0.6.6.  This version fixes a bug in the import function introduced in 0.6.5.
This last weekend, I tested Modify Headers, XHTML Mobile Profile and Mailfrom on Firefox 3.5b4 successfully.  All the addons are now updated to work with the beta.
]]></description>
			<content:encoded><![CDATA[<p>Back in April I released <a href="https://addons.mozilla.org/en-US/firefox/addons/versions/967">Modify Headers 0.6.6</a>.  This version fixes a bug in the import function introduced in 0.6.5.</p>
<p>This last weekend, I tested <a href="https://addons.mozilla.org/en-US/firefox/addons/versions/967">Modify Headers</a>, <a href="https://addons.mozilla.org/en-US/firefox/addon/1345">XHTML Mobile Profile</a> and <a href="https://addons.mozilla.org/en-US/firefox/addon/6354">Mailfrom</a> on Firefox 3.5b4 successfully.  All the addons are now updated to work with the beta.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.garethhunt.com/2009/06/08/released-modify-headers-066/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Release: Modify Headers 0.6.5</title>
		<link>http://www.garethhunt.com/2009/04/06/release-modify-headers-065/</link>
		<comments>http://www.garethhunt.com/2009/04/06/release-modify-headers-065/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 20:58:01 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.garethhunt.com/?p=36</guid>
		<description><![CDATA[Modify Headers 0.6.5 was released over the weekend.  This adds a new column on the list of headers to provide a comment for each entry.  In addition an enhancement to float the admin window to the top if a user clicks on the Tools menu item was implemented.
The new release should update automatically [...]]]></description>
			<content:encoded><![CDATA[<p>Modify Headers 0.6.5 was released over the weekend.  This adds a new column on the list of headers to provide a comment for each entry.  In addition an enhancement to float the admin window to the top if a user clicks on the Tools menu item was implemented.</p>
<p>The new release should update automatically for most users, or it can be downloaded At <a title="Modify Headers 0.6.5" href="https://addons.mozilla.org/en-US/firefox/addon/967">Mozilla Addons</a>.</p>
<p><!--adsensestart--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.garethhunt.com/2009/04/06/release-modify-headers-065/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>It&#8217;s good to be back</title>
		<link>http://www.garethhunt.com/2008/07/26/its-good-to-be-back/</link>
		<comments>http://www.garethhunt.com/2008/07/26/its-good-to-be-back/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 02:35:40 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.garethhunt.com/?p=29</guid>
		<description><![CDATA[At long last I've been able to get the blog back up and running after almost a month of down time.  At the end of June my webhost had a double disk failure on the server that hosts the virtual server and all the data was lost!
Thankfully I had setup a daily cron job to [...]]]></description>
			<content:encoded><![CDATA[<p>At long last I've been able to get the blog back up and running after almost a month of down time.  At the end of June my webhost had a double disk failure on the server that hosts the virtual server and all the data was lost!</p>
<p>Thankfully I had setup a daily cron job to email a backup of all the databases.  It's taken a few weeks to get everything back up and running.  First I had to get some websites I host restored, second work has been incredibly busy (50 - 80 hrs a week) and on top of that I've been working on a new website for a charity here in Seattle.  At long last I've had the time to get the blog back.</p>
<p>This should serve as a warning to anyone who has a virtual server: KEEP REGULAR BACKUPS.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.garethhunt.com/2008/07/26/its-good-to-be-back/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Released: Modify Headers 0.6.4 and XHTML Mobile Profile 0.5.3</title>
		<link>http://www.garethhunt.com/2008/03/01/released-modify-headers-064-and-xhtml-mobile-profile-053/</link>
		<comments>http://www.garethhunt.com/2008/03/01/released-modify-headers-064-and-xhtml-mobile-profile-053/#comments</comments>
		<pubDate>Sat, 01 Mar 2008 20:17:17 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Mobile Web]]></category>

		<guid isPermaLink="false">http://www.garethhunt.com/index.php/2008/03/01/released-modify-headers-064-and-xhtml-mobile-profile-053/</guid>
		<description><![CDATA[Both Modify Headers and XHTML Mobile Profile have been updated this week.
Version 0.6.4 of Modify Headers fixes a nsIObserver interface problem with the add-on working in Firefox 3 beta.  XHTML Mobile Profile 0.5.3 adds support for the content type application/vnd.wap.multipart.mime.

]]></description>
			<content:encoded><![CDATA[<p>Both <a href="http://modifyheaders.mozdev.org/" title="Modify Headers website">Modify Headers</a> and <a href="http://xhtmlmp.mozdev.org/" title="XHTML MP website">XHTML Mobile Profile</a> have been updated this week.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/967" title="Mozilla Addons">Version 0.6.4 of Modify Headers</a> fixes a <a href="http://www.xulplanet.com/references/xpcomref/ifaces/nsIObserver.html" title="XUL Planet nsIObserver">nsIObserver interface</a> <a href="https://www.mozdev.org/bugs/show_bug.cgi?id=18687" title="ModifyHeaders bug #18687">problem</a> with the add-on working in Firefox 3 beta.  <a href="https://addons.mozilla.org/en-US/firefox/addon/1345" title="Mozilla Addons">XHTML Mobile Profile 0.5.3</a> <a href="https://www.mozdev.org/bugs/show_bug.cgi?id=18676" title="XHTML MP bug 18676">adds support</a> for the content type application/vnd.wap.multipart.mime.</p>
<p><!--adsensestart--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.garethhunt.com/2008/03/01/released-modify-headers-064-and-xhtml-mobile-profile-053/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Mailfrom 0.2 Released</title>
		<link>http://www.garethhunt.com/2008/02/18/mailfrom-02-released/</link>
		<comments>http://www.garethhunt.com/2008/02/18/mailfrom-02-released/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 19:04:07 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://www.garethhunt.com/index.php/2008/02/18/mailfrom-02-released/</guid>
		<description><![CDATA[Mailfrom 0.2 was released over the weekend.  This adds support for AOL Mail and handling for subject lines in mailto links.
Download from Mozilla Addons.

]]></description>
			<content:encoded><![CDATA[<p>Mailfrom 0.2 was released over the weekend.  This adds support for <a href="http://mail.aol.com/" title="AOL Mail">AOL Mail</a> and handling for subject lines in mailto links.</p>
<p>Download from <a href="https://addons.mozilla.org/en-US/firefox/addon/6354" title="Mailfrom 0.2.0">Mozilla Addons</a>.</p>
<p><!--adsensestart--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.garethhunt.com/2008/02/18/mailfrom-02-released/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Cygwin: died waiting for dll loading</title>
		<link>http://www.garethhunt.com/2008/02/11/cygwin-died-waiting-for-dll-loading/</link>
		<comments>http://www.garethhunt.com/2008/02/11/cygwin-died-waiting-for-dll-loading/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 02:18:58 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[cygwin]]></category>

		<guid isPermaLink="false">http://www.garethhunt.com/index.php/2008/02/11/cygwin-died-waiting-for-dll-loading/</guid>
		<description><![CDATA[Over the weekend I was trying to use mod_rewrite with apache 2 webserver for cygwin and kept getting the following error:
11086085 [main] httpd2 4492 fork: child 5492 - died waiting for dll loading, errno 11
It seemed obvious that cygwin was unable to load some dependency for mod_rewrite.  After a little googling, I found a [...]]]></description>
			<content:encoded><![CDATA[<p>Over the weekend I was trying to use mod_rewrite with apache 2 webserver for cygwin and kept getting the following error:</p>
<p><code>11086085 [main] httpd2 4492 fork: child 5492 - died waiting for dll loading, errno 11</code></p>
<p>It seemed obvious that cygwin was unable to load some dependency for mod_rewrite.  After a little googling, I found a suggestion to rebase cygwin.  The procedure is as follows:</p>
<ol>
<li>Shutdown cygserver (if running): <strong>net stop cygserver</strong>.</li>
<li>Close all cygwin windows.</li>
<li>Open <strong>Start-&gt;Run</strong></li>
<li>rebase has to be run from an ash shell, so type <strong>C:\path\to\cygwin\bin\ash.exe</strong></li>
<li>Once the shell window in open: <strong>$ cd /bin</strong></li>
<li><strong>$ ./rebaseall</strong></li>
<li><strong>$ exit</strong> to close the window</li>
</ol>
<p>After this, I restarted the cygserver service and apache and mod_rewrite worked perfectly.</p>
<p><!--adsensestart--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.garethhunt.com/2008/02/11/cygwin-died-waiting-for-dll-loading/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
