Bug 295542 Add New -> Saved Search in mail window file menu

p=me r=mnyromyr sr=bienvenu a=asa
This commit is contained in:
bugzilla%arlen.demon.co.uk 2005-06-07 23:26:57 +00:00
Родитель 68b6a40e20
Коммит 88b23a4843
16 изменённых файлов: 24 добавлений и 53 удалений

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

@ -63,8 +63,6 @@ messenger.jar:
content/messenger/msgFolderPickerOverlay.xul (/mailnews/base/resources/content/msgFolderPickerOverlay.xul)
content/messenger/renameFolderDialog.xul (/mailnews/base/resources/content/renameFolderDialog.xul)
content/messenger/renameFolderDialog.js (/mailnews/base/resources/content/renameFolderDialog.js)
content/messenger/virtualFolderName.xul (/mailnews/base/resources/content/virtualFolderName.xul)
content/messenger/virtualFolderName.js (/mailnews/base/resources/content/virtualFolderName.js)
content/messenger/virtualFolderProperties.xul (/mailnews/base/resources/content/virtualFolderProperties.xul)
content/messenger/virtualFolderProperties.js (/mailnews/base/resources/content/virtualFolderProperties.js)
content/messenger/virtualFolderListDialog.xul (/mailnews/base/resources/content/virtualFolderListDialog.xul)

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

@ -38,7 +38,4 @@
<!ENTITY renameFolderDialog.title "Rename Folder">
<!ENTITY rename.label "Enter the new name for your folder:">
<!ENTITY rename.accesskey "e">
<!ENTITY createVFDialog.title "Create Virtual Folder">
<!ENTITY virtualFolder.label "Enter the name for your virtual folder:">
<!ENTITY virtualFolder.accesskey "E">
<!ENTITY rename.accesskey "E">

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

@ -39,7 +39,6 @@
locale/@AB_CD@/messenger/folderpane.dtd (%chrome/messenger/folderpane.dtd)
locale/@AB_CD@/messenger/newFolderDialog.dtd (%chrome/messenger/newFolderDialog.dtd)
locale/@AB_CD@/messenger/renameFolderDialog.dtd (%chrome/messenger/renameFolderDialog.dtd)
locale/@AB_CD@/messenger/virtualFolderName.dtd (%chrome/messenger/virtualFolderName.dtd)
locale/@AB_CD@/messenger/folderProps.dtd (%chrome/messenger/folderProps.dtd)
locale/@AB_CD@/messenger/subscribe.dtd (%chrome/messenger/subscribe.dtd)
locale/@AB_CD@/messenger/subscribe.properties (%chrome/messenger/subscribe.properties)

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

@ -1035,21 +1035,6 @@ function RemoveMailOfflineObserver()
observerService.removeObserver(mailOfflineObserver,"network:offline-status-changed");
}
function getViewName(okCallbackFunc, defaultViewName)
{
var preselectedURI = GetSelectedFolderURI();
var folderTree = GetFolderTree();
var name = GetFolderNameFromUri(preselectedURI, folderTree);
name += defaultViewName + "-view";
var dialog = window.openDialog(
"chrome://messenger/content/virtualFolderName.xul",
"newFolder",
"chrome,titlebar,modal",
{siblingFolderURI: preselectedURI, searchFolderURIs: preselectedURI,
okCallback: okCallbackFunc, name: name});
}
function getSearchTermString(searchTerms)
{
var searchIndex;

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

@ -110,16 +110,11 @@ function menu_new_init()
.getService(Components.interfaces.nsIIOService);
var showNew = ((serverType != 'nntp') && canCreateNew) || isInbox;
ShowMenuItem("menu_newFolder", showNew);
ShowMenuItem("menu_newVirtualFolder", showNew);
EnableMenuItem("menu_newFolder", !isIMAPFolder || !ioService.offline);
EnableMenuItem("menu_newVirtualFolder", true);
if (showNew)
{
if (isServer || isInbox)
SetMenuItemLabel("menu_NewFolder",
gMessengerBundle.getString("newFolder"));
else
SetMenuItemLabel("menu_NewFolder",
gMessengerBundle.getString("newSubfolder"));
}
SetMenuItemLabel("menu_newFolder", gMessengerBundle.getString((isServer || isInbox) ? "newFolderMenuItem" : "newSubfolderMenuItem"));
}
function goUpdateMailMenuItems(commandset)

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

@ -1041,6 +1041,9 @@
<menuitem id="menu_newFolder" label="&newFolderCmd.label;"
oncommand="MsgNewFolder(NewFolder);"
accesskey="&newFolderCmd.accesskey;"/>
<menuitem id="menu_newVirtualFolder" label="&newVirtualFolderCmd.label;"
oncommand="MsgVirtualFolderProperties(false);"
accesskey="&newVirtualFolderCmd.accesskey;"/>
<menuitem id="newAccountMenuItem" label="&newAccountCmd.label;"
accesskey="&newAccountCmd.accesskey;"
oncommand="MsgAccountWizard();"/>

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

