Add an account.xul window with a list of the supported protocols.
This commit is contained in:
Родитель
839ca2f7d9
Коммит
5a38bb6a84
|
@ -0,0 +1,19 @@
|
|||
const Ci = Components.interfaces;
|
||||
|
||||
var account = {
|
||||
onload: function account_onload() {
|
||||
var protoList = document.getElementById("protolist");
|
||||
var pcs = Components.classes["@instantbird.org/purple/core;1"]
|
||||
.getService(Ci.purpleICoreService);
|
||||
var protocols = pcs.getProtocols();
|
||||
while (protocols.hasMoreElements()) {
|
||||
var proto = protocols.getNext().QueryInterface(Ci.purpleIProtocol);
|
||||
dump(" " + proto.name + " " + proto.id + "\n");
|
||||
var id = proto.id;
|
||||
var item = protoList.appendItem(proto.name, id, "toto");
|
||||
item.setAttribute("image", "chrome://instantbird/skin/prpl/" + id + ".png");
|
||||
item.setAttribute("class", "menuitem-iconic");
|
||||
}
|
||||
protoList.selectedIndex = 0;
|
||||
}
|
||||
};
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://instantbird/skin/account.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://instantbird/locale/account.dtd">
|
||||
|
||||
<window
|
||||
id = "account"
|
||||
title = "&accountWindow.title;"
|
||||
width = "300"
|
||||
height = "600"
|
||||
xmlns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="account.onload()">
|
||||
<script src="chrome://instantbird/content/account.js"/>
|
||||
<script src="chrome://venkman/content/venkman-overlay.js"/>
|
||||
|
||||
<menulist id="protolist"/>
|
||||
</window>
|
|
@ -29,5 +29,6 @@
|
|||
<statusbar>
|
||||
<statusbarpanel id="status" label="" crop="end" flex="1"/>
|
||||
<button oncommand="start_venkman()" label="&venkman.button;"/>
|
||||
<button oncommand="window.openDialog('chrome://instantbird/content/account.xul');" label="+"/>
|
||||
</statusbar>
|
||||
</window>
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<!ENTITY accountWindow.title "InstantBird - create account">
|
Загрузка…
Ссылка в новой задаче