зеркало из https://github.com/mozilla/snowl.git
make the write form use the StringBundle module instead of the stringbundle XBL binding so it doesn't need a special stringbundleset overlay node
This commit is contained in:
Родитель
281ba91ab2
Коммит
dacb2b868f
|
@ -65,9 +65,6 @@
|
|||
<script type="application/javascript" src="chrome://snowl/content/strands.js"/>
|
||||
<script type="application/javascript" src="chrome://snowl/content/river.js"/>
|
||||
|
||||
<!-- write.xul overlays a string bundle into this. -->
|
||||
<stringbundleset id="stringbundleset"/>
|
||||
|
||||
<keyset>
|
||||
<key id="pageLeftKey" keycode="VK_PAGE_UP" oncommand="SnowlMessageView.doPageMove(-1)" disabled="true"/>
|
||||
<key id="pageRightKey" keycode="VK_PAGE_DOWN" oncommand="SnowlMessageView.doPageMove(1)" disabled="true"/>
|
||||
|
|
|
@ -59,10 +59,6 @@
|
|||
<script type="application/javascript" src="chrome://snowl/content/strands.js"/>
|
||||
<script type="application/javascript" src="chrome://snowl/content/stream.js"/>
|
||||
|
||||
<!-- write.xul overlays a string bundle into this. -->
|
||||
<!-- FIXME: use the StringBundle module instead. -->
|
||||
<stringbundleset id="stringbundleset"/>
|
||||
|
||||
<toolbar>
|
||||
<toolbarbutton id="snowlRefreshButton"
|
||||
image="chrome://snowl/content/icons/arrow_refresh_small.png"
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
|
||||
// modules that are generic
|
||||
Cu.import("resource://snowl/modules/Observers.js");
|
||||
Cu.import("resource://snowl/modules/StringBundle.js");
|
||||
|
||||
// modules that are Snowl-specific
|
||||
Cu.import("resource://snowl/modules/service.js");
|
||||
|
@ -53,7 +54,12 @@ Cu.import("resource://snowl/modules/service.js");
|
|||
*/
|
||||
let WriteForm = {
|
||||
//**************************************************************************//
|
||||
// Convenience Getters
|
||||
// Shortcuts
|
||||
|
||||
get _strings() {
|
||||
delete this._strings;
|
||||
return this._strings = new StringBundle("chrome://snowl/locale/write.properties");
|
||||
},
|
||||
|
||||
get _writeTextbox() {
|
||||
delete this._writeTextbox;
|
||||
|
@ -70,11 +76,6 @@ let WriteForm = {
|
|||
return this._sendButton = document.getElementById("sendButton");
|
||||
},
|
||||
|
||||
get _stringBundle() {
|
||||
delete this._stringBundle;
|
||||
return this._stringBundle = document.getElementById("snowlWriteBundle");
|
||||
},
|
||||
|
||||
get _targetMenu() {
|
||||
delete this._targetMenu;
|
||||
return this._targetMenu = document.getElementById("targetMenu");
|
||||
|
@ -120,7 +121,7 @@ let WriteForm = {
|
|||
|
||||
onSendMessage: function() {
|
||||
this._sendButton.setAttribute("state", "sending");
|
||||
this._sendButton.label = this._stringBundle.getString("sendButton.label.sending");
|
||||
this._sendButton.label = this._strings.get("sendButton.label.sending");
|
||||
this._sendButton.disabled = true;
|
||||
|
||||
this._writeTextbox.disabled = true;
|
||||
|
@ -134,7 +135,7 @@ let WriteForm = {
|
|||
|
||||
onMessageSent: function() {
|
||||
this._sendButton.setAttribute("state", "sent");
|
||||
this._sendButton.label = this._stringBundle.getString("sendButton.label.sent");
|
||||
this._sendButton.label = this._strings.get("sendButton.label.sent");
|
||||
|
||||
this._writeTextbox.disabled = false;
|
||||
this._targetMenu.disabled = false;
|
||||
|
@ -222,7 +223,7 @@ let WriteForm = {
|
|||
this._resetSendStatusTimeoutID = null;
|
||||
|
||||
this._sendButton.removeAttribute("state");
|
||||
this._sendButton.label = this._stringBundle.getString("sendButton.label");
|
||||
this._sendButton.label = this._strings.get("sendButton.label");
|
||||
this._sendButton.disabled = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,10 +45,6 @@
|
|||
|
||||
<script type="application/javascript" src="chrome://snowl/content/write.js"/>
|
||||
|
||||
<stringbundleset id="stringbundleset">
|
||||
<stringbundle id="snowlWriteBundle" src="chrome://snowl/locale/write.properties"/>
|
||||
</stringbundleset>
|
||||
|
||||
<vbox id="writeForm">
|
||||
<menulist id="targetMenu" oncommand="WriteForm.onSelectTarget()">
|
||||
<menupopup/>
|
||||
|
|
Загрузка…
Ссылка в новой задаче