# HG changeset patch # User Myk Melez # Date 1224114035 25200 # Node ID 8ef75b54e3dd96ef7c97099b1e4185f3a5fa5cc7 # Parent 3e8c77f08177e43b9ff1f0fad41f6cc7611c9c30 make list view compatible with Sidebar Tabs extension (and perhaps other extensions that manipulate the sidebar) by hiding the snowlSidebar wrapper around sidebar-box using the hidden attribute instead of the width/height attributes diff -r 3e8c77f08177 -r 8ef75b54e3dd content/list.js --- a/content/list.js Wed Oct 15 11:26:04 2008 -0700 +++ b/content/list.js Wed Oct 15 16:40:35 2008 -0700 @@ -178,8 +178,8 @@ // Listen for sidebar-box hidden attr change, to toggle properly sidebarBox.addEventListener("DOMAttrModified", function(aEvent) { - if (aEvent.target.id == "sidebar-box") - SnowlMessageView._toggleSidebar(aEvent); + if (aEvent.target.id == "sidebar-box" && aEvent.attrName == "hidden") + SnowlMessageView._snowlSidebar.hidden = (aEvent.newValue == "true"); }, false); // Restore previous layout view and set menuitem checked @@ -487,31 +487,6 @@ this._tree.boxObject.invalidate(); }, - // Functions to handle proper display of sidebar since a parent node has - // been added to sidebar to make the extra layouts (widemessage) possible. - show_snowlSidebar: function() { - let snowlSidebar = this._snowlSidebar; - snowlSidebar.height = snowlSidebar.getAttribute("heightSnowlLayouts"); - snowlSidebar.width = snowlSidebar.getAttribute("widthSnowlLayouts"); - }, - - hide_snowlSidebar: function() { - let snowlSidebar = this._snowlSidebar; - snowlSidebar.setAttribute("heightSnowlLayouts", snowlSidebar.height); - snowlSidebar.height = 0; - snowlSidebar.setAttribute("widthSnowlLayouts", snowlSidebar.width); - snowlSidebar.width = 0; - }, - - _toggleSidebar: function(aEvent) { - if (aEvent.attrName == "hidden") { - if (aEvent.newValue == "true") - this.hide_snowlSidebar(); - else - this.show_snowlSidebar(); - } - }, - onClickColumnHeader: function(aEvent) { let column = aEvent.target; let property = this._columnProperties[column.id]; diff -r 3e8c77f08177 -r 8ef75b54e3dd content/list.xul --- a/content/list.xul Wed Oct 15 11:26:04 2008 -0700 +++ b/content/list.xul Wed Oct 15 16:40:35 2008 -0700 @@ -53,7 +53,7 @@ + persist="width height hidden"/>