@ -259,16 +259,13 @@ var folderListener = {
else if (gVirtualFolderTerms)
{
gDefaultSearchViewTerms = null;
ViewChangeByValue(-1); // override current view
viewDebug("searching gVirtualFolderTerms\n");
Search("");
// gVirtualFolderTerms = null;
loadVirtualFolder();
}
else if (gMsgFolderSelected.flags & MSG_FOLDER_FLAG_VIRTUAL)
{
viewDebug("selected folder is virtual\n");
gDefaultSearchViewTerms = null;
ViewChangeByValue(-1); // override current view
}
else
{

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

@ -540,15 +540,18 @@ function Search(str)
function saveViewAsVirtualFolder()
{
// prompt for view name - create virtual folder in ok callback.
getViewName(CreateView, gSearchInput.value);
openNewVirtualFolderDialogWithArgs(gSearchInput.value, gSearchSession.searchTerms);
}
function CreateView(newName, origFolderURI)
// When the front end has finished loading a virtual folder, it calls openVirtualFolder
// to actually perform the folder search. We use this method instead of calling Search("") directly
// from FolderLoaded in order to avoid moving focus into the search bar.
function loadVirtualFolder()
{
var selectedFolder = GetResourceFromUri(origFolderURI);
var folderToSearch = selectedFolder.QueryInterface(Components.interfaces.nsIMsgFolder);
CreateVirtualFolder(newName, folderToSearch.parent, origFolderURI, gSearchSession.searchTerms);
// bit of a hack...if the underlying real folder is loaded with the same view value
// as the value for the virtual folder being searched, then ViewChangeByValue
// fails to change the view because it thinks the view is already correctly loaded.
// so set gCurrentViewValue back to All.
gCurrentViewValue = 0;
onEnterInSearchBar();
}

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

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

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

@ -46,6 +46,8 @@
<!ENTITY newMessage.accesskey "N">
<!ENTITY newFolderCmd.label "Folder...">
<!ENTITY newFolderCmd.accesskey "F">
<!ENTITY newVirtualFolderCmd.label "Saved Search...">
<!ENTITY newVirtualFolderCmd.accesskey "S">
<!ENTITY newAccountCmd.label "Account...">
<!ENTITY newAccountCmd.accesskey "A">
<!ENTITY openMessageMenu.label "Open">
@ -566,7 +568,6 @@
<!ENTITY SearchNameOrEmail.accesskey "N">
<!ENTITY advancedButton.label "Advanced...">
<!ENTITY advancedButton.accesskey "A">
<!ENTITY saveAsVirtualFolderMenu.label "Save as Virtual Folder">
<!ENTITY clearButton.label "Clear">
<!ENTITY clearButton.accesskey "C">

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

@ -46,6 +46,8 @@ compactFolder=Compact This Folder
removeAccount=Delete Account...
removeNewsAccount=Delete News Account...
removeFolder=Delete Folder
newFolderMenuItem=Folder...
newSubfolderMenuItem=Subfolder...
newFolder=New Folder...
newSubfolder=New Subfolder...
folderProperties=Folder Properties

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

@ -1,6 +0,0 @@
<!ENTITY renameFolderDialog.title "Rename Folder">
<!ENTITY rename.label "Enter the new name for your folder:">
<!ENTITY rename.accesskey "E">
<!ENTITY createVFDialog.title "Create Virtual Folder">
<!ENTITY virtualFolder.label "Enter the name for your virtual folder:">
<!ENTITY virtualFolder.accesskey "E">

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

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

@ -7,7 +7,7 @@
<!ENTITY searchCriteriaButton.label "Search Criteria...">
<!ENTITY searchCriteriaButton.accesskey "S">
<!ENTITY searchTermCaption.label "Configure the search criteria used for this virtual folder: ">
<!ENTITY searchTermCaption.label "Configure the search criteria used for this saved search folder: ">
<!ENTITY folderSelectionCaption.label "Select the folders to search: ">
<!ENTITY chooseFoldersButton.label "Choose...">

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

@ -125,13 +125,11 @@ messenger.jar:
content/messenger/msgFolderPickerOverlay.xul (base/resources/content/msgFolderPickerOverlay.xul)
content/messenger/renameFolderDialog.xul (base/resources/content/renameFolderDialog.xul)
content/messenger/renameFolderDialog.js (base/resources/content/renameFolderDialog.js)
content/messenger/virtualFolderName.xul (base/resources/content/virtualFolderName.xul)
content/messenger/virtualFolderProperties.xul (base/resources/content/virtualFolderProperties.xul)
content/messenger/virtualFolderProperties.js (base/resources/content/virtualFolderProperties.js)
content/messenger/virtualFolderListDialog.xul (base/resources/content/virtualFolderListDialog.xul)
content/messenger/virtualFolderListDialog.js (base/resources/content/virtualFolderListDialog.js)
content/messenger/messengerdnd.js (base/resources/content/messengerdnd.js)
content/messenger/virtualFolderName.js (base/resources/content/virtualFolderName.js)
content/messenger/mailContextMenus.js (base/resources/content/mailContextMenus.js)
content/messenger/msgPrintEngine.js (base/resources/content/msgPrintEngine.js)
content/messenger/msgPrintEngine.xul (base/resources/content/msgPrintEngine.xul)
@ -208,7 +206,6 @@ en-US.jar:
locale/en-US/messenger/folderpane.dtd (base/resources/locale/en-US/folderpane.dtd)
locale/en-US/messenger/newFolderDialog.dtd (base/resources/locale/en-US/newFolderDialog.dtd)
locale/en-US/messenger/renameFolderDialog.dtd (base/resources/locale/en-US/renameFolderDialog.dtd)
locale/en-US/messenger/virtualFolderName.dtd (base/resources/locale/en-US/virtualFolderName.dtd)
locale/en-US/messenger/virtualFolderProperties.dtd (base/resources/locale/en-US/virtualFolderProperties.dtd)
locale/en-US/messenger/virtualFolderListDialog.dtd (base/resources/locale/en-US/virtualFolderListDialog.dtd)
locale/en-US/messenger/folderProps.dtd (base/resources/locale/en-US/folderProps.dtd)