PK
xU8^ chrome.manifestcontent totaltoolbar chrome/content/
skin totaltoolbar global chrome/skin/global/
locale totaltoolbar en-US chrome/locale/en-US/
locale totaltoolbar ar chrome/locale/ar/
locale totaltoolbar be-BY chrome/locale/be-BY/
locale totaltoolbar cs-CZ chrome/locale/cs-CZ/
locale totaltoolbar da-DK chrome/locale/da-DK/
locale totaltoolbar de-DE chrome/locale/de-DE/
locale totaltoolbar el-GR chrome/locale/el-GR/
locale totaltoolbar en-GB chrome/locale/en-GB/
locale totaltoolbar es-AR chrome/locale/es-AR/
locale totaltoolbar es-ES chrome/locale/es-ES/
locale totaltoolbar fi-FI chrome/locale/fi-FI/
locale totaltoolbar fr-FR chrome/locale/fr-FR/
locale totaltoolbar he-IL chrome/locale/he-IL/
locale totaltoolbar hr-HR chrome/locale/hr-HR/
locale totaltoolbar hu-HU chrome/locale/hu-HU/
locale totaltoolbar it-IT chrome/locale/it-IT/
locale totaltoolbar ja chrome/locale/ja/
locale totaltoolbar ko-KR chrome/locale/ko-KR/
locale totaltoolbar lt-LT chrome/locale/lt-LT/
locale totaltoolbar nb-NO chrome/locale/nb-NO/
locale totaltoolbar nl-NL chrome/locale/nl-NL/
locale totaltoolbar pl-PL chrome/locale/pl-PL/
locale totaltoolbar pt-BR chrome/locale/pt-BR/
locale totaltoolbar pt-PT chrome/locale/pt-PT/
locale totaltoolbar sk-SK chrome/locale/sk-SK/
locale totaltoolbar ru-RU chrome/locale/ru-RU/
locale totaltoolbar sv-SE chrome/locale/sv-SE/
locale totaltoolbar tr-TR chrome/locale/tr-TR/
locale totaltoolbar uk-UA chrome/locale/uk-UA/
locale totaltoolbar zh-CN chrome/locale/zh-CN/
locale totaltoolbar zh-TW chrome/locale/zh-TW/
overlay chrome://browser/content/browser.xul chrome://totaltoolbar/content/totaltoolbar.xul
overlay chrome://global/content/customizeToolbar.xul chrome://totaltoolbar/content/totaltoolbar_customize.xulPK
xU88
7 7 install.rdfalta88Customize and place multiple toolbars almost anywhere. Customize statusbar too.http://totaltoolbar.mozdev.orgtotaltoolbar@mozdev.orgTotalToolbar1.1https://www.mozdev.org/p/updates/totaltoolbar/totaltoolbar@mozdev.org/update.rdf2Functionality from All-in-One Sidebar (AiOS)by Ingo Wennemaring, based onToolbar Enhancements by Stephen ClaveringMany thanks to the translators at Babelzilla{ec8030f7-c20a-464f-9b0e-13a3a9e97384}3.0.*3.0b4preWINNT_x86-msvcLinuxSunOS_sparc-suncPK
xU8a a chrome/content/totaltoolbar.js
//var aiosOS = Components.classes['@mozilla.org/xre/app-info;1']
// .getService(Components.interfaces.nsIXULRuntime).OS;
var tt_toolboxes = null;
var tt_bindingBoxes = ["tt-toolbox-tableft",
"tt-toolbox-tabright",
"tt-toolbox-belowtabs"];
var gToolboxes, gToolbox, gToolboxDocument, docElt, gStatusbar, gStatusbarMode;
// Give sidebarheader an id
var sidebarthrobber = document.getElementById('sidebar-throbber');
if (sidebarthrobber)
sidebarthrobber.parentNode.setAttribute('id', 'sidebarheader');
/* Onload initialization */
function tt_init() {
windowType = document.documentElement.getAttribute('windowtype');
// debugTT("windowType);
if (windowType != "navigator:browser")
return;
gToolbox = getNavToolbox();
gToolboxDocument = gToolbox.ownerDocument;
gStatusbar = document.getElementById("status-bar");
// BrowserFullScreen erweitern (Toolboxen sichtbar/unsichtbar machen)
//if(aiosOS != "Darwin") {
var fx_BrowserFullScreen = BrowserFullScreen;
BrowserFullScreen = function BrowserFullScreen() {
fx_BrowserFullScreen();
tt_BrowserFullScreen();
}
var fx_BrowserToolboxCustomizeDone = BrowserToolboxCustomizeDone;
BrowserToolboxCustomizeDone = function BrowserToolboxCustomizeDone() {
fx_BrowserToolboxCustomizeDone();
document.getElementById("cmd_CustomizeStatusbar").removeAttribute("disabled");
var dd = gStatusbar.getAttribute("tt_ondragdrop");
if (dd) {
gStatusbar.setAttribute("ondragdrop", dd);
gStatusbar.removeAttribute("tt_ondragdrop");
}
}
//}
/* Give context menu items an id */
var toolbarContextMenu = document.getElementById('toolbar-context-menu');
if (toolbarContextMenu) {
toolbarContextMenu.firstChild.setAttribute('id', 'toolbar-context-menu-sep1');
toolbarContextMenu.firstChild.nextSibling.setAttribute('id', 'toolbar-context-customize');
}
/* Arrange toolbar context menu*/
toolbarContextMenu.insertBefore(
document.getElementById('toolbar-context-menu-toggle_taskbar'),
document.getElementById('toolbar-context-menu-sep1'));
toolbarContextMenu.insertBefore(
document.getElementById('tt-statusbar-customize'),
document.getElementById('toolbar-context-customize'));
// Label der Toolbareinstellungen tauschen, wenn der Browser im RTL-Modus ist (Sidebar rechts)
var str_left = document.getElementById("tt-left").getAttribute('label');
var str_sidebarleft = document.getElementById("tt-sidebarleft").getAttribute('label');
var str_right = document.getElementById("tt-right").getAttribute('label');
try {
var wStyle = document.defaultView.getComputedStyle(document.getElementById("browser"), '');
if(wStyle.direction == "rtl") {
document.getElementById("tt-left").setAttribute('label', str_right);
document.getElementById("tt-sidebarright").setAttribute('label', str_sidebarleft);
document.getElementById("tt-right").setAttribute('label', str_left);
}
}
catch(e) { }
tt_initStatusbar();
tt_adjustToolboxWidth(true);
}
window.addEventListener("load", tt_init, false);
//by Stephen Clavering with mods by eXXile
function tt_getToolboxes(aType) {
tt_toolboxes = [];
if (aType == 'statusbar')
tt_toolboxes.push(gStatusbar);
else {
var tt_tmpBoxes = document.getElementsByTagName('toolbox');
for(var z = 0; z < tt_tmpBoxes.length; z++) {
tt_toolboxes.push(tt_tmpBoxes[z]);
}
for(var i = 0; i < tt_bindingBoxes.length; i++) {
if(document.getElementById(tt_bindingBoxes[i]))
tt_toolboxes.push(document.getElementById(tt_bindingBoxes[i]));
}
}
return tt_toolboxes;
}
/* Set up statusbar */
function tt_initStatusbar() {
var item = gStatusbar.firstChild;
var defaultSet = [];
var isHidden = gStatusbar.hasAttribute("hidden");
if (isHidden)
gStatusbar.removeAttribute("hidden");
// Create pseudo palette
while (item) {
if (item.localName == "statusbarpanel") {
var cloneItem = item.cloneNode(true)
gStatusbar.palette.appendChild(cloneItem);
}
// Save all statusbar children
defaultSet.push(item.id);
item = item.nextSibling;
}
var currentSet = gStatusbar.getAttribute("currentset");
var currentSetItems = currentSet.split(",");
gStatusbar.setAttribute("defaultset", defaultSet);
gStatusbar.customizeDone = BrowserToolboxCustomizeDone;
//Set removed state
if (currentSet) {
var item = gStatusbar.firstChild;
while (item) {
if (item.localName == "statusbarpanel")
// Set 'removed' if item not in currentset
if (currentSetItems.indexOf(item.id) == -1)
item.setAttribute("removed", true);
else
item.removeAttribute("removed");
item = item.nextSibling;
}
//Reorder statusbar items according to currentset order
for(var j = currentSetItems.length; j > 0; j--) {
if (["separator", "spring", "spacer"].indexOf(currentSetItems[j-1]) != -1)
gStatusbar.insertItem(currentSetItems[j-1], gStatusbar.firstChild, null, null);
else {
var item = gToolboxDocument.getElementById(currentSetItems[j-1]);
// If no item, then currentset contains an id whose statusbarpanel has
// been uninstalled, just skip; currentset will be cleaned up when done..
if (item) {
gToolboxDocument.adoptNode(item);
gStatusbar.insertBefore(item, gStatusbar.firstChild);
}
}
}
gStatusbar.setAttribute("currentset", currentSet);
}
if (isHidden)
window.setTimeout('gStatusbar.setAttribute("hidden", true)', 20);
}
/* Reset statusbar with order and display of all items pre customization */
function tt_resetStatusbar() {
var defaultSet = gStatusbar.getAttribute("defaultset");
var defaultSetItems = defaultSet.split(",");
var item, nextSibling;
if (defaultSet) {
item = gStatusbar.firstChild;
while (item) {
nextSibling = item.nextSibling;
// Remove any item not in defaultset
if (defaultSetItems.indexOf(item.id) == -1)
item.parentNode.removeChild(item);
else
item.removeAttribute("removed");
item = nextSibling;
}
//Reorder statusbar items according to defaultset order
for(var j = defaultSetItems.length; j > 0; j--) {
item = gToolboxDocument.getElementById(defaultSetItems[j-1]);
if (item) {
gToolboxDocument.adoptNode(item);
gStatusbar.insertBefore(item, gStatusbar.firstChild);
}
}
}
}
/* Set up toolbar context menu */
function tt_initCustomiseContext(evt, popup) {
var toolbar = document.popupNode;
while(toolbar.localName != "toolbar" && toolbar.localName != "statusbar")
toolbar = toolbar.parentNode;
var isStatusbar = toolbar.localName == "statusbar";
var isDefaultToolbar = toolbar.getAttribute('defaultset') != "";
var isCustomizableToolbar = toolbar.getAttribute('customizable');
var toolbox = isStatusbar ? toolbar : toolbar.parentNode;
var isPlainToolbox = toolbox.getAttribute('class').indexOf('tt-toolbox-plain') >= 0;
var child;
// Einstellungen
var mode = toolbar.getAttribute("mode");
var small = toolbar.getAttribute("iconsize") == "small";
var flexbuttons = toolbar.hasAttribute("flexbuttons");
var fullscreentoolbar = toolbar.hasAttribute("fullscreentoolbar");
var position = toolbox.getAttribute("id");
for(var i = 0; i < popup.childNodes.length; i++) {
child = popup.childNodes[i];
// M O D E
if(child.getAttribute('name') == "mode") {
child.setAttribute('checked', child.getAttribute('value') == mode);
child.hidden = isStatusbar;
}
// S M A L L I C O N S
if(child.getAttribute('value') == "smallicons") {
child.setAttribute('checked', small);
child.setAttribute('disabled', mode == "text");
child.disabled = isStatusbar;
popup.childNodes[i-1].hidden = isStatusbar;
}
// F L E X I B L E B U T T O N S
if(child.getAttribute('value') == "flexbuttons") {
child.setAttribute('checked', flexbuttons);
// keine flexiblen Buttons in der Tabbar und der Statusleiste
child.hidden = isPlainToolbox || isStatusbar;
popup.childNodes[i-1].hidden = isPlainToolbox || isStatusbar;
}
// F U L L S C R E E N
if(child.getAttribute('value') == "fullscreentoolbar") {
child.setAttribute('checked', fullscreentoolbar);
}
// P O S I T I O N
if(child.getAttribute('name') == "position") {
child.setAttribute('checked', child.getAttribute('value') == position);
// Hidden in Tabbar, der Statusleiste, Standard-Toolbars oder unkonfigurierbare Toolbars
child.hidden = isPlainToolbox ||
isDefaultToolbar || !isCustomizableToolbar;
// Separator hidden
if(child.id == "position1")
popup.childNodes[i-1].hidden = isPlainToolbox ||
isDefaultToolbar || !isCustomizableToolbar;
}
}
}
/* Change individual toolbar configuration */
function tt_setToolbarMode(evt, aPopup) {
var toolbar = document.popupNode;
while(toolbar.localName != "toolbar" && toolbar.localName != "statusbar")
toolbar = toolbar.parentNode;
var isStatusbar = toolbar.localName == "statusbar";
var toolbox = isStatusbar ? toolbar : toolbar.parentNode;
var value = evt.originalTarget.value;
value = (value == "top-toolbox") ? getNavToolbox().id : value;
var group = evt.originalTarget.getAttribute("name"); // radio group
if(value == "smallicons") {
var small = evt.originalTarget.getAttribute("checked") == "true";
var size = small ? "small" : "large";
toolbox.setToolbarIconSize(toolbar, size);
}
else if(value == "fullscreentoolbar") {
showInFullScreen = evt.originalTarget.getAttribute("checked") == "true";
// Don't have the toolbox binding on statusbar..
if (isStatusbar) {
if (showInFullScreen)
gStatusbar.setAttribute("fullscreentoolbar", true);
else
gStatusbar.removeAttribute("fullscreentoolbar");
document.persist(toolbar.id, "fullscreentoolbar");
}
else
toolbox.showToolbarInFullscreen(toolbar, showInFullScreen);
}
else if(value == "flexbuttons") {
var flexbuttons = evt.originalTarget.getAttribute("checked") == "true";
toolbox.setToolbarFlexButtons(toolbar, flexbuttons);
}
else if(group == "mode") {
toolbox.setToolbarMode(toolbar, value);
}
else if(group == "position") {
// We could just remove the from its current location and append
// to the desired toolbox, but that would mean we wouldn't respect the rule
// that custom toolbars appear wherever the is. Also it
// caused an interesting bug where all the items on the toolbar would be
// duplicated sometimes after the toolbar was moved. Finally, we can't just
// get the currentSet of the existing toolbar and pass it to
// appendCustomToolbar because currentSet always returns "__empty" during
// customisation, because all the items are wrapped in extra elements.
docElt = gToolboxDocument.documentElement;
var items = [];
while(toolbar.hasChildNodes())
items.push(toolbar.removeChild(toolbar.lastChild));
var tbarName = toolbar.toolbarName;
var customIndex = toolbar.getAttribute("customindex");
if(toolbox.toolbarset.hasAttribute('anonymous')) {
// Must persist xbl 'below-tabs' toolbar's toolbarset on the document root
var attrPrefix = '_toolbarset.' +
toolbox.toolbarset.getAttribute('id') + '.toolbar';
if (docElt.hasAttribute(attrPrefix+customIndex)) {
docElt.removeAttribute(attrPrefix+customIndex);
// gToolboxDocument.persist(docElt.id, attrPrefix+customIndex);
document.persist(docElt.id, attrPrefix+customIndex);
}
}
else if(toolbox.toolbarset.hasAttribute("toolbar"+customIndex)) {
// Remove regular custom toolbar's toolbarset on the document root
toolbox.toolbarset.removeAttribute("toolbar"+customIndex);
// gToolboxDocument.persist(toolbox.toolbarset.id, "toolbar"+customIndex);
document.persist(toolbox.toolbarset.id, "toolbar"+customIndex);
}
toolbox.removeChild(toolbar);
// localStore.Flush();
// Need to now clean up old toolbox: customToolbarCount, remaining toolbar
// customindexes, toolbarset toolbarX numbering, and persisted values.
var customCount = 0;
for(var i = 0; i < toolbox.childNodes.length; ++i) {
var toolbar = toolbox.childNodes[i];
if (toolbar.localName == "toolbar" &&
toolbar.getAttribute("customizable")) {
// Calculate currentset and store it in the attribute.
var currentSet = toolbar.currentSet;
// toolbar.setAttribute("currentset", currentSet);
customIndex = toolbar.getAttribute("customindex");
if (customIndex) {
if(toolbox.toolbarset.hasAttribute('anonymous')) {
// Must persist xbl 'below-tabs' toolbar index on the document root
var attrPrefix = '_toolbarset.' +
toolbox.toolbarset.getAttribute('id') + '.toolbar';
if (docElt.hasAttribute(attrPrefix+customIndex)){
docElt.removeAttribute(attrPrefix+customIndex);
document.persist(docElt.id, attrPrefix+customIndex);
}
docElt.setAttribute(attrPrefix+(++customCount),
toolbar.toolbarName + ":" + currentSet);
toolbar.setAttribute("customindex", customCount); //adjust count
document.persist(docElt.id, attrPrefix+customCount);
} else {
// Reindex custom toolbar info on the
if (toolbox.toolbarset.hasAttribute("toolbar"+customIndex)) {
toolbox.toolbarset.removeAttribute("toolbar"+customIndex);
document.persist(toolbox.toolbarset.id, "toolbar"+customIndex);
}
toolbox.toolbarset.setAttribute("toolbar"+(++customCount),
toolbar.toolbarName + ":" + currentSet);
toolbar.setAttribute("customindex", customCount); //adjust count
document.persist(toolbox.toolbarset.id, "toolbar"+customCount);
}
// localStore.Flush();
}
}
}
toolbox.customToolbarCount = customCount; //number of remaining toolbars
if (customCount == 0 && toolbox.getAttribute("class") != "toolbox-top") //none..
toolbox.setAttribute("empty", true);
// Remove toolbarX attributes from toolbarset or xul doc root for removed
// toolbars, ie any entries past those for toolbars already indexed..
if(toolbox.toolbarset.hasAttribute('anonymous')) {
while (docElt.hasAttribute(attrPrefix+(++customCount))) {
docElt.removeAttribute(attrPrefix+customCount);
document.persist(docElt.id, attrPrefix+customCount);
}
}
else {
while (toolbox.toolbarset.hasAttribute("toolbar"+(++customCount))) {
toolbox.toolbarset.removeAttribute("toolbar"+customCount);
document.persist(toolbox.toolbarset.id, "toolbar"+customCount);
}
}
// Create new toolbar
var newToolbox = document.getElementById(value);
var newToolbar = newToolbox.appendCustomToolbar(tbarName, "__empty", true);
while(items.length)
newToolbar.appendChild(items.pop());
toolbox = newToolbox;
toolbar = newToolbar;
// Retain options
handleOptions("copy", toolbar);
// Calculate currentset and store it in the attribute.
var currentSet = toolbar.currentSet;
customIndex = toolbar.getAttribute("customindex");
toolbar.setAttribute("currentset", currentSet);
toolbox.removeAttribute("empty");
if(toolbox.toolbarset.hasAttribute('anonymous')) {
// Must persist xbl 'below-tabs' toolbar on the document root
var attrPrefix = '_toolbarset.' +
toolbox.toolbarset.getAttribute('id') + '.toolbar';
docElt.setAttribute(attrPrefix+customIndex,
toolbar.toolbarName + ":" + currentSet);
document.persist(docElt.id, attrPrefix+customIndex);
} else {
// Persist custom toolbar info on the
toolbox.toolbarset.setAttribute("toolbar"+customIndex,
toolbar.toolbarName + ":" + currentSet);
document.persist(toolbox.toolbarset.id, "toolbar"+customIndex);
}
}
tt_adjustToolboxWidth(aPopup);
}
/* Set/unset fixed width for vertical toolbars */
function tt_adjustToolboxWidth(fix) {
// Aufruf durch Drag-Event der Toolbox
if(typeof fix == "object") {
fix = false;
window.setTimeout('tt_adjustToolboxWidth(true)', 200);
}
var computedStyle, myWidth;
var vToolboxes = document.getElementsByAttribute('vertical', 'true');
for(var i = 0; i < vToolboxes.length; i++) {
if(vToolboxes[i].tagName == "toolbox") {
myWidth = 0;
// Set fixed width
if(fix) {
var boxChilds = vToolboxes[i].childNodes;
// Add up width of all toolbars in the toolbox
for(var j = 0; j < boxChilds.length; j++) {
if(boxChilds[j].tagName == "toolbar") {
computedStyle = document.defaultView.getComputedStyle(boxChilds[j], null);
myWidth = myWidth + parseInt(computedStyle.width);
myWidth = myWidth + parseInt(computedStyle.paddingLeft);
myWidth = myWidth + parseInt(computedStyle.paddingRight);
myWidth = myWidth + parseInt(computedStyle.marginLeft);
myWidth = myWidth + parseInt(computedStyle.marginRight);
myWidth = myWidth + parseInt(computedStyle.borderLeftWidth);
myWidth = myWidth + parseInt(computedStyle.borderRightWidth);
}
}
vToolboxes[i].style.maxWidth = myWidth + "px";
}
// Unset width
else {
vToolboxes[i].removeAttribute('width');
vToolboxes[i].removeAttribute('style');
}
}
}
return true;
}
/* Clean up options from root doc for removed or empty toolbars */
function handleOptions(aType, toolbar) {
if (toolbar.localName != "toolbar")
return;
var attr = '_toolbar.' + toolbar.id + ".";
var toolbarOptions = ["mode",
"iconsize",
"fullscreentoolbar",
"flexbuttons",
"collapsed",
"currentset"]
for(var x = 0; x < toolbarOptions.length; ++x) {
if (docElt.hasAttribute(attr+toolbarOptions[x])) {
if (aType == "remove") {
docElt.removeAttribute(attr+toolbarOptions[x]);
gToolboxDocument.persist(docElt.id, attr+toolbarOptions[x]);
}
if (aType == "copy") {
var val = docElt.getAttribute(attr+toolbarOptions[x]);
toolbar.setAttribute(toolbarOptions[x], val);
}
}
}
}
/* Console logger */
function debugTT(aMsg)
{
Components.classes["@mozilla.org/consoleservice;1"]
.getService(Components.interfaces.nsIConsoleService)
.logStringMessage("TotalToolbar::"+
arguments.callee.caller.name+": " + aMsg);
}
/* Show or hide toolbars in fullscreen mode */
function tt_BrowserFullScreen() {
var toolboxes = [];
// Get all vertical toolboxes in the array
var vToolboxes = document.getElementsByAttribute('vertical', 'true');
for(var i = 0; i < vToolboxes.length; i++) {
if(vToolboxes[i].tagName == "toolbox") toolboxes.push(vToolboxes[i]);
}
// Add xbl toolboxes to the array
for(var j = 0; j < tt_bindingBoxes.length; j++) {
if(document.getElementById(tt_bindingBoxes[j]))
toolboxes.push(document.getElementById(tt_bindingBoxes[j]));
}
// Toolboxen durchlaufen
for(i = 0; i < toolboxes.length; i++) {
var boxChilds = toolboxes[i].childNodes;
var fsChilds = 0;
// Child-Elemente durchlaufen (Toolbars)
for(j = 0; j < boxChilds.length; j++) {
if(boxChilds[j].getAttribute("fullscreentoolbar") == "true")
fsChilds++;
}
// If all toolbars hidden, make toolbox also hidden
if(window.fullScreen)
toolboxes[i].setAttribute('hidden', !(fsChilds > 0));
else
toolboxes[i].setAttribute('hidden', false);
}
}
//if(aiosOS != "Darwin") {
/* Rewritten to pass all toolboxes to the Customize window */
BrowserCustomizeToolbar = function(aType) {
// Disable the toolbar context menu items
var menubar = document.getElementById("main-menubar");
for(var i = 0; i < menubar.childNodes.length; ++i)
menubar.childNodes[i].setAttribute("disabled", true);
document.getElementById("cmd_CustomizeToolbars").setAttribute("disabled", true);
document.getElementById("cmd_CustomizeStatusbar").setAttribute("disabled", true);
var splitter = document.getElementById("urlbar-search-splitter");
if (splitter)
splitter.parentNode.removeChild(splitter);
if (aType == "statusbar")
tt_getToolboxes('statusbar');
else
tt_getToolboxes('toolbars');
openDialog("chrome://global/content/customizeToolbar.xul",
(aType == "statusbar") ? "CustomizeStatusbar" : "CustomizeToolbar",
"chrome,all,dependent", gToolbox, tt_toolboxes);
}
//}
/* Rewritten to show all toolboxes, handle statusbar */
onViewToolbarsPopupShowing = function (aEvent) {
var popup = aEvent.target;
var i;
// keine Toolbars im "Toolbar Properties"-Men� anzeigen
if(popup.parentNode.id == "tt-toolbar-properties")
return;
// Toolbar properties disabled for statusbar, for now..
var toolbar = document.popupNode;
while(toolbar.localName != "toolbar" && toolbar.localName != "statusbar")
toolbar = toolbar.parentNode;
var isStatusbar = toolbar.localName == "statusbar";
document.getElementById("toolbar-context-customize")
.setAttribute("hidden", isStatusbar ? true : false);
document.getElementById("tt-statusbar-customize")
.setAttribute("hidden", isStatusbar ? false : true);
document.getElementById("toolbar-context-menu-toggle_taskbar")
.setAttribute("checked", !gStatusbar.getAttribute("collapsed") &&
!gStatusbar.getAttribute("hidden"));
// document.getElementById("tt-toolbar-properties")
// .setAttribute("disabled", isStatusbar ? true : false);
// Empty the menu
for(i = popup.childNodes.length-1; i >= 0; --i) {
var deadItem = popup.childNodes[i];
if(deadItem.hasAttribute("toolbarid"))
popup.removeChild(deadItem);
}
var firstMenuItem = popup.firstChild;
var toolboxIds = [];
var toolboxes = document.getElementsByTagName('toolbox');
for(var z = 0; z < toolboxes.length; z++)
toolboxIds.push(toolboxes[z].getAttribute('id'));
toolboxIds.push("tt-toolbox-belowtabs");
for(var j = 0; j < toolboxIds.length; j++) {
var toolbox = document.getElementById(toolboxIds[j]);
if(toolbox) {
for (i = 0; i < toolbox.childNodes.length; ++i) {
var toolbar = toolbox.childNodes[i];
var toolbarName = toolbar.getAttribute("toolbarname");
var type = toolbar.getAttribute("type");
// inkl. Fix f�r PersonalMenu (CompactMenu)
// => ansonsten kann die Men�leiste nicht �ber das Kontextmen� deaktiviert werden
if(toolbarName && (type != "menubar" || typeof CompactMenuCE == "object")) {
var menuItem = document.createElement("menuitem");
menuItem.setAttribute("toolbarid", toolbar.id);
menuItem.setAttribute("type", "checkbox");
menuItem.setAttribute("label", toolbarName);
menuItem.setAttribute("accesskey", toolbar.getAttribute("accesskey"));
// Fix f�r z.B. Google-Toolbar
menuItem.setAttribute("checked", !toolbar.getAttribute("collapsed") &&
!toolbar.getAttribute("hidden"));
popup.insertBefore(menuItem, firstMenuItem);
menuItem.addEventListener("command", onViewToolbarCommand, false);
}
toolbar = toolbar.nextSibling;
}
}
}
return;
}
/* Rewritten to be based on toolbar ids rather than the toolbarindex */
onViewToolbarCommand = function (aEvent) {
var id = aEvent.originalTarget.getAttribute("toolbarid");
var toolbar = document.getElementById(id);
var hide = !aEvent.originalTarget.getAttribute("checked");
toolbar.parentNode.hideToolbar(toolbar, hide);
tt_adjustToolboxWidth(true);
}
PK
xU8/ O O chrome/content/totaltoolbar.xml
falsenullnull0
return Components.interfaces.nsIAccessibleProvider.XULToolbar;
null
null
nullPK
xU82;w* w* chrome/content/totaltoolbar.xul
%browserDTD;
%totaltoolbarDTD;
%ttDTDnew;
]>
PK
xU8ð
( chrome/content/totaltoolbar_customize.js
/** All functions below are modified from native Fx Customize code
* in ../toolkit/customizeToolbar.js, v1.43. The major changes are to wrap
* functions in a for(){} loop to handle multiple toolboxes, to change the
* reference from the single gToolbox to multiple toolbox elements within the
* loop, support for statusbar as a toolbar.
*/
InitWithToolbox = function (aToolbox) {
gToolbox = aToolbox;
gToolboxDocument = gToolbox.ownerDocument;
// Pass the full array of toolboxes as the 2nd argument so as not to
// break any other xul app (extension) using customisable toolbars
// Note: statusbar is both a 'toolbox' and a 'toolbar' here..
gToolboxes = (window.arguments && window.arguments.length > 1) ?
window.arguments[1] : [gToolbox];
gStatusbarMode = gToolboxes[0].localName == "statusbar" ? true : false;
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator);
var win = wm.getMostRecentWindow("navigator:browser");
if(win) {
gStatusbar = win.document.getElementById("status-bar");
gNavToolbox = win.getNavToolbox();
}
for(var i = 0; i < gToolboxes.length; i++) {
gToolboxes[i].addEventListener("draggesture", onToolbarDragGesture, false);
gToolboxes[i].addEventListener("dragover", onToolbarDragOver, false);
gToolboxes[i].addEventListener("dragexit", onToolbarDragExit, false);
gToolboxes[i].addEventListener("dragdrop", onToolbarDragDrop, false);
// For css styling of min-width etc.
gToolboxes[i].setAttribute("incustomisemode", true);
}
if (gStatusbarMode) {
gToolbox = gStatusbar;
var dd = gStatusbar.getAttribute("ondragdrop");
if (dd) {
gStatusbar.setAttribute("tt_ondragdrop", dd);
gStatusbar.removeAttribute("ondragdrop");
}
}
initDialog();
}
function initDialog()
{
// Move box into groupbox..
var globalBox = document.getElementById("smallicons").parentNode;
document.getElementById("tt-globalGroup").appendChild(globalBox);
document.getElementById("smallicons").setAttribute("flex", 1);
if (!gStatusbarMode) {
var mode = gToolbox.getAttribute("mode");
document.getElementById("modelist").value = mode;
gToolboxIconSize = gToolbox.getAttribute("iconsize");
var smallIconsCheckbox = document.getElementById("smallicons");
smallIconsCheckbox.checked = gToolboxIconSize == "small";
if (mode == "text")
smallIconsCheckbox.disabled = true;
// Hide global groupbox description for other apps (Console2 eg)
if(window.opener.top.windowType != "navigator:browser")
document.getElementById("tt-globalDesc").setAttribute("hidden", true);
// Unset fixed width for vertical toolboxes while in Customize
if(window.opener && window.opener.top &&
typeof window.opener.top.tt_adjustToolboxWidth == "function")
window.opener.top.tt_adjustToolboxWidth(false);
}
else {
var stringBundle = document.getElementById("totaltoolbarBundle");
var title = stringBundle.getString("dialog.title.statusbar");
document.title = title;
var instructions = stringBundle.getString("instructions.description.statusbar");
document.getElementById("instructions").setAttribute("value", instructions);
document.getElementById("tt-globalGroupDeck").setAttribute("selectedIndex", 1);
}
// Build up the palette of other items.
buildPalette();
// Wrap all the items on the toolbar in toolbarpaletteitems.
wrapToolbarItems();
}
repositionDialog = function () {
// Always use persisted dimensions and position!
return;
}
removeToolboxListeners = function () {
for(var i = 0; i < gToolboxes.length; i++) {
gToolboxes[i].removeEventListener("draggesture", onToolbarDragGesture, false);
gToolboxes[i].removeEventListener("dragover", onToolbarDragOver, false);
gToolboxes[i].removeEventListener("dragexit", onToolbarDragExit, false);
gToolboxes[i].removeEventListener("dragdrop", onToolbarDragDrop, false);
gToolboxes[i].removeAttribute("incustomisemode");
}
}
/**
* Invoke a callback on the toolbox to notify it that the dialog is done
* and going away.
*/
notifyParentComplete = function () {
for(var i = 0; i < gToolboxes.length; i++) {
if("customizeDone" in gToolboxes[i]) gToolboxes[i].customizeDone(gToolboxChanged);
}
}
/**
* Persist the current set of buttons in all customizable toolbars to
* localstore.
*/
//TODO: make reusable function
function persistCurrentSets() {
if (!gToolboxChanged)
return;
docElt = gToolboxDocument.documentElement;
for(var j = 0; j < gToolboxes.length; j++) {
var toolbox = gToolboxes[j];
var len = (gStatusbarMode) ? gToolboxes.length : gToolboxes[j].childNodes.length;
var customCount = 0;
var toolboxEmpty = true;
for(var i = 0; i < len; ++i) {
// Look for customizable toolbars that need to be persisted.
var toolbar = (gStatusbarMode) ?
toolbox : (toolbox.childNodes ? toolbox.childNodes[i] : null);
if (isCustomizableToolbar(toolbar)) {
// Calculate currentset and store it in the attribute.
var currentSet = toolbar.currentSet;
toolbar.setAttribute("currentset", currentSet);
var customIndex = toolbar.hasAttribute("customindex");
if (customIndex) {
if (!toolbar.firstChild) {
// Remove any options from root doc and
handleOptions("remove", toolbar);
// Remove custom toolbars whose contents have been removed.
toolbox.removeChild(toolbar);
--i;
}
else {
toolboxEmpty = false;
if(toolbox.toolbarset.hasAttribute('anonymous')) {
if (currentSet != "__empty") {
// Must persist xbl 'below-tabs' toolbar on the document root
var attrPrefix = '_toolbarset.' + toolbox.toolbarset.getAttribute('id') + '.toolbar';
docElt.setAttribute(attrPrefix+(++customCount), toolbar.toolbarName + ":" + currentSet);
toolbar.setAttribute("customindex", customCount); //adjust count
gToolboxDocument.persist(docElt.id, attrPrefix+customCount);
}
}
else {
// Persist custom toolbar info on the
toolbox.toolbarset.setAttribute("toolbar"+(++customCount),
toolbar.toolbarName + ":" + currentSet);
toolbar.setAttribute("customindex", customCount); //adjust count
gToolboxDocument.persist(toolbox.toolbarset.id, "toolbar"+customCount);
}
}
}
if (!customIndex) {
if (!toolbar.firstChild)
// Remove any options from root doc
handleOptions("remove", toolbar);
else
toolboxEmpty = false;
if (currentSet != "__empty" || toolbar.hasAttribute("defaultset")) {
if(toolbar.hasAttribute('anonymous')) {
// Must persist xbl tabbar toolbars on the document root
var attr = "_toolbar."+toolbar.getAttribute('id')+".currentset";
docElt.setAttribute(attr, currentSet);
gToolboxDocument.persist(gToolboxDocument.documentElement.id, attr);
}
}
else
if (!toolbar.hasAttribute("defaultset"))
toolbar.removeAttribute("currentset");
// Persist the currentset attribute directly on hardcoded toolbars.
gToolboxDocument.persist(toolbar.id, "currentset");
}
}
}
// Number of remaining toolbars in toolbox
toolbox.customToolbarCount = customCount;
setAttribute(toolbox, "empty", toolboxEmpty);
gToolboxDocument.persist(toolbox.id, "empty");
// Remove toolbarX attributes from toolbarset for removed toolbars, ie any
// entries past those for toolbars already indexed..
if(toolbox.toolbarset) {
if(toolbox.toolbarset.hasAttribute('anonymous')) {
var attrPrefix = '_toolbarset.' + toolbox.toolbarset.getAttribute('id') + '.toolbar';
while (docElt.hasAttribute(attrPrefix+(++customCount))) {
docElt.removeAttribute(attrPrefix+customCount);
gToolboxDocument.persist(docElt.id, attrPrefix+customCount);
}
}
else {
while (toolbox.toolbarset.hasAttribute("toolbar"+(++customCount))) {
toolbox.toolbarset.removeAttribute("toolbar"+customCount);
gToolboxDocument.persist(toolbox.toolbarset.id, "toolbar"+customCount);
}
}
}
}
// Set fixed width for vertical toolboxes, for sidebar slider to work right
if(window.opener && window.opener.top &&
typeof window.opener.top.tt_adjustToolboxWidth == "function")
window.opener.top.tt_adjustToolboxWidth(true);
}
/**
* Wraps all items in all customizable toolbars in a toolbox.
*/
wrapToolbarItems = function () {
if (gStatusbarMode)
window.opener.top.document.getElementById("statusbar-spacer").setAttribute("flex", 1);
for(var j = 0; j < gToolboxes.length; j++) {
var toolbox = (gStatusbarMode) ? gToolboxes : gToolboxes[j];
var len = (gStatusbarMode) ? gToolboxes.length : gToolboxes[j].childNodes.length;
for(var i = 0; i < len; ++i) {
var toolbar = (gStatusbarMode) ?
toolbox[i] : (toolbox.childNodes ? toolbox.childNodes[i] : null);
if(isCustomizableToolbar(toolbar)) {
for(var k = 0; k < toolbar.childNodes.length; ++k) {
var item = toolbar.childNodes[k];
if(isToolbarItem(item)) {
var nextSibling = item.nextSibling;
var wrapper = wrapToolbarItem(item);
if(nextSibling)
toolbar.insertBefore(wrapper, nextSibling);
else
toolbar.appendChild(wrapper);
cleanupItemForToolbar(item, wrapper);
}
}
}
}
}
}
/**
* Unwraps all items in all customizable toolbars in a toolbox.
*/
unwrapToolbarItems = function () {
for(var j = 0; j < this.gToolboxes.length; j++) {
var toolbox = gToolboxes[j];
var paletteItems = toolbox.getElementsByTagName("toolbarpaletteitem");
var paletteItem;
while ((paletteItem = paletteItems.item(0)) != null) {
var toolbarItem = paletteItem.firstChild;
if (paletteItem.hasAttribute("itemdisabled"))
toolbarItem.disabled = true;
if (paletteItem.hasAttribute("itemhidden"))
toolbarItem.hidden = true;
if (paletteItem.hasAttribute("itemcollapsed"))
toolbarItem.collapsed = true;
// Remove label child from statusbarpanel item, if added..
if (paletteItem.hasAttribute("itemlabelled")) {
if (toolbarItem.getAttribute("class") == "statusbarpanel-iconic-text")
toolbarItem.removeAttribute("label");
else
toolbarItem.removeChild(toolbarItem.lastChild);
}
// Restore style if any, remove forced display
toolbarItem.removeAttribute("style");
if (paletteItem.hasAttribute("itemstyle"))
toolbarItem.setAttribute("style", paletteItem.getAttribute("itemstyle"));
if (paletteItem.hasAttribute("itemcommand"))
toolbarItem.setAttribute("command", paletteItem.getAttribute("itemcommand"));
paletteItem.parentNode.replaceChild(toolbarItem, paletteItem);
}
}
if (gStatusbarMode)
window.opener.top.document.getElementById("statusbar-spacer").setAttribute("flex", 0);
}
/**
* Wraps an item that is currently on a toolbar and replaces the item
* with the wrapper. This is not used when dropping items from the palette,
* only when first starting the dialog and wrapping everything on the toolbars.
*/
function wrapToolbarItem(aToolbarItem)
{
var wrapper = createWrapper(aToolbarItem.id);
gToolboxDocument.adoptNode(wrapper);
wrapper.flex = aToolbarItem.localName == "toolbarspring" ? 1 : 0;
if (aToolbarItem.parentNode)
aToolbarItem.parentNode.removeChild(aToolbarItem);
wrapper.appendChild(aToolbarItem);
return wrapper;
}
/**
* Get the list of ids for the current set of items on each toolbar.
*/
getCurrentItemIds = function () {
var currentItems = {};
for(var j = 0; j < gToolboxes.length; j++) {
var toolbox = (gStatusbarMode) ? gToolboxes : gToolboxes[j];
var len = (gStatusbarMode) ? gToolboxes.length : gToolboxes[j].childNodes.length;
for (var i = 0; i < len; ++i) {
var toolbar = (gStatusbarMode) ?
toolbox[i] : (toolbox.childNodes ? toolbox.childNodes[i] : null);
if (isCustomizableToolbar(toolbar)) {
var child = toolbar.firstChild;
while (child) {
if (isToolbarItem(child) && !child.getAttribute("removed"))
currentItems[child.id] = 1;
child = child.nextSibling;
}
}
}
}
return currentItems;
}
/**
* Makes sure that an item that has been cloned from a template
* is stripped of all properties that may adversely affect it's
* appearance in the palette.
*/
function cleanUpItemForPalette(aItem, aWrapper)
{
aWrapper.setAttribute("place", "palette");
setWrapperType(aItem, aWrapper);
if (aItem.hasAttribute("title"))
aWrapper.setAttribute("title", aItem.getAttribute("title"));
else {
if (isSpecialItem(aItem)) {
var stringBundle = document.getElementById("stringBundle");
var title = stringBundle.getString(aItem.id + "Title");
aWrapper.setAttribute("title", title);
}
else if (!(aItem.hasAttribute("label") && (aItem.getAttribute("label") != ""))) {
if (aItem.tooltipText)
aWrapper.setAttribute("title", aItem.tooltipText);
else
aWrapper.setAttribute("title", aItem.id);
}
}
// Remove attributes that screw up our appearance.
aItem.removeAttribute("command");
aItem.removeAttribute("observes");
aItem.removeAttribute("disabled");
aItem.removeAttribute("type");
aItem.removeAttribute("hidden");
aItem.removeAttribute("collapsed");
if (aItem.localName == "toolbaritem" && aItem.firstChild) {
aItem.firstChild.removeAttribute("observes");
// So the throbber doesn't throb in the dialog,
// cute as that may be...
aItem.firstChild.removeAttribute("busy");
}
}
/**
* Makes sure that an item that has been cloned from a template
* is stripped of all properties that may adversely affect it's
* appearance in the toolbar. Store critical properties on the
* wrapper so they can be put back on the item when we're done.
*/
function cleanupItemForToolbar(aItem, aWrapper)
{
setWrapperType(aItem, aWrapper);
aWrapper.setAttribute("place", "toolbar");
if (aItem.hasAttribute("command")) {
aWrapper.setAttribute("itemcommand", aItem.getAttribute("command"));
aItem.removeAttribute("command");
}
if (aItem.hidden) {
aWrapper.setAttribute("itemhidden", true);
aItem.removeAttribute("hidden");
}
if (aItem.collapsed) {
aWrapper.setAttribute("itemcollapsed", true);
aItem.removeAttribute("collapsed");
}
if (aItem.disabled) {
aWrapper.setAttribute("itemdisabled", true);
aItem.disabled = false;
}
if (aItem.minWidth > 0) {
aWrapper.setAttribute("itemminwidth", aItem.minWidth);
aItem.minWidth = 0;
}
if (aItem.hasAttribute("removed")) {
aWrapper.setAttribute("itemremoved", aItem.getAttribute("removed"));
}
// If no width (must allow for border etc incustomizemode), then no label
// or icon, so create label and insert id to identify the thing..
if (aItem.boxObject.width <= 4 && !isSpecialItem(aItem)) {
var id = aItem.id;
// Add a label to statusbarpanel, for difficult to id statusbar items
if (aItem.getAttribute("class") == "statusbarpanel-iconic-text" &&
!aItem.hasAttribute("label"))
aItem.setAttribute("label", aItem.hasAttribute("title") ?
aItem.getAttribute("title") : aItem.id);
else
if (!aItem.hasAttribute("label")) {
var label = document.createElement("label");
gToolboxDocument.adoptNode(label);
aItem.appendChild(label);
aItem.lastChild.setAttribute("value",
aItem.hasAttribute("label") ? aItem.getAttribute("label") :
(aItem.hasAttribute("title") ? aItem.getAttribute("title") :
aItem.id));
aWrapper.setAttribute("itemlabelled", true);
}
}
// Force any "display: none" items to show up.. Set after boxObject check.
if (aItem.hasAttribute("style"))
aWrapper.setAttribute("itemstyle", aItem.getAttribute("style"));
if (!aItem.hasAttribute("removed"))
aItem.setAttribute("style", "display: -moz-box !important");
}
addNewToolbar = function () {
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
.getService(Components.interfaces.nsIPromptService);
var stringBundle = document.getElementById("stringBundle");
var message = stringBundle.getString("enterToolbarName");
var title = stringBundle.getString("enterToolbarTitle");
var name = {};
// Quitting from the toolbar dialog while the new toolbar prompt is up
// can cause things to become unresponsive on the Mac. Until dialog modality
// is fixed (395465), disable the "Done" button explicitly.
var doneButton = document.getElementById("donebutton");
if (doneButton)
doneButton.disabled = true;
while(true) {
if(!promptService.prompt(window, title, message, name, null, {})) {
if (doneButton)
doneButton.disabled = false;
return;
}
if (!name.value) {
message = stringBundle.getFormattedString("enterToolbarBlank", [name.value]);
continue;
}
//TODO: need better error msg string
if (name.value.match(/[^\s|^\w]/g)) {
message = stringBundle.getFormattedString("enterToolbarBlank", [name.value]);
continue;
}
var dupeFound = false;
// Check for an existing toolbar with the same display name
for(var j = 0; j < gToolboxes.length; j++) {
var toolbox = gToolboxes[j];
for(var i = 0; i < toolbox.childNodes.length; ++i) {
var toolbar = toolbox.childNodes[i];
var toolbarName = toolbar.getAttribute("toolbarname");
if (toolbarName == name.value &&
toolbar.getAttribute("type") != "menubar" &&
toolbar.nodeName == 'toolbar') {
dupeFound = true;
break;
}
}
}
if (!dupeFound)
break;
message = stringBundle.getFormattedString("enterToolbarDup", [name.value]);
}
gToolbox.appendCustomToolbar(name.value, "", true);
toolboxChanged();
if (doneButton)
doneButton.disabled = false;
}
/**
* Restore the default set of buttons to fixed toolbars,
* remove all custom toolbars, and rebuild the palette.
*/
restoreDefaultSet = function () {
// Save disabled/command states, because we're
// going to recreate the wrappers and lose this
var savedAttributes = saveItemAttributes(["itemdisabled", "itemcommand"]);
docElt = gToolboxDocument.documentElement;
for(var i = 0; i < gToolboxes.length; i++) {
var toolbox = gToolboxes[i];
if (!gStatusbarMode) {
// Remove all of the customized toolbars.
var child = toolbox.lastChild;
while(child) {
if(child.hasAttribute("customindex")) {
// Clean up any customizations from the root doc
handleOptions("remove", child);
var thisChild = child;
child = child.previousSibling;
toolbox.removeChild(thisChild);
} else {
child = child.previousSibling;
}
}
}
// Restore the default icon size and mode - meaning Fx main toolbox if none
var defaultMode = gToolbox.hasAttribute("defaultmode") ?
gToolbox.getAttribute("defaultmode") :
(gNavToolbox ? gNavToolbox.getAttribute("defaultmode") : null);
var defaultIconsSmall = gToolbox.hasAttribute("defaulticonsize") ?
(gToolbox.getAttribute("defaulticonsize") == "small" ? "small" : "large") :
(gNavToolbox ?
(gNavToolbox.getAttribute("defaulticonsize") == "small" ? "small" : "large") :
"small");
setAttribute(toolbox, "iconsize", defaultIconsSmall);
gToolboxDocument.persist(toolbox.id, "iconsize");
document.getElementById("smallicons").checked = defaultIconsSmall == "small";
document.getElementById("smallicons").disabled = (defaultMode == "text" ? true : false);
setAttribute(toolbox, "mode", defaultMode);
gToolboxDocument.persist(toolbox.id, "mode");
document.getElementById("modelist").value = defaultMode;
if (gStatusbarMode) {
unwrapToolbarItems();
tt_resetStatusbar();
}
else {
// Restore the defaultset for fixed toolbars.
var toolbar = toolbox.firstChild;
while (toolbar) {
if(isCustomizableToolbar(toolbar)) {
//// if(!toolbar.hasAttribute("customindex")) {
var defaultSet = toolbar.getAttribute("defaultset");
if(defaultSet || defaultSet == "")
toolbar.currentSet = defaultSet;
//Toolbox has custom binding, otherwise it's some other 3rd party toolbox
if (typeof toolbar.parentNode.setToolbarIconSize == "function")
toolbar.parentNode.setToolbarIconSize(toolbar, defaultIconsSmall);
else
if (toolbar.getAttribute("currentset") != "__empty") {
setAttribute(toolbar, "iconsize", defaultIconsSmall);
gToolboxDocument.persist(toolbar.id, "iconsize");
}
// Toolbox has custom binding, otherwise it's some other 3rd party toolbox
if (typeof toolbar.parentNode.setToolbarMode == "function")
toolbar.parentNode.setToolbarMode(toolbar, defaultMode);
else
if (toolbar.getAttribute("currentset") != "__empty") {
setAttribute(toolbar, "mode", defaultMode);
gToolboxDocument.persist(toolbar.id, "mode");
}
//// }
}
// Show nav-bar and bookmarks toolbar if hidden
if (toolbar.id == "nav-bar" || toolbar.id == "PersonalToolbar")
toolbar.removeAttribute("collapsed");
toolbar = toolbar.nextSibling;
}
}
}
// Now rebuild the palette.
buildPalette();
// Now re-wrap the items on the toolbar.
wrapToolbarItems();
// Restore the disabled and command states
restoreItemAttributes(["itemdisabled", "itemcommand"], savedAttributes);
toolboxChanged();
}
updateIconSize = function (aUseSmallIcons, localDefault) {
gToolboxIconSize = aUseSmallIcons ? "small" : "large";
for(var j = 0; j < gToolboxes.length; j++) {
var toolbox = gToolboxes[j];
setAttribute(toolbox, "iconsize", gToolboxIconSize);
gToolboxDocument.persist(toolbox.id, "iconsize");
for(var i = 0; i < toolbox.childNodes.length; ++i) {
var toolbar = toolbox.childNodes[i];
if(isCustomizableToolbar(toolbar)) {
//Toolbox has custom binding, otherwise it's some other 3rd party toolbox
if (typeof toolbar.parentNode.setToolbarIconSize == "function")
toolbar.parentNode.setToolbarIconSize(toolbar, gToolboxIconSize);
else {
var toolbarIconSize = (localDefault && toolbar.hasAttribute("defaulticonsize")) ?
toolbar.getAttribute("defaulticonsize") :
gToolboxIconSize;
setAttribute(toolbar, "iconsize", toolbarIconSize);
gToolboxDocument.persist(toolbar.id, "iconsize");
}
}
}
}
// Set fixed width for vertical toolboxes, for sidebar slider to work right
if(window.opener && window.opener.top &&
typeof window.opener.top.tt_adjustToolboxWidth == "function")
window.opener.top.tt_adjustToolboxWidth(true);
}
updateToolbarMode = function (aModeValue, localDefault) {
for(var j = 0; j < gToolboxes.length; j++) {
var toolbox = gToolboxes[j];
setAttribute(toolbox, "mode", aModeValue);
gToolboxDocument.persist(toolbox.id, "mode");
for (var i = 0; i < toolbox.childNodes.length; ++i) {
var toolbar = toolbox.childNodes[i];
if (isCustomizableToolbar(toolbar)) {
// Toolbox has custom binding, otherwise it's some other 3rd party toolbox
if (typeof toolbar.parentNode.setToolbarMode == "function")
toolbar.parentNode.setToolbarMode(toolbar, aModeValue);
else {
var toolbarMode = (localDefault && toolbar.hasAttribute("defaultmode")) ?
toolbar.getAttribute("defaultmode") :
aModeValue;
setAttribute(toolbar, "mode", toolbarMode);
gToolboxDocument.persist(toolbar.id, "mode");
}
}
}
}
var iconSizeCheckbox = document.getElementById("smallicons");
iconSizeCheckbox.disabled = aModeValue == "text";
// Set fixed width for vertical toolboxes, for sidebar slider to work right
if(window.opener && window.opener.top &&
typeof window.opener.top.tt_adjustToolboxWidth == "function")
window.opener.top.tt_adjustToolboxWidth(true);
}
function isCustomizableToolbar(aElt)
{
return (aElt) && ((aElt.localName == "toolbar" && aElt.getAttribute("customizable") ||
aElt.localName == "statusbar"));
}
function isToolbarItem(aElt)
{
return aElt.localName == "toolbarbutton" ||
aElt.localName == "toolbaritem" ||
aElt.localName == "toolbarseparator" ||
aElt.localName == "toolbarspring" ||
aElt.localName == "toolbarspacer" ||
aElt.localName == "statusbarpanel";
}
///////////////////////////////////////////////////////////////////////////
//// Drag and Drop observers
var toolbarDNDObserver =
{
onDragOver: function (aEvent, aFlavour, aDragSession)
{
var toolbar = aEvent.target;
var dropTarget = aEvent.target;
while (toolbar && (toolbar.localName != "toolbar" && toolbar.localName != "statusbar")) {
dropTarget = toolbar;
toolbar = toolbar.parentNode;
}
var previousDragItem = gCurrentDragOverItem;
// Make sure we are dragging over a customizable toolbar.
if (!isCustomizableToolbar(toolbar)) {
gCurrentDragOverItem = null;
return;
}
if (dropTarget.localName == "toolbar" || dropTarget.localName == "statusbar") {
gCurrentDragOverItem = dropTarget;
} else {
gCurrentDragOverItem = null;
var direction = window.getComputedStyle(dropTarget.parentNode, null).direction;
var dropTargetCenter = dropTarget.boxObject.x + (dropTarget.boxObject.width / 2);
if (direction == "ltr")
dragAfter = aEvent.clientX > dropTargetCenter;
else
dragAfter = aEvent.clientX < dropTargetCenter;
if (dragAfter) {
gCurrentDragOverItem = dropTarget.nextSibling;
if (!gCurrentDragOverItem)
gCurrentDragOverItem = toolbar;
} else
gCurrentDragOverItem = dropTarget;
}
if (previousDragItem && gCurrentDragOverItem != previousDragItem) {
setDragActive(previousDragItem, false);
}
setDragActive(gCurrentDragOverItem, true);
aDragSession.canDrop = true;
},
onDrop: function (aEvent, aXferData, aDragSession)
{
if (!gCurrentDragOverItem)
return;
setDragActive(gCurrentDragOverItem, false);
var draggedItemId = aXferData.data;
if (gCurrentDragOverItem.id == draggedItemId)
return;
var toolbar = aEvent.target;
while (toolbar.localName != "toolbar" && toolbar.localName != "statusbar")
toolbar = toolbar.parentNode;
var draggedPaletteWrapper = document.getElementById("wrapper-"+draggedItemId);
if (!draggedPaletteWrapper) {
// The wrapper has been dragged from the toolbar.
// Get the wrapper from the toolbar document and make sure that
// it isn't being dropped on itself.
var wrapper = gToolboxDocument.getElementById("wrapper-"+draggedItemId);
if (wrapper == gCurrentDragOverItem)
return;
// Don't allow static kids (e.g., the menubar) to move.
if (wrapper.parentNode.firstPermanentChild && wrapper.parentNode.firstPermanentChild.id == wrapper.firstChild.id)
return;
if (wrapper.parentNode.lastPermanentChild && wrapper.parentNode.lastPermanentChild.id == wrapper.firstChild.id)
return;
// Remove the item from it's place in the toolbar.
wrapper.parentNode.removeChild(wrapper);
// Determine which toolbar we are dropping on.
var dropToolbar = null;
if (gCurrentDragOverItem.localName == "toolbar" ||
gCurrentDragOverItem.localName == "statusbar")
dropToolbar = gCurrentDragOverItem;
else
dropToolbar = gCurrentDragOverItem.parentNode;
// Insert the item into the toolbar.
if (gCurrentDragOverItem != dropToolbar)
dropToolbar.insertBefore(wrapper, gCurrentDragOverItem);
else
dropToolbar.appendChild(wrapper);
} else {
// The item has been dragged from the palette
if (!gStatusbarMode || isSpecialItem(draggedPaletteWrapper.firstChild)) {
// Create a new wrapper for the item. We don't know the id yet.
var wrapper = createWrapper("");
gToolboxDocument.adoptNode(wrapper);
// Ask the toolbar to clone the item's template, place it inside the wrapper, and insert it in the toolbar.
var newItem = toolbar.insertItem(draggedItemId, gCurrentDragOverItem == toolbar ? null : gCurrentDragOverItem, wrapper);
// Prepare the item and wrapper to look good on the toolbar.
cleanupItemForToolbar(newItem, wrapper);
wrapper.id = "wrapper-"+newItem.id;
wrapper.flex = newItem.flex;
}
else {
// Move the item in the statusbar.
var wrapper = gToolboxDocument.getElementById("wrapper-"+draggedItemId);
if (gCurrentDragOverItem != gStatusbar)
gStatusbar.insertBefore(wrapper, gCurrentDragOverItem);
else
gStatusbar.appendChild(wrapper);
wrapper.removeAttribute("itemremoved");
wrapper.firstChild.removeAttribute("removed");
wrapper.firstChild.setAttribute("style", "display: -moz-box !important");
}
// Remove the wrapper from the palette.
var currentRow = draggedPaletteWrapper.parentNode;
if (draggedItemId != "separator" &&
draggedItemId != "spring" &&
draggedItemId != "spacer") {
currentRow.removeChild(draggedPaletteWrapper);
while (currentRow) {
// Pull the first child of the next row up
// into this row.
var nextRow = currentRow.nextSibling;
if (!nextRow) {
var last = currentRow.lastChild;
var first = currentRow.firstChild;
if (first == last) {
// Kill the row.
currentRow.parentNode.removeChild(currentRow);
break;
}
if (last.localName == "spacer") {
var flex = last.getAttribute("flex");
last.setAttribute("flex", ++flex);
// Reflow doesn't happen for some reason. Trigger it with a hide/show. ICK! -dwh
last.hidden = true;
last.hidden = false;
break;
}
else {
// Make a spacer and give it a flex of 1.
var spacer = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"spacer");
spacer.setAttribute("flex", "1");
currentRow.appendChild(spacer);
}
break;
}
currentRow.appendChild(nextRow.firstChild);
currentRow = currentRow.nextSibling;
}
}
}
gCurrentDragOverItem = null;
toolboxChanged();
},
_flavourSet: null,
getSupportedFlavours: function ()
{
if (!this._flavourSet) {
this._flavourSet = new FlavourSet();
var documentId = gToolboxDocument.documentElement.id;
this._flavourSet.appendFlavour("text/toolbarwrapper-id/"+documentId);
}
return this._flavourSet;
}
}
var paletteDNDObserver =
{
onDragOver: function (aEvent, aFlavour, aDragSession)
{
aDragSession.canDrop = true;
},
onDrop: function(aEvent, aXferData, aDragSession)
{
var itemId = aXferData.data;
var wrapper = gToolboxDocument.getElementById("wrapper-"+itemId);
if (wrapper && !wrapper.getAttribute("itemremoved")) {
// Don't allow static kids (e.g., the menubar) to move.
if (wrapper.parentNode.firstPermanentChild && wrapper.parentNode.firstPermanentChild.id == wrapper.firstChild.id)
return;
if (wrapper.parentNode.lastPermanentChild && wrapper.parentNode.lastPermanentChild.id == wrapper.firstChild.id)
return;
// The item was dragged out of the toolbar.
if (gStatusbarMode && !isSpecialItem(wrapper.firstChild)) {
wrapper.firstChild.setAttribute("removed", true);
wrapper.setAttribute("itemremoved", true);
wrapper.firstChild.removeAttribute("style");
}
else
wrapper.parentNode.removeChild(wrapper);
var wrapperType = wrapper.getAttribute("type");
if (wrapperType != "separator" &&
wrapperType != "spacer" &&
wrapperType != "spring") {
// Find the template node in the toolbox palette
var templateNode = gToolbox.palette.firstChild;
while (templateNode) {
if (templateNode.id == itemId)
break;
templateNode = templateNode.nextSibling;
}
if (!templateNode)
return;
// Clone the template and add it to our palette.
var paletteItem = templateNode.cloneNode(true);
appendPaletteItem(paletteItem);
}
}
toolboxChanged();
},
_flavourSet: null,
getSupportedFlavours: function ()
{
if (!this._flavourSet) {
this._flavourSet = new FlavourSet();
var documentId = gToolboxDocument.documentElement.id;
this._flavourSet.appendFlavour("text/toolbarwrapper-id/"+documentId);
}
return this._flavourSet;
}
}
PK
xU8& ) chrome/content/totaltoolbar_customize.xul
%customizeToolbarDTD;
%ttDTD;
%ttDTDnew;
]>
&config.instructions.description;
&config.instructions.description.statusbar;
PK
xU8Vi~ ~ ! chrome/locale/ar/totaltoolbar.dtd
PK
xU8*,X ( chrome/locale/ar/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=خصص وأدرج أشرطة أدوات متعددة في أى مكان. أيضأً يمكنك تخصيص شريط الحالة.
dialog.title.statusbar=تخصيص شريط الحالة
instructions.description.statusbar=يمكنك أن تضيف أو تزيل العناصر عن طريق السحب والإسقاط من وإلى شريط الحالة.
PK
xU8SE E $ chrome/locale/be-BY/totaltoolbar.dtd
PK
xU8P= + chrome/locale/be-BY/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Customize and place multiple toolbars almost anywhere. Customize statusbar too.
dialog.title.statusbar=Customize Statusbar
instructions.description.statusbar=You can add or remove items by dragging to or from the statusbar.
PK
xU8oI> > $ chrome/locale/cs-CZ/totaltoolbar.dtd
PK
xU8P= + chrome/locale/cs-CZ/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Customize and place multiple toolbars almost anywhere. Customize statusbar too.
dialog.title.statusbar=Customize Statusbar
instructions.description.statusbar=You can add or remove items by dragging to or from the statusbar.
PK
xU8Yҳ $ chrome/locale/da-DK/totaltoolbar.dtd
PK
xU8P= + chrome/locale/da-DK/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Customize and place multiple toolbars almost anywhere. Customize statusbar too.
dialog.title.statusbar=Customize Statusbar
instructions.description.statusbar=You can add or remove items by dragging to or from the statusbar.
PK
xU8Q& $ chrome/locale/de-DE/totaltoolbar.dtd
PK
xU8WĹm m + chrome/locale/de-DE/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Ermöglicht die vielfältige Konfiguration der Symbolleisten und die Platzierung fast überall im Browser. Ermöglicht weiterhin die Konfiguration der Statusleiste.
dialog.title.statusbar=Statusleiste anpassen...
instructions.description.statusbar=Sie können Symbole in die Statusleiste ziehen, um sie hinzuzufügen.
PK
xU8$
$
$ chrome/locale/el-GR/totaltoolbar.dtd
PK
xU8g + chrome/locale/el-GR/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Προσαρμόστε και τοποθετήστε πολλαπλές εργαλειοθήκες ή και τη γραμμή κατάστασης οπουδήποτε
dialog.title.statusbar=Προσαρμογή γραμμής κατάστασης
instructions.description.statusbar=Μπορείτε να προσθέσετε ή να αφαιρέσετε αντικείμενα σέρνοντας τα από ή προς την εργαλειοθήκη.
PK
xU8e e $ chrome/locale/en-GB/totaltoolbar.dtd
PK
xU8P= + chrome/locale/en-GB/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Customize and place multiple toolbars almost anywhere. Customize statusbar too.
dialog.title.statusbar=Customize Statusbar
instructions.description.statusbar=You can add or remove items by dragging to or from the statusbar.
PK
xU8e e $ chrome/locale/en-US/totaltoolbar.dtd
PK
xU8P= + chrome/locale/en-US/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Customize and place multiple toolbars almost anywhere. Customize statusbar too.
dialog.title.statusbar=Customize Statusbar
instructions.description.statusbar=You can add or remove items by dragging to or from the statusbar.
PK
xU8E^T` $ chrome/locale/es-AR/totaltoolbar.dtd
PK
xU8P۵c c + chrome/locale/es-AR/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Personalizar y colocar multiples barras de herramientas prácticamente en cualquier parte. Personalizar la barra de estado tambien
dialog.title.statusbar=Personalizar la barra de estado
instructions.description.statusbar=Puede agregar o remover elementos arrastrándolos hacia o fuera de la barra de estado.
PK
xU8u~/ / $ chrome/locale/es-ES/totaltoolbar.dtd
PK
xU89=# # + chrome/locale/es-ES/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Permite personalizar y colocar diferentes barras de herramientas personalizadas.
dialog.title.statusbar=Customize Statusbar
instructions.description.statusbar=Puede añadir o eliminar elementos arrastrándolos desde o hasta la barra de estado.
PK
xU85M2 2 $ chrome/locale/fi-FI/totaltoolbar.dtd
PK
xU8.]#, , + chrome/locale/fi-FI/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Muokkaa ja aseta useita työkalupalkkeja lähes minne tahansa. Voit muokata myös tilariviä
dialog.title.statusbar=Muokkaa tilariviä
instructions.description.statusbar=Voit lisätä tai poistaa kohteita vetämällä niitä tilariviin tai pois siitä.
PK
xU8 f $ chrome/locale/fr-FR/totaltoolbar.dtd
PK
xU8S 7i i + chrome/locale/fr-FR/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Personnalisez et disposez de multiples barres d'outils presque partout. Personnalisez également la barre de statut.
dialog.title.statusbar=Personnalisation de la barre d'état
instructions.description.statusbar=Vous pouvez ajouter ou retirer des éléments en les faisant glisser vers ou depuis la barre d'état.
PK
xU8)gU $ chrome/locale/he-IL/totaltoolbar.dtd
PK
xU8 + chrome/locale/he-IL/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=התאם אישית ומקם סרגלי כלים מרובים כמעט בכל מקום. מתאים אישית גם את שורת המצב.
dialog.title.statusbar=התאם אישית את שורת המצב
instructions.description.statusbar=ניתן להוסיף ולהוריד פריטים ע"י גרירתם אל או מ שורת המצב.
PK
xU8ㅤ $ chrome/locale/hr-HR/totaltoolbar.dtd
PK
xU8P= + chrome/locale/hr-HR/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Customize and place multiple toolbars almost anywhere. Customize statusbar too.
dialog.title.statusbar=Customize Statusbar
instructions.description.statusbar=You can add or remove items by dragging to or from the statusbar.
PK
xU8$ $ $ chrome/locale/hu-HU/totaltoolbar.dtd
PK
xU8-3R R + chrome/locale/hu-HU/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Több eszköztár testreszabását vagy áthelyezését segítő eszköz. Testreszabhatja az állapotsort is.
dialog.title.statusbar=Állapotsor testreszabása
instructions.description.statusbar=Az állapotsor elemek elrejthetőek vagy megjeleníthetőek ráhúzással vagy lehúzással.
PK
xU8Wm $ chrome/locale/it-IT/totaltoolbar.dtd
PK
xU8&j'F< < + chrome/locale/it-IT/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Permette di personalizzare e posizionare molteplici barre degli strumenti e di personalizzare anche la barra di stato
dialog.title.statusbar=Personalizza la barra di stato
instructions.description.statusbar=Trascinare un oggetto sulla barra di stato per aggiungerlo
PK
xU85gF F ! chrome/locale/ja/totaltoolbar.dtd
PK
xU8q' ' $ chrome/locale/ja-JP/totaltoolbar.dtd
PK
xU8P= + chrome/locale/ja-JP/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Customize and place multiple toolbars almost anywhere. Customize statusbar too.
dialog.title.statusbar=Customize Statusbar
instructions.description.statusbar=You can add or remove items by dragging to or from the statusbar.
PK
xU8($L L $ chrome/locale/ko-KR/totaltoolbar.dtd
PK
xU83[X X + chrome/locale/ko-KR/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=도구 막대의 위치를 아무 곳으로든 옮길 수 있습니다. 상태 막대 설정도 가능합니다.
dialog.title.statusbar=상태 막대 설정
instructions.description.statusbar=마우스의 끌어다 놓기로 상태 막대 항목들을 추가 또는 제거할 수 있습니다.
PK
xU8G $ chrome/locale/lt-LT/totaltoolbar.dtd
PK
xU8P= + chrome/locale/lt-LT/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Customize and place multiple toolbars almost anywhere. Customize statusbar too.
dialog.title.statusbar=Customize Statusbar
instructions.description.statusbar=You can add or remove items by dragging to or from the statusbar.
PK
xU83Z $ chrome/locale/nb-NO/totaltoolbar.dtd
PK
xU8#g, , + chrome/locale/nb-NO/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Tilpass og plasser flere verktøylinjen nesten hvor som helst. Statuslinjen kan også tilpasses.
dialog.title.statusbar=Tilpass statuslinjen
instructions.description.statusbar=Du kan legge til og fjerne elementer ved å dra dem til og fra statuslinjen.
PK
xU8 $ chrome/locale/nl-NL/totaltoolbar.dtd
PK
xU8* * + chrome/locale/nl-NL/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Plaats meerdere werkbalken, bijna overal, of pas huidige aan. Inclusief de statusbalk.
dialog.title.statusbar=Statusbalk aanpassen
instructions.description.statusbar=U kunt item toevoegen of verwijderen door ze van of naar de statusbalk te slepen.
PK
xU8F0p p $ chrome/locale/pl-PL/totaltoolbar.dtd
PK
xU8e:H H + chrome/locale/pl-PL/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Pozwala dostosować oraz umieścić w wielu miejscach paski narzędziowe, a także dostosować pasek stanu
dialog.title.statusbar=Dostosuj pasek stanu
instructions.description.statusbar=Można dodawać lub usuwać elementy przeciągając je na pasek stanu lub z paska do zasobnika
PK
xU8< $ chrome/locale/pt-BR/totaltoolbar.dtd
PK
xU8P= + chrome/locale/pt-BR/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Customize and place multiple toolbars almost anywhere. Customize statusbar too.
dialog.title.statusbar=Customize Statusbar
instructions.description.statusbar=You can add or remove items by dragging to or from the statusbar.
PK
xU86# # $ chrome/locale/pt-PT/totaltoolbar.dtd
PK
xU8B B + chrome/locale/pt-PT/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Personalizar e colocar múltiplas barras de estado em qualquer lugar. Personalizar também a barra de estado.
dialog.title.statusbar=Personalizar a barra de estado
instructions.description.statusbar=Pode adicionar ou remover itens arrastando-os de ou para a barra de estado.
PK
xU8˧ $ chrome/locale/ru-RU/totaltoolbar.dtd
PK
xU8A# # + chrome/locale/ru-RU/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Настройка и расположение множества панелей инструментов практически в любом положении, а также настройка строки состояния.
dialog.title.statusbar=Настройка строки состояния
instructions.description.statusbar=Вы можете добавлять или удалять значки, перетаскивая их на строку состояния и обратно.
PK
xU8L L $ chrome/locale/sk-SK/totaltoolbar.dtd
PK
xU8al l + chrome/locale/sk-SK/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Umožňuje prispôsobenie a umiestnenie viacerých panelov s nástrojmi takmer všade. Tiež umožňuje prispôsobenie stavového riadka.
dialog.title.statusbar=Prispôsobiť stavový riadok
instructions.description.statusbar=Môžete pridať alebo odobrať položky ich potiahnutím z alebo do stavového riadka.
PK
xU8q>: $ chrome/locale/sv-SE/totaltoolbar.dtd
PK
xU8P= + chrome/locale/sv-SE/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Customize and place multiple toolbars almost anywhere. Customize statusbar too.
dialog.title.statusbar=Customize Statusbar
instructions.description.statusbar=You can add or remove items by dragging to or from the statusbar.
PK
xU8+) $ chrome/locale/tr-TR/totaltoolbar.dtd
PK
xU8 k + chrome/locale/tr-TR/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Bir çok araç çubuğunu kişiselleştirebilir ve herhangi bir yere yerleştirebilir.
dialog.title.statusbar=Durum Çubuğunu Kişiselleştir
instructions.description.statusbar=Durum çubuğuna itemleri ekleyebilir yada kaldırabilir.
PK
xU8a T $ chrome/locale/uk-UA/totaltoolbar.dtd
PK
xU8j + chrome/locale/uk-UA/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Налаштовуйте та розташовуйте множини панелей практично будь-де. Також налаштовуйте рядок стану.
dialog.title.statusbar=Налаштування Statusbar
instructions.description.statusbar=Елементи можна додавати або вилучати перетягуванням до або з рядка стану.
PK
xU8@j $ chrome/locale/zh-CN/totaltoolbar.dtd
PK
xU8x! + chrome/locale/zh-CN/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=定制和放置多个工具栏到任何地方。当然也可以定制状态栏。
dialog.title.statusbar=定制状态栏
instructions.description.statusbar=您可以通过拖拽在状态栏上添加或移除条目。
PK
xU8FGo&| | $ chrome/locale/zh-TW/totaltoolbar.dtd
PK
xU8P= + chrome/locale/zh-TW/totaltoolbar.propertiesextensions.totaltoolbar@mozdev.org.description=Customize and place multiple toolbars almost anywhere. Customize statusbar too.
dialog.title.statusbar=Customize Statusbar
instructions.description.statusbar=You can add or remove items by dragging to or from the statusbar.
PK
xU8F # chrome/skin/global/totaltoolbar.css
/* Binding to add toolbar to start and end of tabs bar */
#appcontent .tabs-container {
-moz-binding: url(chrome://totaltoolbar/content/totaltoolbar.xml#tabscontainer-toolbars) !important;
-moz-box-orient: horizontal !important;
height: auto !important; /* Flock-Fix */
}
/* Binding to add toolbar below the tabbar */
#appcontent .tabbrowser-strip {
-moz-binding: url(chrome://totaltoolbar/content/totaltoolbar.xml#tabbrowserstrip-toolbars) !important;
-moz-box-orient: horizontal !important;
height: auto !important; /* Flock-Fix */
}
/* Binding for all toolboxes with palette */
toolbox[palette] {
-moz-binding: url(chrome://totaltoolbar/content/totaltoolbar.xml#customisable-toolbox);
}
/* Binding for toolbar and statusbar with palette */
toolbox[palette] > toolbar,
statusbar[palette] {
-moz-binding: url(chrome://totaltoolbar/content/totaltoolbar.xml#toolbar);
}
/* Binding for paletteitems in vertical toolboxes in customize mode, uses vbox, need for separators */
toolbox[vertical="true"] > toolbar > toolbarpaletteitem[place="toolbar"] {
-moz-binding: url(chrome://totaltoolbar/content/totaltoolbar.xml#toolbarpaletteitem-vertical);
}
/*
T O O L B O X E N U N D T O O L B A R S
*/
toolbox:not([empty="true"]) + label {
display: none;
}toolbox[horizontal="true"] {
border: none;
}
toolbox:not([vertical="true"])[incustomisemode="true"] > toolbar {
margin: 0px 3px;
}
toolbox[vertical="true"] {
-moz-box-orient: horizontal;
border: none;
}
toolbox[vertical="true"][incustomisemode="true"] > toolbar {
margin: 2px 0px;
}
toolbox[vertical="true"] > toolbar {
-moz-box-orient: vertical;
padding-top: 0px;
min-width: 15px;
border-bottom: none;
}
#tt-toolbox-headerbottom > toolbar {
border-bottom: 1px solid ThreedShadow !important;
}
#tt-toolbox-left > toolbar,
#tt-toolbox-sidebarright > toolbar {
-moz-appearance: none !important;
border-right: 1px solid ThreedShadow !important;
}
#tt-toolbox-sidebarbottom > toolbar,
#tt-toolbox-belowbrowser > toolbar,
#tt-toolbox-bottom > toolbar {
border-top: 1px solid ThreedShadow !important;
border-bottom: none;
}
#tt-toolbox-right > toolbar {
-moz-appearance: none !important;
border-left: 1px solid ThreedShadow !important;
}
/*
T O O L B A R B U T T O N S
*/
/* Flexible buttons */
toolbox > toolbar[flexbuttons="true"] toolbarbutton {
-moz-box-flex: 1;
}
/* Vertikale */
toolbox[vertical=true] toolbar toolbarbutton,
toolbarpaletteitem[place="palette"] {
-moz-box-orient: vertical !important;
}
toolbox[vertical=true] toolbar dropmarker {
-moz-box-pack: center;
}
/*
S E P A R A T O R (normal und im Konfigurationsmodus)
*/
toolbox[vertical=true] > toolbar toolbarseparator,
toolbox[vertical=true] > toolbar > toolbarpaletteitem[place=toolbar] toolbarseparator {
margin: 2px 2px 1px 2px;
padding: 0px;
height: 2px;
max-height: 2px;
border: none;
border-top: 1px solid ThreeDShadow;
border-bottom: 1px solid ThreeDHighlight;
}
/*
T O O L B A R S P A C E R (normal und im Konfigurationsmodus)
*/
toolbox[vertical=true] > toolbar > toolbarpaletteitem[place=toolbar] toolbarspacer,
toolbox[vertical=true] > toolbar toolbarspacer {
height: 13px;
}
/*
D R A G & D R O P M A R K I E R U N G (Konfigurationsmodus)
*/
toolbox[vertical=true] > toolbar toolbarpaletteitem[place=toolbar] {
margin: -2px 0px;
border: none;
border-top: 2px solid transparent;
border-bottom: 2px solid transparent;
}
toolbox[vertical=true] > toolbar toolbarpaletteitem[dragover="left"] {
border-color: transparent;
border-top-color: #000000;
}
toolbox[vertical=true] > toolbar toolbarpaletteitem[dragover="right"] {
border-color: transparent;
border-bottom-color: #000000;
}
#statusbar toolbarpaletteitem[dragover="left"] statusbarpanel {
border-color: transparent; margin-left: -2px;
border-left-color: #000000; border-left-width: 2px;
}
/*
T A B B A R
*/
.tt-toolbox-plain, .tt-toolbox-plain > toolbar {
-moz-appearance: none;
margin: 0px;
padding: 0px;
background: transparent;
background-image: none;
border: none;
}
.tt-tabbar-toolbox > toolbar {
background-image: url("chrome://global/skin/icons/tabbrowser-tabs-bkgnd.png") !important;
}
.tt-tabbar-toolbox > toolbar[iconsize="small"] > toolbarbutton {
padding: 2px 5px;
margin: 4px 0px;
}
.tt-tabbar-toolbox toolbar:not([iconsize="small"]) > toolbarbutton {
padding: 0px 3px;
margin: 4px 0px;
}
.tt-tabbar-toolbox toolbar:not([iconsize="small"]) toolbarseparator {
margin-bottom: 3px;
}
.tt-toolbox-plain[incustomisemode="true"] > toolbar {
min-width: 28px;
padding: 0px !important;
border: 1px solid #FF0000 !important;
}
/*
S T A T U S B A R
*/
#status-bar statusbarpanel[removed],
#status-bar toolbarpaletteitem[itemremoved] {
display: none !important;
}
#status-bar[incustomisemode="true"] {
-moz-appearance: none;
border: 1px solid #FF0000 !important;
padding: 1px 1px;
}
#status-bar[incustomisemode="true"] > toolbarpaletteitem {
margin: 0px;
}
#status-bar[incustomisemode="true"] statusbarpanel {
padding: 0px;
}
#status-bar[incustomisemode="true"] statusbarpanel > label[value] {
width: 36px;
min-width: 36px;
margin: 1px !important;
}
#status-bar[incustomisemode="true"] statusbarpanel label[value] {
max-width: 36px;
}
.statusbar-resizerpanel {
-moz-appearance: none;
border-top: 1px solid threedshadow;
}
PK
xU8k
o o defaults/preferences/prefs.jspref("extensions.totaltoolbar@mozdev.org.description", "chrome://totaltoolbar/locale/totaltoolbar.properties");PK
xU8^ chrome.manifestPK
xU88
7 7 install.rdfPK
xU8a a z
chrome/content/totaltoolbar.jsPK
xU8/ O O Io chrome/content/totaltoolbar.xmlPK
xU82;w* w* I chrome/content/totaltoolbar.xulPK
xU8ð
( chrome/content/totaltoolbar_customize.jsPK
xU8& ) Vt chrome/content/totaltoolbar_customize.xulPK
xU8Vi~ ~ ! | chrome/locale/ar/totaltoolbar.dtdPK
xU8*,X ( l chrome/locale/ar/totaltoolbar.propertiesPK
xU8SE E $ B chrome/locale/be-BY/totaltoolbar.dtdPK
xU8P= + ɐ chrome/locale/be-BY/totaltoolbar.propertiesPK
xU8oI> > $ $ chrome/locale/cs-CZ/totaltoolbar.dtdPK
xU8P= + chrome/locale/cs-CZ/totaltoolbar.propertiesPK
xU8Yҳ $ chrome/locale/da-DK/totaltoolbar.dtdPK
xU8P= + chrome/locale/da-DK/totaltoolbar.propertiesPK
xU8Q& $ O chrome/locale/de-DE/totaltoolbar.dtdPK
xU8WĹm m + chrome/locale/de-DE/totaltoolbar.propertiesPK
xU8$
$
$ _ chrome/locale/el-GR/totaltoolbar.dtdPK
xU8g + Ŷ chrome/locale/el-GR/totaltoolbar.propertiesPK
xU8e e $ chrome/locale/en-GB/totaltoolbar.dtdPK
xU8P= + chrome/locale/en-GB/totaltoolbar.propertiesPK
xU8e e $ chrome/locale/en-US/totaltoolbar.dtdPK
xU8P= + chrome/locale/en-US/totaltoolbar.propertiesPK
xU8E^T` $ chrome/locale/es-AR/totaltoolbar.dtdPK
xU8P۵c c + chrome/locale/es-AR/totaltoolbar.propertiesPK
xU8u~/ / $ chrome/locale/es-ES/totaltoolbar.dtdPK
xU89=# # + chrome/locale/es-ES/totaltoolbar.propertiesPK
xU85M2 2 $ o chrome/locale/fi-FI/totaltoolbar.dtdPK
xU8.]#, , + chrome/locale/fi-FI/totaltoolbar.propertiesPK
xU8 f $ X chrome/locale/fr-FR/totaltoolbar.dtdPK
xU8S 7i i + chrome/locale/fr-FR/totaltoolbar.propertiesPK
xU8)gU $ @ chrome/locale/he-IL/totaltoolbar.dtdPK
xU8 + chrome/locale/he-IL/totaltoolbar.propertiesPK
xU8ㅤ $ g chrome/locale/hr-HR/totaltoolbar.dtdPK
xU8P= + T chrome/locale/hr-HR/totaltoolbar.propertiesPK
xU8$ $ $ chrome/locale/hu-HU/totaltoolbar.dtdPK
xU8-3R R + chrome/locale/hu-HU/totaltoolbar.propertiesPK
xU8Wm $ chrome/locale/it-IT/totaltoolbar.dtdPK
xU8&j'F< < + chrome/locale/it-IT/totaltoolbar.propertiesPK
xU85gF F ! f chrome/locale/ja/totaltoolbar.dtdPK
xU8q' ' $ chrome/locale/ja-JP/totaltoolbar.dtdPK
xU8P= + T" chrome/locale/ja-JP/totaltoolbar.propertiesPK
xU8($L L $ # chrome/locale/ko-KR/totaltoolbar.dtdPK
xU83[X X + =+ chrome/locale/ko-KR/totaltoolbar.propertiesPK
xU8G $ , chrome/locale/lt-LT/totaltoolbar.dtdPK
xU8P= + 3 chrome/locale/lt-LT/totaltoolbar.propertiesPK
xU83Z $ O5 chrome/locale/nb-NO/totaltoolbar.dtdPK
xU8#g, , + < chrome/locale/nb-NO/totaltoolbar.propertiesPK
xU8 $ = chrome/locale/nl-NL/totaltoolbar.dtdPK
xU8* * + D chrome/locale/nl-NL/totaltoolbar.propertiesPK
xU8F0p p $ %F chrome/locale/pl-PL/totaltoolbar.dtdPK
xU8e:H H + M chrome/locale/pl-PL/totaltoolbar.propertiesPK
xU8< $ hO chrome/locale/pt-BR/totaltoolbar.dtdPK
xU8P= + FV chrome/locale/pt-BR/totaltoolbar.propertiesPK
xU86# # $ W chrome/locale/pt-PT/totaltoolbar.dtdPK
xU8B B + _ chrome/locale/pt-PT/totaltoolbar.propertiesPK
xU8˧ $ ` chrome/locale/ru-RU/totaltoolbar.dtdPK
xU8A# # + k chrome/locale/ru-RU/totaltoolbar.propertiesPK
xU8L L $ ]n chrome/locale/sk-SK/totaltoolbar.dtdPK
xU8al l + u chrome/locale/sk-SK/totaltoolbar.propertiesPK
xU8q>: $ w chrome/locale/sv-SE/totaltoolbar.dtdPK
xU8P= + ~ chrome/locale/sv-SE/totaltoolbar.propertiesPK
xU8+) $ chrome/locale/tr-TR/totaltoolbar.dtdPK
xU8 k + chrome/locale/tr-TR/totaltoolbar.propertiesPK
xU8a T $ a chrome/locale/uk-UA/totaltoolbar.dtdPK
xU8j + Z chrome/locale/uk-UA/totaltoolbar.propertiesPK
xU8@j $ l chrome/locale/zh-CN/totaltoolbar.dtdPK
xU8x! + ɚ chrome/locale/zh-CN/totaltoolbar.propertiesPK
xU8FGo&| | $ chrome/locale/zh-TW/totaltoolbar.dtdPK
xU8P= + ۢ chrome/locale/zh-TW/totaltoolbar.propertiesPK
xU8F # 6 chrome/skin/global/totaltoolbar.cssPK
xU8k
o o " defaults/preferences/prefs.jsPK H H ̺