<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -10,6 +10,11 @@ Check the github repository for updates:
 http://github.com/hagabaka/chatzilla-plugins/tree/master
 git://github.com/hagabaka/chatzilla-plugins.git
 
+PREFERENCES
+
+- showIcons: if &quot;true&quot; (default), icons are shown before labels in the tree to
+  indicate the type of view (network, channel, user etc).
+
 TODO
 
 - Add menu entry to hide/show the tree, or adjust its location</diff>
      <filename>channel-tree/README</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,16 @@ plugin.init = function(glob) {
   plugin.tags = [];
   plugin.nodes = [];
 
+  plugin.prefary = plugin.prefary.concat([
+    [&quot;showIcons&quot;, &quot;true&quot;]
+  ]);
+
+  plugin.onPrefChanged = function(name, oldValue, newValue) {
+    if(name == &quot;showIcons&quot;) {
+      plugin.applyShowIconPreference();
+    }
+  }
+
   return &quot;OK&quot;;
 }
 
@@ -33,6 +43,7 @@ plugin.enable = function() {
   tree.setAttribute(&quot;seltype&quot;, &quot;single&quot;);
   tree.setAttribute(&quot;width&quot;, &quot;166&quot;);
   plugin.tree = tree;
+  plugin.applyShowIconPreference();
 
   var treeCols = document.createElement(&quot;treecols&quot;);
   var treeCol = document.createElement(&quot;treecol&quot;);
@@ -327,3 +338,11 @@ plugin.getIdForObject = function(o) {
 plugin.getLabelForObject = function(o) {
   return getTabForObject(o, true).getAttribute(&quot;label&quot;);
 }
+
+plugin.applyShowIconPreference = function() {
+  if(plugin.prefs[&quot;showIcons&quot;] == &quot;true&quot;) {
+    plugin.tree.setAttribute(&quot;class&quot;, &quot;showIcons&quot;);
+  } else {
+    plugin.tree.setAttribute(&quot;class&quot;, &quot;noIcons&quot;);
+  }
+}</diff>
      <filename>channel-tree/init.js</filename>
    </modified>
    <modified>
      <diff>@@ -19,23 +19,23 @@ tree#channel-tree &gt; treechildren:-moz-tree-cell-text(attention) {
     color: red;
 }
 
-tree#channel-tree &gt; treechildren::-moz-tree-image(IRCChannel) {
+tree#channel-tree.showIcons &gt; treechildren::-moz-tree-image(IRCChannel) {
     list-style-image: url(&quot;channel.png&quot;);
 }
 
-tree#channel-tree &gt; treechildren::-moz-tree-image(IRCNetwork) {
+tree#channel-tree.showIcons &gt; treechildren::-moz-tree-image(IRCNetwork) {
     list-style-image: url(&quot;network.png&quot;);
 }
 
-tree#channel-tree &gt; treechildren::-moz-tree-image(IRCUser) {
+tree#channel-tree.showIcons &gt; treechildren::-moz-tree-image(IRCUser) {
     list-style-image: url(&quot;user.png&quot;);
 }
 
-tree#channel-tree &gt; treechildren::-moz-tree-image(IRCClient) {
+tree#channel-tree.showIcons &gt; treechildren::-moz-tree-image(IRCClient) {
     list-style-image: url(&quot;client.png&quot;);
 }
 
-tree#channel-tree &gt; treechildren::-moz-tree-image(IRCDCCChat) {
+tree#channel-tree.showIcons &gt; treechildren::-moz-tree-image(IRCDCCChat) {
     list-style-image: url(&quot;dcc-chat.png&quot;);
 }
 </diff>
      <filename>channel-tree/style.css</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>9702bf95d7aaf47f407bcacf507cb83e4457889a</id>
    </parent>
  </parents>
  <author>
    <name>Yaohan Chen</name>
    <email>yaohan.chen@gmail.com</email>
  </author>
  <url>http://github.com/hagabaka/chatzilla-plugins/commit/bb18e071eae5fc810eed95d75635255c662994d8</url>
  <id>bb18e071eae5fc810eed95d75635255c662994d8</id>
  <committed-date>2008-07-16T14:52:35-07:00</committed-date>
  <authored-date>2008-07-16T14:52:35-07:00</authored-date>
  <message>add preference to show/hide icons</message>
  <tree>1c59704d65dc9f1c7ade5942c9deba4347123c62</tree>
  <committer>
    <name>Yaohan Chen</name>
    <email>yaohan.chen@gmail.com</email>
  </committer>
</commit>
