<?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 &#187; Firefox</title>
	<atom:link href="http://www.garethhunt.com/category/firefox/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>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>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>Announcing Mailfrom v0.1: compose mailto links in webmail</title>
		<link>http://www.garethhunt.com/2008/01/20/announcing-mailfrom-v01-compose-mailto-links-in-webmail/</link>
		<comments>http://www.garethhunt.com/2008/01/20/announcing-mailfrom-v01-compose-mailto-links-in-webmail/#comments</comments>
		<pubDate>Mon, 21 Jan 2008 05:53:08 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://www.garethhunt.com/index.php/2008/01/20/announcing-mailfrom-v01-compose-mailto-links-in-webmail/</guid>
		<description><![CDATA[I'm pleased to announce a new Firefox addon, Mailfrom, that enables mailto links to be composed in your favourite webmail service.
Version 0.1 is an early access release and provides support for GMail and Yahoo Mail only.  If you wish to have a service added, request an enhancement or encounter a problem, please file a [...]]]></description>
			<content:encoded><![CDATA[<p>I'm pleased to announce a new Firefox addon, <a href="http://mailfrom.mozdev.org/" title="Mailfrom">Mailfrom</a>, that enables mailto links to be composed in your favourite webmail service.</p>
<p>Version 0.1 is an early access release and provides support for GMail and Yahoo Mail only.  If you wish to have a service added, request an enhancement or encounter a problem, please <a href="http://mailfrom.mozdev.org/bugs.html" title="Mailfrom Bugs">file a bug</a> report.</p>
<p>Mailfrom is available for download from the <a href="https://addons.mozilla.org/en-US/firefox/addon/6354" title="Download Mailfrom">Mozilla Addons Sandbox</a> (login required).</p>
<p>To make the addon available in the public repository, it requires reviews.  If you like the addon, please <a href="https://addons.mozilla.org/en-US/firefox/reviews/add/6354" title="Review Mailfrom">post a review here</a>.</p>
<p><!--adsensestart--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.garethhunt.com/2008/01/20/announcing-mailfrom-v01-compose-mailto-links-in-webmail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Released: Modify Headers 0.6.3</title>
		<link>http://www.garethhunt.com/2008/01/06/released-modify-headers-063/</link>
		<comments>http://www.garethhunt.com/2008/01/06/released-modify-headers-063/#comments</comments>
		<pubDate>Sun, 06 Jan 2008 19:34:34 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://www.garethhunt.com/index.php/2008/01/06/released-modify-headers-063/</guid>
		<description><![CDATA[Happy New Year to you all.
Before Christmas I released version 0.6.3 of Modify Headers.  This version adds support for the Firefox 3 beta 2.  For current users this will automatically update, otherwise, please download from Mozilla Addons.
Update: XHTML Mobile Profile 0.5.2 has been updated to support Firefox 3 beta 2.

]]></description>
			<content:encoded><![CDATA[<p>Happy New Year to you all.</p>
<p>Before Christmas I released version 0.6.3 of <a href="http://modifyheaders.mozdev.org/" title="Modify Headers">Modify Headers</a>.  This version adds support for the <a href="http://www.mozilla.com/en-US/firefox/all-beta.html" title="Download Firefox 3 beta">Firefox 3 beta 2</a>.  For current users this will automatically update, otherwise, please download from <a href="https://addons.mozilla.org/en-US/firefox/addon/967" title="Modify Headers 0.6.3">Mozilla Addons.</a></p>
<p>Update: XHTML Mobile Profile 0.5.2 has been updated to support <a href="http://www.mozilla.com/en-US/firefox/all-beta.html" title="Download Firefox 3 beta 2">Firefox 3 beta 2</a>.</p>
<p><!--adsensestart--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.garethhunt.com/2008/01/06/released-modify-headers-063/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Announcing: XHTML Mobile Profile v0.5.2 for Firefox</title>
		<link>http://www.garethhunt.com/2007/09/14/announcing-xhtml-mobile-profile-v052-for-firefox/</link>
		<comments>http://www.garethhunt.com/2007/09/14/announcing-xhtml-mobile-profile-v052-for-firefox/#comments</comments>
		<pubDate>Fri, 14 Sep 2007 02:35:47 +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/2007/09/14/announcing-xhtml-mobile-profile-v052-for-firefox/</guid>
		<description><![CDATA[Yesterday, version 0.5.2 of the XHTML Mobile Profile add-on for Firefox was released. Please install from Mozilla Add-ons.
This is the second bugfix release of version 0.5, (which was not announced when released last month, oops).  Version 0.5 adds support for rendering multipart mixed content in Firefox.
Please report any defects or enhancement requests in Mozdev [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, version 0.5.2 of the XHTML Mobile Profile add-on for Firefox was released. Please install from <a href="https://addons.mozilla.org/en-US/firefox/addon/1345" title="XHTML MP 0.5.2">Mozilla Add-ons</a>.</p>
<p>This is the second bugfix release of version 0.5, (which was not announced when released last month, oops).  Version 0.5 adds support for rendering multipart mixed content in Firefox.</p>
<p>Please report any defects or enhancement requests in <a href="http://xhtmlmp.mozdev.org/bugs.html" title="XHTML MP Bugzilla">Mozdev Bugzilla</a>.</p>
<p><!--adsensestart--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.garethhunt.com/2007/09/14/announcing-xhtml-mobile-profile-v052-for-firefox/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Released: Modify Headers 0.6.0</title>
		<link>http://www.garethhunt.com/2007/05/06/released-modify-headers-060/</link>
		<comments>http://www.garethhunt.com/2007/05/06/released-modify-headers-060/#comments</comments>
		<pubDate>Sun, 06 May 2007 01:26:02 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://www.garethhunt.com/index.php/2007/05/06/released-modify-headers-060/</guid>
		<description><![CDATA[Version 0.6.0 of Modify Headers is now available. The main new feature for version 0.6.0 is the ability to export and import headers.  The wizard can be found on the configuration tab.
Please post any bugs to bugzilla.mozdev.org.

]]></description>
			<content:encoded><![CDATA[<p>Version 0.6.0 of Modify Headers is <a href="https://addons.mozilla.org/en-US/firefox/addon/967" title="Modify Headers v 0.6.0">now available</a>. The main new feature for version 0.6.0 is the ability to export and import headers.  The wizard can be found on the configuration tab.</p>
<p>Please post any bugs to <a href="http://modifyheaders.mozdev.org/bugs.html" title="Modify Headers Bugs">bugzilla.mozdev.org</a>.</p>
<p><!--adsensestart--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.garethhunt.com/2007/05/06/released-modify-headers-060/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Released: XHTML Mobile Profile 0.3.7</title>
		<link>http://www.garethhunt.com/2007/03/02/released-xhtml-mobile-profile-037/</link>
		<comments>http://www.garethhunt.com/2007/03/02/released-xhtml-mobile-profile-037/#comments</comments>
		<pubDate>Fri, 02 Mar 2007 20:33:43 +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/2007/03/02/released-xhtml-mobile-profile-037/</guid>
		<description><![CDATA[This release adds the string [XHTML-MP] to the title of a document that is being handled using the XHTML Mobile Profile addon.  Go to Mozilla Update to install.

]]></description>
			<content:encoded><![CDATA[<p>This release adds the string [XHTML-MP] to the title of a document that is being handled using the XHTML Mobile Profile addon.  Go to <a href="https://addons.mozilla.org/firefox/1345/" title="Install XHTML MP">Mozilla Update</a> to install.</p>
<p><!--adsensestart--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.garethhunt.com/2007/03/02/released-xhtml-mobile-profile-037/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Finding a Theme</title>
		<link>http://www.garethhunt.com/2007/02/04/finding-a-theme/</link>
		<comments>http://www.garethhunt.com/2007/02/04/finding-a-theme/#comments</comments>
		<pubDate>Sun, 04 Feb 2007 01:47:40 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://www.garethhunt.com/index.php/2007/02/04/finding-a-theme/</guid>
		<description><![CDATA[Today the Firefox addon, Web Developers Toolbar, was updated.  After restarting, none of the icons were displayed on the toolbar.  The problem was the theme used: Phoenity.  Turns out that Phoenity is no longer supported by its author.  So looking for a new theme I found Blue Ice. Its simple, understated [...]]]></description>
			<content:encoded><![CDATA[<p>Today the Firefox addon, <a href="https://addons.mozilla.org/firefox/60/" title="Web Developers Toolbar">Web Developers Toolbar</a>, was updated.  After restarting, none of the icons were displayed on the toolbar.  The problem was the theme used: <a href="http://phoenity.com/" title="Phoenity Theme">Phoenity</a>.  Turns out that Phoenity is <a href="http://cheeaun.phoenity.com/weblog/2006/01/fate-of-phoenity.html">no longer supported</a> by its author.  So looking for a new theme I found <a href="https://addons.mozilla.org/firefox/3085/">Blue Ice</a>. Its simple, understated and supports the web developer toolbar icons.</p>
<p>This made me look at the theme for this blog.  It had been using the <em>Neat</em> (link no longer available) theme, but I've decided its too dull.  So until I can find (or design) a better one, the default theme is going to have to do.</p>
<p><!--adsensestart--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.garethhunt.com/2007/02/04/finding-a-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
