зеркало из https://github.com/mozilla/pjs.git
fix ctrl-m's
This commit is contained in:
Родитель
00de447920
Коммит
4a8545266c
|
@ -58,37 +58,37 @@ function onUnload(aEvent)
|
|||
|
||||
notifyParentComplete();
|
||||
}
|
||||
|
||||
function onCancel()
|
||||
{
|
||||
// restore the saved toolbarset for each customizeable toolbar
|
||||
|
||||
// Restore the defaultset for fixed toolbars.
|
||||
var toolbar = gToolbox.firstChild;
|
||||
while (toolbar) {
|
||||
if (isCustomizableToolbar(toolbar)) {
|
||||
if (!toolbar.hasAttribute("customindex")) {
|
||||
var previousset = toolbar.getAttribute("previousset");
|
||||
if (previousset)
|
||||
{
|
||||
toolbar.currentSet = previousset;
|
||||
}
|
||||
}
|
||||
}
|
||||
toolbar = toolbar.nextSibling;
|
||||
}
|
||||
|
||||
// Now rebuild the palette.
|
||||
buildPalette();
|
||||
|
||||
// Now re-wrap the items on the toolbar.
|
||||
wrapToolbarItems();
|
||||
|
||||
repositionDialog();
|
||||
gToolboxChanged = true;
|
||||
|
||||
return onAccept(); // we restored the default toolbar, act like a normal accept event now
|
||||
}
|
||||
|
||||
function onCancel()
|
||||
{
|
||||
// restore the saved toolbarset for each customizeable toolbar
|
||||
|
||||
// Restore the defaultset for fixed toolbars.
|
||||
var toolbar = gToolbox.firstChild;
|
||||
while (toolbar) {
|
||||
if (isCustomizableToolbar(toolbar)) {
|
||||
if (!toolbar.hasAttribute("customindex")) {
|
||||
var previousset = toolbar.getAttribute("previousset");
|
||||
if (previousset)
|
||||
{
|
||||
toolbar.currentSet = previousset;
|
||||
}
|
||||
}
|
||||
}
|
||||
toolbar = toolbar.nextSibling;
|
||||
}
|
||||
|
||||
// Now rebuild the palette.
|
||||
buildPalette();
|
||||
|
||||
// Now re-wrap the items on the toolbar.
|
||||
wrapToolbarItems();
|
||||
|
||||
repositionDialog();
|
||||
gToolboxChanged = true;
|
||||
|
||||
return onAccept(); // we restored the default toolbar, act like a normal accept event now
|
||||
}
|
||||
|
||||
function onAccept(aEvent)
|
||||
{
|
||||
|
@ -220,9 +220,9 @@ function wrapToolbarItems()
|
|||
{
|
||||
for (var i = 0; i < gToolbox.childNodes.length; ++i) {
|
||||
var toolbar = getToolbarAt(i);
|
||||
if (isCustomizableToolbar(toolbar)) {
|
||||
// save off the current set for each toolbar in case the user hits cancel
|
||||
toolbar.setAttribute('previousset', toolbar.currentSet);
|
||||
if (isCustomizableToolbar(toolbar)) {
|
||||
// save off the current set for each toolbar in case the user hits cancel
|
||||
toolbar.setAttribute('previousset', toolbar.currentSet);
|
||||
|
||||
for (var k = 0; k < toolbar.childNodes.length; ++k) {
|
||||
var item = toolbar.childNodes[k];
|
||||
|
@ -247,7 +247,7 @@ function wrapToolbarItems()
|
|||
{
|
||||
for (var i = 0; i < gToolbox.childNodes.length; ++i) {
|
||||
var toolbar = getToolbarAt(i);
|
||||
if (isCustomizableToolbar(toolbar)) {
|
||||
if (isCustomizableToolbar(toolbar)) {
|
||||
toolbar.removeAttribute('previousset'); // remove previous set attribute
|
||||
for (var k = 0; k < toolbar.childNodes.length; ++k) {
|
||||
var paletteItem = toolbar.childNodes[k];
|
||||
|
|
|
@ -34,18 +34,18 @@
|
|||
<?xml-stylesheet href="chrome://messenger/skin/messengercompose/messengercompose.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://messenger/skin/smime/msgCompSMIMEOverlay.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://messenger/skin/primaryToolbar.css" type="text/css"?>
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
<dialog id="CustomizeToolbarWindow"
|
||||
#else
|
||||
<window id="CustomizeToolbarWindow" onclose="onAccept(); return false;"
|
||||
#endif
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
<dialog id="CustomizeToolbarWindow"
|
||||
#else
|
||||
<window id="CustomizeToolbarWindow" onclose="onAccept(); return false;"
|
||||
#endif
|
||||
|
||||
title="&dialog.title;"
|
||||
onload="onLoad();"
|
||||
onunload="onUnload();"
|
||||
buttons="accept,cancel"
|
||||
ondialogaccept="return onAccept();"
|
||||
onunload="onUnload();"
|
||||
buttons="accept,cancel"
|
||||
ondialogaccept="return onAccept();"
|
||||
ondialogcancel="return onCancel();"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
|
@ -80,16 +80,16 @@
|
|||
<button label="&restoreDefaultSet.label;" oncommand="restoreDefaultSet();"/>
|
||||
</box>
|
||||
|
||||
<separator class="groove"/>
|
||||
#ifdef XP_MACOSX
|
||||
<hbox align="center" pack="end">
|
||||
<button label="&saveChanges.label;" oncommand="onAccept();" default="true"/>
|
||||
</hbox>
|
||||
<separator class="groove"/>
|
||||
#ifdef XP_MACOSX
|
||||
<hbox align="center" pack="end">
|
||||
<button label="&saveChanges.label;" oncommand="onAccept();" default="true"/>
|
||||
</hbox>
|
||||
#endif
|
||||
</vbox>
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
</dialog>
|
||||
#else
|
||||
</window>
|
||||
#ifndef XP_MACOSX
|
||||
</dialog>
|
||||
#else
|
||||
</window>
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче