diff --git a/mailnews/base/resources/content/folderCharsetDialog.js b/mailnews/base/resources/content/folderCharsetDialog.js
deleted file mode 100644
index 5eb30cde3034..000000000000
--- a/mailnews/base/resources/content/folderCharsetDialog.js
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- *
- * The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released
- * March 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape
- * Communications Corporation. Portions created by Netscape are
- * Copyright (C) 1998-1999 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- */
-
-var dialog;
-
-function onLoad()
-{
- var arguments = window.arguments[0];
-
- dialog = {
- OKButton: document.getElementById("ok"),
- okCallback: arguments.okCallback
- };
-
- // set override checkbox
- document.getElementById("folderCharsetOverride").checked = arguments.folderCharsetOverride;
-// dump("folderCharsetOverride " + arguments.folderCharsetOverride + "\n");
-
- // get charset title (i.e. localized name), needed in order to set value for the menu
- var ccm = Components.classes['@mozilla.org/charset-converter-manager;1'];
- ccm = ccm.getService();
- ccm = ccm.QueryInterface(Components.interfaces.nsICharsetConverterManager2);
- // get a localized string
- var charsetTitle = ccm.GetCharsetTitle(ccm.GetCharsetAtom(arguments.folderCharset));
-
- // select the menu item
- var folderCharsetList = document.getElementById("folderCharsetList");
- folderCharsetList.setAttribute("value", charsetTitle);
- folderCharsetList.setAttribute("data", arguments.folderCharset);
-// dump("folderCharset " + arguments.folderCharset + "\n");
-
- // pre select the folderPicker, based on what they selected in the folder pane
- dialog.preselectedFolderURI = arguments.preselectedURI;
-
- doSetOKCancel(onOK, onCancel);
-}
-
-function onOK()
-{
- var folderCharsetList = document.getElementById("folderCharsetList");
- var characterSet = folderCharsetList.getAttribute("data");
-
- dialog.okCallback(document.getElementById("folderCharsetOverride").checked,
- characterSet, dialog.preselectedFolderURI);
-
- return true;
-}
-
-function onCancel()
-{
- // close the window
- return true;
-}
diff --git a/mailnews/base/resources/content/folderCharsetDialog.xul b/mailnews/base/resources/content/folderCharsetDialog.xul
deleted file mode 100644
index c37d3a18316d..000000000000
--- a/mailnews/base/resources/content/folderCharsetDialog.xul
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/mailnews/base/resources/content/folderProps.js b/mailnews/base/resources/content/folderProps.js
index 047f395dcf7c..04c4ed4947ec 100644
--- a/mailnews/base/resources/content/folderProps.js
+++ b/mailnews/base/resources/content/folderProps.js
@@ -13,6 +13,11 @@ function folderPropsOKButtonCallback()
gMsgFolder.setFlag(0x8000000);
else
gMsgFolder.clearFlag(0x8000000);
+
+ // set charset attributes
+ var folderCharsetList = document.getElementById("folderCharsetList");
+ gMsgFolder.charset = folderCharsetList.getAttribute("data");
+ gMsgFolder.charsetOverride = document.getElementById("folderCharsetOverride").checked;
}
window.close();
}
@@ -65,7 +70,36 @@ function folderPropsOnLoad()
if (!gMsgFolder)
dump("no gMsgFolder preselectfolder uri = "+preselectedFolderURI+'\n');
- if (gMsgFolder && (gMsgFolder.flags & 0x8000000))
- document.getElementById("selectForDownload").checked = true;
+ if (gMsgFolder) {
+ if (gMsgFolder.flags & 0x8000000) {
+ document.getElementById("selectForDownload").checked = true;
+ }
+ // get charset title (i.e. localized name), needed in order to set value for the menu
+ var ccm = Components.classes['@mozilla.org/charset-converter-manager;1'];
+ ccm = ccm.getService();
+ ccm = ccm.QueryInterface(Components.interfaces.nsICharsetConverterManager2);
+ // get a localized string
+ var charsetTitle = ccm.GetCharsetTitle(ccm.GetCharsetAtom(gMsgFolder.charset));
+
+ // select the menu item
+ var folderCharsetList = document.getElementById("folderCharsetList");
+ folderCharsetList.setAttribute("value", charsetTitle);
+ folderCharsetList.setAttribute("data", gMsgFolder.charset);
+
+ // set override checkbox
+ document.getElementById("folderCharsetOverride").checked = gMsgFolder.charsetOverride;
+ }
+
+ // select the initial tab
+ if (window.arguments[0].tabID) {
+ // set index for starting panel on the element
+ var folderPropTabPanel = document.getElementById("folderPropTabPanel");
+ folderPropTabPanel.setAttribute("index", window.arguments[0].tabIndex);
+
+ var tab = document.getElementById(window.arguments[0].tabID);
+ tab.setAttribute("selected", "true");
+ tab = document.getElementById("GeneralTab");
+ tab.setAttribute("selected", "false");
+ }
}
diff --git a/mailnews/base/resources/content/imapFolderProps.xul b/mailnews/base/resources/content/imapFolderProps.xul
index c50813507a87..a7aeab38b2ba 100644
--- a/mailnews/base/resources/content/imapFolderProps.xul
+++ b/mailnews/base/resources/content/imapFolderProps.xul
@@ -43,10 +43,11 @@
-
+
+
-
+
@@ -62,6 +63,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mailnews/base/resources/content/widgetglue.js b/mailnews/base/resources/content/widgetglue.js
index 881642caceaf..af3dffa271c3 100644
--- a/mailnews/base/resources/content/widgetglue.js
+++ b/mailnews/base/resources/content/widgetglue.js
@@ -243,9 +243,10 @@ function MsgFolderProperties()
var dialog = window.openDialog(
"chrome://messenger/content/imapFolderProps.xul",
"",
- "chrome,titlebar,modal",
- {preselectedURI:preselectedURI, title:windowTitle,
- okCallback:FolderProperties, name:name});
+ "chrome,centerscreen,titlebar,modal",
+ {preselectedURI:preselectedURI, title:windowTitle,
+ okCallback:FolderProperties,
+ tabID:"", tabIndex:0, name:name});
}
function FolderProperties(name, uri)
@@ -313,36 +314,14 @@ function LastToClose()
function MsgSetFolderCharset()
{
var preselectedURI = GetSelectedFolderURI();
- var selectedFolder = GetResourceFromUri(preselectedURI);
- var msgFolder = selectedFolder.QueryInterface(Components.interfaces.nsIMsgFolder);
-
-// dump("preselectedURI = " + preselectedURI + "\n");
- var dialog = window.openDialog(
- "chrome://messenger/content/folderCharsetDialog.xul",
- "",
- "chrome,centerscreen,titlebar,modal",
- {preselectedURI: preselectedURI,
- okCallback: SetFolderCharset,
- folderCharset: msgFolder.charset,
- folderCharsetOverride: msgFolder.charsetOverride});
-}
-
-function SetFolderCharset(override, charset, uri)
-{
-// dump("uri,charset,override = " + uri + "," + charset + "," + override + "\n");
var folderTree = GetFolderTree();
- if (folderTree) {
- if (uri && charset) {
- var selectedFolder = GetResourceFromUri(uri);
- var msgFolder = selectedFolder.QueryInterface(Components.interfaces.nsIMsgFolder);
- if (msgFolder) {
- msgFolder.charset = charset;
- msgFolder.charsetOverride = override;
- }
-
- ClearThreadPane();
- ClearMessagePane();
- folderTree.clearItemSelection();
- }
- }
+ var name = GetFolderNameFromUri(preselectedURI, folderTree);
+ var windowTitle = Bundle.GetStringFromName("folderProperties");
+ var dialog = window.openDialog(
+ "chrome://messenger/content/imapFolderProps.xul",
+ "",
+ "chrome,centerscreen,titlebar,modal",
+ {preselectedURI:preselectedURI, title:windowTitle,
+ okCallback:FolderProperties,
+ tabID:"folderCharsetTab", tabIndex:2, name:name});
}
diff --git a/mailnews/base/resources/locale/en-US/folderCharsetDialog.dtd b/mailnews/base/resources/locale/en-US/folderCharsetDialog.dtd
deleted file mode 100644
index 1d8011c99c68..000000000000
--- a/mailnews/base/resources/locale/en-US/folderCharsetDialog.dtd
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
diff --git a/mailnews/base/resources/locale/en-US/folderProps.dtd b/mailnews/base/resources/locale/en-US/folderProps.dtd
index 4312022850e0..a08d048687aa 100644
--- a/mailnews/base/resources/locale/en-US/folderProps.dtd
+++ b/mailnews/base/resources/locale/en-US/folderProps.dtd
@@ -26,6 +26,9 @@
+
+
+
diff --git a/mailnews/jar.mn b/mailnews/jar.mn
index b10673755d79..d4b84344d401 100644
--- a/mailnews/jar.mn
+++ b/mailnews/jar.mn
@@ -104,8 +104,6 @@ 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/folderCharsetDialog.xul (base/resources/content/folderCharsetDialog.xul)
- content/messenger/folderCharsetDialog.js (base/resources/content/folderCharsetDialog.js)
content/messenger/messengerdnd.js (base/resources/content/messengerdnd.js)
content/messenger/mailContextMenus.js (base/resources/content/mailContextMenus.js)
content/messenger/msgPrintEngine.js (base/resources/content/msgPrintEngine.js)
@@ -178,7 +176,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/folderCharsetDialog.dtd (base/resources/locale/en-US/folderCharsetDialog.dtd)
locale/en-US/messenger/folderProps.dtd (base/resources/locale/en-US/folderProps.dtd)
locale/en-US/messenger/subscribe.dtd (base/resources/locale/en-US/subscribe.dtd)
locale/en-US/messenger/subscribe.properties (base/resources/locale/en-US/subscribe.properties)