Bug 511989 - Port Bug 461252 - First filter in Message Filters should be selected. r=Mnyromyr, sr=Neil, a2.0=KaiRo.
This commit is contained in:
Родитель
ae8edb0025
Коммит
afc3afa80a
|
@ -183,7 +183,7 @@ function onLoad()
|
||||||
gStatusBar = document.getElementById("statusbar-icon");
|
gStatusBar = document.getElementById("statusbar-icon");
|
||||||
gStatusText = document.getElementById("statusText");
|
gStatusText = document.getElementById("statusText");
|
||||||
|
|
||||||
updateButtons();
|
gFilterTree.view = gFilterTreeView;
|
||||||
|
|
||||||
// get the selected server if it can have filters.
|
// get the selected server if it can have filters.
|
||||||
var firstItem = getSelectedServerForFilters();
|
var firstItem = getSelectedServerForFilters();
|
||||||
|
@ -194,11 +194,13 @@ function onLoad()
|
||||||
if (!firstItem)
|
if (!firstItem)
|
||||||
firstItem = getServerThatCanHaveFilters();
|
firstItem = getServerThatCanHaveFilters();
|
||||||
|
|
||||||
if (firstItem) {
|
if (firstItem)
|
||||||
selectServer(firstItem);
|
selectServer(firstItem);
|
||||||
}
|
else
|
||||||
|
updateButtons();
|
||||||
|
|
||||||
gFilterTree.view = gFilterTreeView;
|
// Focus the list.
|
||||||
|
gFilterTree.focus();
|
||||||
|
|
||||||
window.tryToClose = onFilterClose;
|
window.tryToClose = onFilterClose;
|
||||||
}
|
}
|
||||||
|
@ -273,6 +275,10 @@ function setServer(uri)
|
||||||
//Calling getFilterList will detect any errors in rules.dat, backup the file, and alert the user
|
//Calling getFilterList will detect any errors in rules.dat, backup the file, and alert the user
|
||||||
gFilterTreeView.filterList = msgFolder.getEditableFilterList(gFilterListMsgWindow);
|
gFilterTreeView.filterList = msgFolder.getEditableFilterList(gFilterListMsgWindow);
|
||||||
|
|
||||||
|
// Select the first item in the list, if there is one.
|
||||||
|
if (gFilterTreeView.rowCount)
|
||||||
|
gFilterTreeView.selection.select(0);
|
||||||
|
|
||||||
// this will get the deferred to account root folder, if server is deferred
|
// this will get the deferred to account root folder, if server is deferred
|
||||||
msgFolder = msgFolder.server.rootMsgFolder;
|
msgFolder = msgFolder.server.rootMsgFolder;
|
||||||
var rootFolderUri = msgFolder.URI;
|
var rootFolderUri = msgFolder.URI;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче