105328 r/sr=sspitzer. Throw duplicate folder alert when trying to create new folder from filter

editor.
This commit is contained in:
naving%netscape.com 2001-10-19 05:24:18 +00:00
Родитель 27ed26c8a5
Коммит 11c51e31a4
1 изменённых файлов: 16 добавлений и 2 удалений

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

@ -52,7 +52,8 @@ var gFilterBundle;
var nsMsgSearchScope = Components.interfaces.nsMsgSearchScope;
var nsMsgFilterAction = Components.interfaces.nsMsgFilterAction;
var gFilterEditorMsgWindow=null;
function filterEditorOnLoad()
{
initializeSearchWidgets();
@ -295,7 +296,8 @@ function GetFirstSelectedMsgFolder()
function SearchNewFolderOkCallback(name,uri)
{
var msgFolder = GetMsgFolderFromUri(uri);
msgFolder.createSubfolder(name, null);
var msgWindow = GetFilterEditorMsgWindow();
msgFolder.createSubfolder(name, msgWindow);
var curFolder = uri+"/"+name;
SetFolderPicker(curFolder, gActionTargetElement.id);
@ -305,3 +307,15 @@ function UpdateAfterCustomHeaderChange()
{
updateSearchAttributes();
}
//if you use msgWindow, please make sure that destructor gets called when you close the "window"
function GetFilterEditorMsgWindow()
{
if (!gFilterEditorMsgWindow)
{
var msgWindowContractID = "@mozilla.org/messenger/msgwindow;1";
var nsIMsgWindow = Components.interfaces.nsIMsgWindow;
gFilterEditorMsgWindow = Components.classes[msgWindowContractID].createInstance(nsIMsgWindow);
gFilterEditorMsgWindow.SetDOMWindow(window);
}
return gFilterEditorMsgWindow;
}