mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 17:23:59 +00:00
Persist the contact side bar state in the compose window across sessions.
This commit is contained in:
parent
7eb3ac3127
commit
c9d45384a9
@ -1320,6 +1320,15 @@ function ComposeStartup(recycled, aParams)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// finally, see if we need to auto open the address sidebar.
|
||||
var sideBarBox = document.getElementById('sidebar-box');
|
||||
if (sideBarBox.getAttribute("sidebarVisible") == "true")
|
||||
{
|
||||
// if we aren't supposed to have the side bar hidden, make sure it is visible
|
||||
if (document.getElementById("sidebar").getAttribute("src") == "")
|
||||
setTimeout(toggleAddressPicker, 0); // do this on a delay so we don't hurt perf. on bringing up a new compose window
|
||||
}
|
||||
}
|
||||
|
||||
// The new, nice, simple way of getting notified when a new editor has been created
|
||||
@ -2890,12 +2899,15 @@ function toggleAddressPicker()
|
||||
if (sidebarUrl == "")
|
||||
sidebar.setAttribute("src", "chrome://messenger/content/addressbook/abContactsPanel.xul");
|
||||
menuItem.setAttribute("checked","true");
|
||||
|
||||
sidebarBox.setAttribute("sidebarVisible", "true");
|
||||
}
|
||||
else
|
||||
{
|
||||
sidebarBox.hidden = true;
|
||||
sidebarSplitter.hidden = true;
|
||||
menuItem.setAttribute("checked","false");
|
||||
sidebarBox.setAttribute("sidebarVisible", "false");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -487,7 +487,7 @@
|
||||
</toolbox>
|
||||
|
||||
<hbox flex="1">
|
||||
<vbox id="sidebar-box" hidden="true">
|
||||
<vbox id="sidebar-box" persist="sidebarVisible" hidden="true">
|
||||
<sidebarheader align="center">
|
||||
<label id="sidebar-title" value="&addressesSidebarTitle.label;"/>
|
||||
<spacer flex="1"/>
|
||||
|
Loading…
Reference in New Issue
Block a user