bug 65995 - edit->properties should be context sensitive. r=hwaara, sr=sspitzer a=dbaron

This commit is contained in:
andreww%netscape.com 2002-03-04 01:22:18 +00:00
Родитель a3800e99d4
Коммит ab70c0401d
3 изменённых файлов: 35 добавлений и 4 удалений

Просмотреть файл

@ -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 &amp; Newsgroups Account Settings...">
<!ENTITY accountManagerCmd.accesskey "M">