зеркало из https://github.com/mozilla/gecko-dev.git
more changes for the new download headers dialog. don't use hard coded
string, get them from a string bundle. stop building and exporting the news-test.* resources. add the MPL to some files.
This commit is contained in:
Родитель
5cb57b00e7
Коммит
059e639e29
|
@ -16,11 +16,7 @@
|
|||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# This is a list of local files which get copied to the res\mailnews\messenger directory
|
||||
#
|
||||
# sspitzer@netscape.com
|
||||
|
||||
news-test.js
|
||||
news-test.xul
|
||||
downloadheaders.js
|
||||
downloadheaders.xul
|
||||
|
|
|
@ -26,19 +26,17 @@ VPATH = @srcdir@
|
|||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
SAMPLES_DIR = $(DIST)/bin/chrome/messenger/content/default
|
||||
CHROME_DIR = $(DIST)/bin/chrome/messenger/content/default
|
||||
|
||||
EXPORT_RESOURCE_SAMPLES = \
|
||||
news-test.xul \
|
||||
news-test.js \
|
||||
EXPORT_RESOURCES = \
|
||||
downloadheaders.xul \
|
||||
downloadheaders.js \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
GARBAGE += $(addprefix $(SAMPLES_DIR)/, $(EXPORT_RESOURCE_SAMPLES))
|
||||
GARBAGE += $(addprefix $(CHROME_DIR)/, $(EXPORT_RESOURCES))
|
||||
|
||||
install::
|
||||
$(INSTALL) $(addprefix $(srcdir)/, $(EXPORT_RESOURCE_SAMPLES)) $(SAMPLES_DIR)
|
||||
$(INSTALL) $(addprefix $(srcdir)/, $(EXPORT_RESOURCES)) $(CHROME_DIR)
|
||||
|
||||
|
|
|
@ -1,9 +1,61 @@
|
|||
/* -*- Mode: Java; tab-width: 4; 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.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):
|
||||
* sspitzer@netscape.com
|
||||
*/
|
||||
|
||||
var newmessages = "";
|
||||
var newsgroupname = "";
|
||||
var Bundle = srGetStrBundle("chrome://messenger/locale/news.properties");
|
||||
|
||||
function OnLoad()
|
||||
{
|
||||
dump("OnLoad()\n");
|
||||
|
||||
if (window.arguments && window.arguments[0]) {
|
||||
dump(window.arguments[0] + "\n");
|
||||
var args = window.arguments[0];
|
||||
// args will be of the form <number>,<newsgroup name>
|
||||
var commapos = args.indexOf(',');
|
||||
newmessages = args.substring(0,commapos);
|
||||
newsgroupname = args.substring(commapos+1);
|
||||
|
||||
//dump("new message count = " + newmessages + "\n");
|
||||
//dump("newsgroup name = " + newsgroupname + "\n");
|
||||
|
||||
var downloadHeadersTitlePrefix = Bundle.GetStringFromName("downloadHeadersTitlePrefix");
|
||||
var downloadHeadersInfoText1 = Bundle.GetStringFromName("downloadHeadersInfoText1");
|
||||
var downloadHeadersInfoText2 = Bundle.GetStringFromName("downloadHeadersInfoText2");
|
||||
|
||||
// doesn't JS have a printf?
|
||||
window.title = downloadHeadersTitlePrefix + " " + newsgroupname;
|
||||
var infotext = downloadHeadersInfoText1 + " " + newmessages + " " + downloadHeadersInfoText2;
|
||||
setDivText('info',infotext);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function setDivText(divname, value) {
|
||||
var div = document.getElementById(divname);
|
||||
if (!div) return;
|
||||
if (div.firstChild)
|
||||
div.removeChild(div.firstChild);
|
||||
div.appendChild(document.createTextNode(value));
|
||||
}
|
||||
|
||||
|
|
|
@ -30,17 +30,14 @@ Rights Reserved.
|
|||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
align="vertical"
|
||||
class="dialog"
|
||||
onload="OnLoad()"
|
||||
title="&window.title;"
|
||||
style="padding:10px">
|
||||
onload="OnLoad()">
|
||||
|
||||
<html:script language="JavaScript" src="chrome://global/content/strres.js"/>
|
||||
<html:script language="JavaScript" src="chrome://messenger/content/downloadheaders.js"/>
|
||||
|
||||
<keyset id="keyset"/>
|
||||
|
||||
<box align="vertical" style="width:36em; min-height:12em">
|
||||
<box align="vertical">
|
||||
<spring flex="100%"/>
|
||||
<html:div style="margin-bottom:.3em">&info.label;</html:div>
|
||||
<html:div id="info"/>
|
||||
<box align="horizontal" flex="100%">
|
||||
<html:input type="radio" id="all" name="download" check="true"/>
|
||||
<html:label for="all">&all.label;</html:label>
|
||||
|
|
|
@ -24,14 +24,10 @@ DEPTH=..\..\..\..
|
|||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
install::
|
||||
$(MAKE_INSTALL) news-test.xul $(DIST)\bin\chrome\messenger\content\default
|
||||
$(MAKE_INSTALL) news-test.js $(DIST)\bin\chrome\messenger\content\default
|
||||
$(MAKE_INSTALL) downloadheaders.js $(DIST)\bin\chrome\messenger\content\default
|
||||
$(MAKE_INSTALL) downloadheaders.xul $(DIST)\bin\chrome\messenger\content\default
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\bin\chrome\messenger\content\default\news-test.xul
|
||||
rm -f $(DIST)\bin\chrome\messenger\content\default\news-test.js
|
||||
rm -f $(DIST)\bin\chrome\messenger\content\default\downloadheaders.js
|
||||
rm -f $(DIST)\bin\chrome\messenger\content\default\downloadheaders.xul
|
||||
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
downloadheaders.dtd
|
||||
news.properties
|
||||
|
|
|
@ -28,6 +28,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
EXPORT_RESOURCE_CONTENT = \
|
||||
$(srcdir)/downloadheaders.dtd \
|
||||
$(srcdir)/news.properties \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -18,8 +18,6 @@ Communications Corporation. Portions created by Netscape are
|
|||
Rights Reserved.
|
||||
-->
|
||||
|
||||
<!ENTITY window.title "Download header for: YYY">
|
||||
<!ENTITY info.label "There are XXX new message headers to download for this newsgroup.">
|
||||
<!ENTITY all.label "Download all headers">
|
||||
<!ENTITY download.label "Download">
|
||||
<!ENTITY headers.label "headers">
|
||||
|
|
|
@ -27,6 +27,7 @@ LOCALEDIR=$(DIST)\bin\chrome\messenger\locale\en-US
|
|||
|
||||
install::
|
||||
$(MAKE_INSTALL) downloadheaders.dtd $(LOCALEDIR)
|
||||
$(MAKE_INSTALL) news.properties $(LOCALEDIR)
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\bin\chrome\messenger\locale\en-US\*.*
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
# 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>
|
||||
#
|
||||
downloadHeadersTitlePrefix=Download headers for:
|
||||
downloadHeadersInfoText1=There are
|
||||
downloadHeadersInfoText2=new message headers to download for this newsgroup.
|
Загрузка…
Ссылка в новой задаче