зеркало из https://github.com/mozilla/pjs.git
bug 65995 - edit->properties should be context sensitive. r=hwaara, sr=sspitzer a=dbaron
This commit is contained in:
Родитель
a3800e99d4
Коммит
ab70c0401d
|
@ -91,7 +91,6 @@ var FolderPaneController =
|
|||
}
|
||||
else
|
||||
return false;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
@ -424,7 +423,7 @@ var DefaultController =
|
|||
case "cmd_sendUnsentMsgs":
|
||||
return IsSendUnsentMsgsEnabled(null);
|
||||
case "cmd_properties":
|
||||
return IsPropertiesEnabled();
|
||||
return IsPropertiesEnabled(command);
|
||||
case "button_getNewMessages":
|
||||
case "cmd_getNewMessages":
|
||||
case "cmd_getMsgsForAuthAccounts":
|
||||
|
@ -875,9 +874,36 @@ function IsFolderCharsetEnabled()
|
|||
return IsFolderSelected();
|
||||
}
|
||||
|
||||
function IsPropertiesEnabled()
|
||||
function IsPropertiesEnabled(command)
|
||||
{
|
||||
try
|
||||
{
|
||||
var serverType;
|
||||
var folderOutliner = GetFolderOutliner();
|
||||
var folderResource = GetSelectedFolderResource();
|
||||
|
||||
serverType = GetFolderAttribute(folderOutliner, folderResource, "ServerType");
|
||||
|
||||
switch (serverType)
|
||||
{
|
||||
case "none":
|
||||
case "imap":
|
||||
case "pop3":
|
||||
goSetMenuValue(command, 'valueFolder');
|
||||
break;
|
||||
case "nntp":
|
||||
goSetMenuValue(command, 'valueNewsgroup');
|
||||
break
|
||||
default:
|
||||
goSetMenuValue(command, 'valueGeneric');
|
||||
}
|
||||
}
|
||||
catch (ex)
|
||||
{
|
||||
//properties menu failure
|
||||
}
|
||||
return IsFolderSelected();
|
||||
|
||||
}
|
||||
|
||||
function IsViewNavigationItemEnabled()
|
||||
|
|
|
@ -159,7 +159,10 @@ Rights Reserved.
|
|||
<command id="cmd_selectAll"/>
|
||||
<command id="cmd_selectThread" oncommand="goDoCommand('cmd_selectThread')"/>
|
||||
<command id="cmd_selectFlagged" oncommand="goDoCommand('cmd_selectFlagged')"/>
|
||||
<command id="cmd_properties" oncommand="goDoCommand('cmd_properties')"/>
|
||||
<command id="cmd_properties" oncommand="goDoCommand('cmd_properties')"
|
||||
valueNewsgroup="&folderPropsNewsgroupCmd.label;"
|
||||
valueFolder="&folderPropsFolderCmd.label;"
|
||||
valueGeneric="&folderPropsCmd.label;"/>
|
||||
</commandset>
|
||||
|
||||
<commandset id="mailEditContextMenuItems">
|
||||
|
|
|
@ -104,6 +104,8 @@ Rights Reserved.
|
|||
<!ENTITY filtersCmd.label "Message Filters...">
|
||||
<!ENTITY filtersCmd.accesskey "i">
|
||||
<!ENTITY folderPropsCmd.label "Properties...">
|
||||
<!ENTITY folderPropsFolderCmd.label "Folder Properties...">
|
||||
<!ENTITY folderPropsNewsgroupCmd.label "Newsgroup Properties...">
|
||||
<!ENTITY folderPropsCmd.accesskey "o">
|
||||
<!ENTITY accountManagerCmd.label "Mail & Newsgroups Account Settings...">
|
||||
<!ENTITY accountManagerCmd.accesskey "M">
|
||||
|
|
Загрузка…
Ссылка в новой задаче