clean up in preparation for bug #14254. remove unused files. create

new string bundle (messenger.properties) for use by the messenger application
fix widgetglue.js to use the string bundle.  now we get the title of the
new folder / subscribe dialog from the string bundle.
also fix the problem where the new folder / subscribe dialog wouldn't open
if zero, or more than one server / folder were selected.
This commit is contained in:
sspitzer%netscape.com 1999-11-30 22:57:42 +00:00
Родитель 57333d6e7e
Коммит b95351b8ff
23 изменённых файлов: 102 добавлений и 46 удалений

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

@ -43,12 +43,13 @@ Rights Reserved.
windowtype="mail:3pane">
<html:script src="chrome://global/content/strres.js"/>
<html:script src="chrome://messenger/content/widgetglue.js"/>
<html:script src="chrome://messenger/content/commandglue.js"/>
<html:script src="chrome://messenger/content/shareglue.js"/>
<html:script src="chrome://messenger/content/msgViewNavigation.js"/>
<html:script src="chrome://messenger/content/msgMail3PaneWindow.js"/>
<html:script src="chrome://navigator/content/contentframe.js" />
<html:script src="chrome://navigator/content/contentframe.js"/>
<commands id="commands">
<commandset id="CommandUpdate_Mail"

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

@ -22,20 +22,25 @@ function newFolderNameOnLoad()
var selectedParentFolder = document.getElementById('selectedparentfolder');
// dump("selectedParentFolder = " + selectedParentFolder + "\n");
try {
options = selectedParentFolder.options;
for (i=1;i<options.length;i++) {
var uri = options[i].getAttribute('uri');
// dump(uri + " vs " + window.arguments[0].preselectedURI + "\n");
if (uri == window.arguments[0].preselectedURI) {
// dump("preselect: " + uri + " index = " + i + "\n");
selectedParentFolder.selectedIndex = i;
break;
if (window.arguments[0].preselectedURI) {
try {
options = selectedParentFolder.options;
for (i=1;i<options.length;i++) {
var uri = options[i].getAttribute('uri');
// dump(uri + " vs " + window.arguments[0].preselectedURI + "\n");
if (uri == window.arguments[0].preselectedURI) {
// dump("preselect: " + uri + " index = " + i + "\n");
selectedParentFolder.selectedIndex = i;
break;
}
}
}
}
catch (ex) {
// dump("failed to preflight the select thing.\n");
catch (ex) {
// dump("failed to preflight the select thing.\n");
}
}
else {
dump("passed null for preselectedURI, do nothing\n");
}
}

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

@ -26,6 +26,7 @@
var msgComposeType = Components.interfaces.nsIMsgCompType;
var msgComposFormat = Components.interfaces.nsIMsgCompFormat;
var Bundle = srGetStrBundle("chrome://messenger/locale/messenger.properties");
// Controller object for folder pane
var FolderPaneController =
@ -316,7 +317,7 @@ function MsgForwardMessage(event)
var forwardType = 0;
try {
var forwardType = prefs.GetIntPref("mail.forward_message_mode");
} catch (e) {dump ("faild to retrive pref mail.forward_message_mode");}
} catch (e) {dump ("failed to retrieve pref mail.forward_message_mode");}
if (forwardType == 0)
MsgForwardAsAttachment(null);
@ -434,45 +435,59 @@ function MsgSortBySubject()
function MsgNewFolder()
{
MsgNewSubfolder("chrome://messenger/content/newFolderNameDialog.xul","New Folder");
var windowTitle = Bundle.GetStringFromName("newFolderDialogTitle");
dump(Bundle + windowTitle + "\n");
MsgNewSubfolder("chrome://messenger/content/newFolderNameDialog.xul",windowTitle);
}
function MsgSubscribe()
{
MsgNewSubfolder("chrome://messenger/content/subscribeDialog.xul","Subscribe");
var windowTitle = Bundle.GetStringFromName("subscribeDialogTitle");
dump(Bundle + windowTitle + "\n");
MsgNewSubfolder("chrome://messenger/content/subscribeDialog.xul", windowTitle);
}
function MsgNewSubfolder(chromeWindowURL,windowTitle)
{
var selectedFolder = null;
try {
var folderTree = GetFolderTree();
var selectedFolderList = folderTree.selectedItems;
if (selectedFolderList.length != 1) {
// dump("ERROR: you can only select one folder / server to add new folder / subscribe to.\n");
return;
// you can only select one folder / server to add new folder / subscribe to
if (selectedFolderList.length == 1) {
selectedFolder = selectedFolderList[0];
}
var selectedFolder = selectedFolderList[0];
if (selectedFolder)
{
else {
dump("number of selected folder was " + selectedFolderList.length + "\n");
}
}
catch (ex) {
//dump("failed to get the selected folder\n");
}
try {
var preselectedURI = null;
if (selectedFolder) {
preselectedURI = selectedFolder.getAttribute('id');
// dump("folder to preselect: " + preselectedURI + "\n");
var dialog = window.openDialog(
}
var dialog = window.openDialog(
chromeWindowURL,
"",
"chrome",
{preselectedURI:preselectedURI, title:windowTitle,
okCallback:NewFolder});
}
}
catch (ex) {
// dump("ERROR: perhaps nothing in the folder pane is selected?\n")
dump("failed to open the new folder dialog\n");
}
}
function NewFolder(name)
{
var folderTree = GetFolderTree();
var folderTree = GetFolderTree();
var selectedFolderList = folderTree.selectedItems;
var selectedFolder = selectedFolderList[0];

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

@ -1,4 +1,5 @@
messenger.dtd
messenger.properties
threadpane.dtd
folderpane.dtd
newFolderNameDialog.dtd

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

@ -28,6 +28,7 @@ include $(DEPTH)/config/autoconf.mk
EXPORT_RESOURCE_CONTENT = \
$(srcdir)/messenger.dtd \
$(srcdir)/messenger.properties \
$(srcdir)/threadpane.dtd \
$(srcdir)/folderpane.dtd \
$(srcdir)/newFolderNameDialog.dtd \

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

@ -28,6 +28,7 @@ LOCALEDIR=$(DIST)\bin\chrome\messenger\locale\en-US
install::
$(MAKE_INSTALL) messenger.dtd $(LOCALEDIR)
$(MAKE_INSTALL) messenger.properties $(LOCALEDIR)
$(MAKE_INSTALL) threadpane.dtd $(LOCALEDIR)
$(MAKE_INSTALL) folderpane.dtd $(LOCALEDIR)
$(MAKE_INSTALL) newFolderNameDialog.dtd $(LOCALEDIR)

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

@ -0,0 +1,26 @@
# 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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Seth Spitzer <sspitzer@netscape.com>
#
#
# The following are used by the messenger application
#
newFolderDialogTitle=New Folder
subscribeDialogTitle=Subscribe

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

@ -18,8 +18,6 @@
# Contributor(s):
#
#
# This file is renamed from "imapMsgs_en-US.properties.
#
# The following are used by the imap code to display progress/status/error messages
#

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

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

@ -18,8 +18,6 @@
# Contributor(s):
#
#
# This file is renamed from localMsgs_en-US.properties.
#
# The following are used by the local mail code to display progress/status/error messages
#

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

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

@ -18,8 +18,6 @@
# Contributor(s):
#
#
# This file is renamed from vcard_en.properties
#
# The following are used by the vcard content type handler to
# to emit header display in HTML

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

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

@ -18,8 +18,6 @@
# Contributor(s):
#
#
# This file is renamed from "mime_en.properties"
#
# The following are used by libmime to emit header display in HTML
#

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

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

@ -18,8 +18,6 @@
# Contributor(s):
#
#
# This file is renamed from "mimeheader_en.properties".
#
# The following are used by libmime for header display in XML & HTML
#

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

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

@ -18,8 +18,6 @@
# Contributor(s):
#
#
# This file is renamed from "imapMsgs_en-US.properties.
#
# The following are used by the imap code to display progress/status/error messages
#

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

@ -18,8 +18,6 @@
# Contributor(s):
#
#
# This file is renamed from localMsgs_en-US.properties.
#
# The following are used by the local mail code to display progress/status/error messages
#

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

@ -0,0 +1,26 @@
# 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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Seth Spitzer <sspitzer@netscape.com>
#
#
# The following are used by the messenger application
#
newFolderDialogTitle=New Folder
subscribeDialogTitle=Subscribe

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

@ -18,8 +18,6 @@
# Contributor(s):
#
#
# This file is renamed from "mime_en.properties"
#
# The following are used by libmime to emit header display in HTML
#

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

@ -18,8 +18,6 @@
# Contributor(s):
#
#
# This file is renamed from "mimeheader_en.properties".
#
# The following are used by libmime for header display in XML & HTML
#

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

@ -18,8 +18,6 @@
# Contributor(s):
#
#
# This file is renamed from vcard_en.properties
#
# The following are used by the vcard content type handler to
# to emit header display in HTML