Bug 495242 cmd_close shouldn't be passed through the controllers for menu options. r=philringnalda
This commit is contained in:
Родитель
7b75f3139f
Коммит
e23a7d2077
|
@ -140,7 +140,6 @@ var DefaultController =
|
|||
switch ( command )
|
||||
{
|
||||
case "cmd_createFilterFromPopup":
|
||||
case "cmd_close":
|
||||
case "cmd_archive":
|
||||
case "button_archive":
|
||||
case "cmd_reply":
|
||||
|
@ -224,7 +223,6 @@ var DefaultController =
|
|||
case "cmd_compactFolder":
|
||||
case "button_compact":
|
||||
case "cmd_settingsOffline":
|
||||
case "cmd_close":
|
||||
case "cmd_selectAll":
|
||||
case "cmd_selectThread":
|
||||
case "cmd_moveToFolderAgain":
|
||||
|
@ -475,8 +473,6 @@ var DefaultController =
|
|||
}
|
||||
case "cmd_setFolderCharset":
|
||||
return IsFolderCharsetEnabled();
|
||||
case "cmd_close":
|
||||
return true;
|
||||
case "cmd_downloadFlagged":
|
||||
return(IsFolderSelected() && MailOfflineMgr.isOnline());
|
||||
case "cmd_downloadSelected":
|
||||
|
@ -510,18 +506,6 @@ var DefaultController =
|
|||
|
||||
switch ( command )
|
||||
{
|
||||
case "cmd_close":
|
||||
let tabmail = document.getElementById('tabmail');
|
||||
if (tabmail.tabInfo.length == 1)
|
||||
{
|
||||
if (pref.getBoolPref("mail.tabs.closeWindowWithLastTab"))
|
||||
window.close();
|
||||
}
|
||||
else
|
||||
{
|
||||
tabmail.removeCurrentTab();
|
||||
}
|
||||
break;
|
||||
case "button_getNewMessages":
|
||||
case "cmd_getNewMessages":
|
||||
MsgGetMessage();
|
||||
|
@ -807,6 +791,18 @@ var DefaultController =
|
|||
}
|
||||
};
|
||||
|
||||
function CloseTabOrWindow()
|
||||
{
|
||||
let tabmail = document.getElementById('tabmail');
|
||||
if (tabmail.tabInfo.length == 1) {
|
||||
if (pref.getBoolPref("mail.tabs.closeWindowWithLastTab"))
|
||||
window.close();
|
||||
}
|
||||
else {
|
||||
tabmail.removeCurrentTab();
|
||||
}
|
||||
}
|
||||
|
||||
function GetNumSelectedMessages()
|
||||
{
|
||||
return gDBView ? gDBView.numSelected : 0;
|
||||
|
|
|
@ -97,7 +97,6 @@
|
|||
oncommandupdate="goUpdateMailMenuItems(this)">
|
||||
|
||||
<command id="cmd_getNewMessages" oncommand="goDoCommand('cmd_getNewMessages')" disabled="true"/>
|
||||
<command id="cmd_close" oncommand="goDoCommand('cmd_close')"/>
|
||||
<command id="cmd_open" oncommand="goDoCommand('cmd_open')"/>
|
||||
|
||||
<command id="cmd_file" disabled="true"/>
|
||||
|
|
|
@ -797,7 +797,6 @@ var MessageWindowController =
|
|||
case "cmd_print":
|
||||
case "cmd_printpreview":
|
||||
case "cmd_printSetup":
|
||||
case "cmd_close":
|
||||
case "cmd_settingsOffline":
|
||||
case "cmd_createFilterFromPopup":
|
||||
case "cmd_createFilterFromMenu":
|
||||
|
@ -889,7 +888,6 @@ var MessageWindowController =
|
|||
return MailOfflineMgr.isOnline();
|
||||
case "cmd_settingsOffline":
|
||||
return IsAccountOfflineEnabled();
|
||||
case "cmd_close":
|
||||
case "cmd_nextMsg":
|
||||
case "button_next":
|
||||
case "cmd_nextUnreadMsg":
|
||||
|
@ -946,9 +944,6 @@ var MessageWindowController =
|
|||
|
||||
switch ( command )
|
||||
{
|
||||
case "cmd_close":
|
||||
window.close();
|
||||
break;
|
||||
case "cmd_getNewMessages":
|
||||
MsgGetMessage();
|
||||
break;
|
||||
|
|
|
@ -103,11 +103,12 @@
|
|||
<commandset id="mailMarkMenuItems"/>
|
||||
<commandset id="mailToolsMenuItems"/>
|
||||
<commandset id="mailEditContextMenuItems"/>
|
||||
<commandset id="tasksCommands"/>
|
||||
<commandset id="tasksCommands"/>
|
||||
<commandset id="commandKeys"/>
|
||||
#ifdef XP_MACOSX
|
||||
<commandset id="macWindowMenuItems"/>
|
||||
<commandset id="macWindowMenuItems"/>
|
||||
#endif
|
||||
<command id="cmd_close" oncommand="window.close();"/>
|
||||
</commandset>
|
||||
|
||||
<keyset id="mailKeys">
|
||||
|
|
|
@ -123,6 +123,7 @@
|
|||
#ifdef XP_MACOSX
|
||||
<commandset id="macWindowMenuItems"/>
|
||||
#endif
|
||||
<command id="cmd_close" oncommand="CloseTabOrWindow();"/>
|
||||
</commandset>
|
||||
|
||||
<keyset id="mailKeys">
|
||||
|
|
Загрузка…
Ссылка в новой задаче