[Pkg-mozext-commits] [compactheader] 151/441: New version 1.2.0beta1: Add compatibility with Thunderbird 3.1 beta 2
David Prévot
taffit at moszumanska.debian.org
Wed Mar 18 12:28:53 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository compactheader.
commit 20d9253f2d46f54548e82ee8ff0b7ab86f47667a
Author: joachim.herb <none at none>
Date: Mon Apr 26 20:32:24 2010 +0000
New version 1.2.0beta1:
Add compatibility with Thunderbird 3.1 beta 2
---
chrome.manifest | 38 ++--
chrome/CompactHeader/content-31/CHTMessenger.js | 108 +++++++++++
chrome/CompactHeader/content-31/CHTMessenger.xul | 52 +++++
chrome/CompactHeader/content-31/buttonsOverlay.js | 83 ++++++++
chrome/CompactHeader/content-31/buttonsOverlay.xul | 29 +++
.../compactHeaderOverlay.js | 94 +++++++--
.../content-31/compactHeaderOverlay.xul | 215 +++++++++++++++++++++
.../content-31/customizeToolbarOverlay.xul | 15 ++
chrome/CompactHeader/content-31/preferences.js | 100 ++++++++++
chrome/CompactHeader/content-31/preferences.xul | 38 ++++
.../CompactHeader/content/compactHeaderOverlay.js | 22 ++-
install.rdf | 4 +-
12 files changed, 760 insertions(+), 38 deletions(-)
diff --git a/chrome.manifest b/chrome.manifest
index f2bbeb5..23168d5 100644
--- a/chrome.manifest
+++ b/chrome.manifest
@@ -1,21 +1,23 @@
-content CustomizeHeaderToolbar chrome/CustomizeHeaderToolbar/content/
-
-skin CustomizeHeaderToolbar global chrome/CustomizeHeaderToolbar/skin/global/
-skin CustomizeHeaderToolbar-os classic/1.0 chrome/CustomizeHeaderToolbar/skin/global/
-skin CustomizeHeaderToolbar-os classic/1.0 chrome/CustomizeHeaderToolbar/skin/gnomestripe/ os=Linux
-skin CustomizeHeaderToolbar-os classic/1.0 chrome/CustomizeHeaderToolbar/skin/qute/ os=WINNT
-skin CustomizeHeaderToolbar-os classic/1.0 chrome/CustomizeHeaderToolbar/skin/pinstripe/ os=Darwin
-
-locale CustomizeHeaderToolbar en-US chrome/CustomizeHeaderToolbar/locale/en-US/
-
-overlay chrome://messenger/content/msgHdrViewOverlay.xul chrome://CustomizeHeaderToolbar/content/CHTPaneOverlay.xul
-overlay chrome://global/content/customizeToolbar.xul chrome://CustomizeHeaderToolbar/content/CHTDialogOverlay.xul
-overlay chrome://messenger/content/messenger.xul chrome://CustomizeHeaderToolbar/content/CHTMessenger.xul
-style chrome://global/content/customizeToolbar.xul chrome://messenger/skin/messageHeader.css
-style chrome://global/content/customizeToolbar.xul chrome://CustomizeHeaderToolbar/skin/messageHeader.css
-style chrome://global/content/customizeToolbar.xul chrome://CustomizeHeaderToolbar-os/skin/messageHeader.css
-
-content CompactHeader chrome/CompactHeader/content/
+content CustomizeHeaderToolbar chrome/CustomizeHeaderToolbar/content/ appversion<3.1a1pre
+content CustomizeHeaderToolbar chrome/CompactHeader/content-31/ appversion>=3.1b2
+
+skin CustomizeHeaderToolbar global chrome/CustomizeHeaderToolbar/skin/global/ appversion<3.1a1pre
+skin CustomizeHeaderToolbar-os classic/1.0 chrome/CustomizeHeaderToolbar/skin/global/ appversion<3.1a1pre
+skin CustomizeHeaderToolbar-os classic/1.0 chrome/CustomizeHeaderToolbar/skin/gnomestripe/ os=Linux appversion<3.1a1pre
+skin CustomizeHeaderToolbar-os classic/1.0 chrome/CustomizeHeaderToolbar/skin/qute/ os=WINNT appversion<3.1a1pre
+skin CustomizeHeaderToolbar-os classic/1.0 chrome/CustomizeHeaderToolbar/skin/pinstripe/ os=Darwin appversion<3.1a1pre
+
+locale CustomizeHeaderToolbar en-US chrome/CustomizeHeaderToolbar/locale/en-US/ appversion<3.1a1pre
+
+overlay chrome://messenger/content/msgHdrViewOverlay.xul chrome://CustomizeHeaderToolbar/content/CHTPaneOverlay.xul appversion<3.1a1pre
+overlay chrome://global/content/customizeToolbar.xul chrome://CustomizeHeaderToolbar/content/CHTDialogOverlay.xul appversion<3.1a1pre
+overlay chrome://messenger/content/messenger.xul chrome://CustomizeHeaderToolbar/content/CHTMessenger.xul
+style chrome://global/content/customizeToolbar.xul chrome://messenger/skin/messageHeader.css appversion<3.1a1pre
+style chrome://global/content/customizeToolbar.xul chrome://CustomizeHeaderToolbar/skin/messageHeader.css appversion<3.1a1pre
+style chrome://global/content/customizeToolbar.xul chrome://CustomizeHeaderToolbar-os/skin/messageHeader.css appversion<3.1a1pre
+
+content CompactHeader chrome/CompactHeader/content/ appversion<3.1a1pre
+content CompactHeader chrome/CompactHeader/content-31/ appversion>=3.1b2
skin CompactHeader global chrome/CompactHeader/skin/global/
skin CompactHeader-os classic/1.0 chrome/CompactHeader/skin/common/
diff --git a/chrome/CompactHeader/content-31/CHTMessenger.js b/chrome/CompactHeader/content-31/CHTMessenger.js
new file mode 100644
index 0000000..32823a3
--- /dev/null
+++ b/chrome/CompactHeader/content-31/CHTMessenger.js
@@ -0,0 +1,108 @@
+/*
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla 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/MPL/
+#
+# 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 Communicator client code, released
+# March 31, 1998.
+#
+# The Initial Developer of the Original Code is
+# Netscape Communications Corporation.
+# Portions created by the Initial Developer are Copyright (C) 1998-1999
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Joachim Herb <joachim.herb at gmx.de>
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+*/
+
+if(!org) var org={};
+if(!org.mozdev) org.mozdev={};
+if(!org.mozdev.customizeHeaderToolbar) org.mozdev.customizeHeaderToolbar = {};
+
+org.mozdev.customizeHeaderToolbar.messenger = function(){
+ var pub = {};
+ pub.CHTOnLoadMessenger = function() {
+ pub.saveToolboxData();
+ //OnLoadMessenger();
+ }
+
+ pub.saveToolboxData = function() {
+ var hdrToolbox = document.getElementById("header-view-toolbox");
+ var hdrToolbar = document.getElementById("header-view-toolbar");
+ var saveToolbox = document.getElementById("CHTSaveToolboxData");
+ var saveToolbar = document.getElementById("CHTSaveToolbarData");
+ if (hdrToolbox && hdrToolbar && saveToolbox && saveToolbar) {
+ saveToolbar.firstPermanentChild = hdrToolbar.firstPermanentChild;
+ saveToolbar.lastPermanentChild = hdrToolbar.lastPermanentChild;
+ if (hdrToolbox.palette) {
+ saveToolbox.palette = hdrToolbox.palette.cloneNode(true);
+ }
+ else {
+ //alert("no palette")
+ var hdrPalette = document.getElementById("header-view-toolbar-palette");
+ if (!hdrPalette) {
+ //alert("no header-view-toolbar-palette");
+ }
+ else {
+ //alert("header-view-toolbar-palette");
+ }
+ }
+ if (hdrToolbox.toolbarset) {
+ saveToolbox.toolbarset = hdrToolbox.toolbarset.cloneNode(true);
+ }
+ else {
+ //alert("no toolbarset")
+ }
+ saveToolbox.setAttribute("gotData", "true");
+ }
+ else {
+ //alert("no toolbox/bar");
+ saveToolbox.setAttribute("gotData", "false");
+ }
+ }
+
+ pub.loadToolboxData = function() {
+ var hdrToolbox = document.getElementById("header-view-toolbox");
+ var hdrToolbar = document.getElementById("header-view-toolbar");
+ var saveToolbox = document.getElementById("CHTSaveToolboxData");
+ var saveToolbar = document.getElementById("CHTSaveToolbarData");
+ if (hdrToolbox && hdrToolbar && saveToolbox && saveToolbar && saveToolbox.getAttribute("gotData") == "true") {
+ hdrToolbar.firstPermanentChild = saveToolbar.firstPermanentChild;
+ hdrToolbar.lastPermanentChild = saveToolbar.lastPermanentChild;
+ if (saveToolbox.palette) {
+ hdrToolbox.palette = saveToolbox.palette.cloneNode(true);
+ } else {
+ }
+ if (saveToolbox.toolbarset) {
+ hdrToolbox.toolbarset = saveToolbox.toolbarset.cloneNode(true);
+ } else {
+ }
+ }
+ }
+ return pub;
+}();
+
+addEventListener('load', org.mozdev.customizeHeaderToolbar.messenger.CHTOnLoadMessenger, false);
\ No newline at end of file
diff --git a/chrome/CompactHeader/content-31/CHTMessenger.xul b/chrome/CompactHeader/content-31/CHTMessenger.xul
new file mode 100644
index 0000000..ac2dda9
--- /dev/null
+++ b/chrome/CompactHeader/content-31/CHTMessenger.xul
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<!-- ***** BEGIN LICENSE BLOCK *****
+ - Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ -
+ - The contents of this file are subject to the Mozilla 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/MPL/
+ -
+ - 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 Thunderbird Toolbar Customization Overlay.
+ -
+ - The Initial Developer of the Original Code is
+ - Mozilla Messaging, Inc.
+ - Portions created by the Initial Developer are Copyright (C) 2009
+ - the Initial Developer. All Rights Reserved.
+ -
+ - Contributor(s):
+ - Joachim Herb <joachim.herb at gmx.de>
+ -
+ - Alternatively, the contents of this file may be used under the terms of
+ - either the GNU General Public License Version 2 or later (the "GPL"), or
+ - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ - in which case the provisions of the GPL or the LGPL are applicable instead
+ - of those above. If you wish to allow use of your version of this file only
+ - under the terms of either the GPL or the LGPL, and not to allow others to
+ - use your version of this file under the terms of the MPL, indicate your
+ - decision by deleting the provisions above and replace them with the notice
+ - and other provisions required by the LGPL or the GPL. If you do not delete
+ - the provisions above, a recipient may use your version of this file under
+ - the terms of any one of the MPL, the GPL or the LGPL.
+ -
+ - ***** END LICENSE BLOCK ***** -->
+
+<!DOCTYPE overlay [
+]>
+
+
+<overlay id="CHTmessengerWindow"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <script type="application/x-javascript"
+ src="chrome://CustomizeHeaderToolbar/content/CHTMessenger.js"/>
+ <window id="messengerWindow">
+ <toolbox id="CHTSaveToolboxData" collapsed="true">
+ <toolbar id="CHTSaveToolbarData" collapsed="true"/>
+ </toolbox>
+ </window>
+</overlay>
diff --git a/chrome/CompactHeader/content-31/buttonsOverlay.js b/chrome/CompactHeader/content-31/buttonsOverlay.js
new file mode 100644
index 0000000..bbcec15
--- /dev/null
+++ b/chrome/CompactHeader/content-31/buttonsOverlay.js
@@ -0,0 +1,83 @@
+/*# -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla 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/MPL/
+#
+# 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 Communicator client code, released
+# March 31, 1998.
+#
+# The Initial Developer of the Original Code is
+# Netscape Communications Corporation.
+# Portions created by the Initial Developer are Copyright (C) 1998-1999
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Joachim Herb <joachim.herb at gmx.de>
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+*/
+
+if(!org) var org={};
+if(!org.mozdev) org.mozdev={};
+if(!org.mozdev.compactHeader) org.mozdev.compactHeader = {};
+
+org.mozdev.compactHeader.buttons = function() {
+ var pub = {};
+ const MSG_FLAG_FLAGGED = 0x4;
+
+ pub.init = function () {
+ var mailSession = Components.classes["@mozilla.org/messenger/services/session;1"]
+ .getService(Components.interfaces.nsIMsgMailSession);
+ var nsIFolderListener = Components.interfaces.nsIFolderListener;
+ mailSession.AddFolderListener(folderListener, nsIFolderListener.propertyFlagChanged);
+ }
+
+ pub.coheToggleStar = function () {
+ var starButton = document.getElementById("header-view-toolbox").getElementsByAttribute("id", "button-starMessages")[0];
+
+ if (starButton) {
+ //alert("test2");
+ var firstSelectedMessage = gFolderDisplay.selectedMessage;
+ if (firstSelectedMessage && firstSelectedMessage.isFlagged) {
+ starButton.setAttribute("flagged", "true");
+ }
+ else {
+ starButton.removeAttribute("flagged");
+ }
+ }
+ }
+
+ var folderListener = {
+ OnItemPropertyFlagChanged: function(item, property, oldFlag, newFlag) {
+ var changedFlag = oldFlag ^ newFlag;
+
+ if (changedFlag & MSG_FLAG_FLAGGED) {
+ pub.coheToggleStar();
+ }
+ },
+ }
+ return pub;
+}();
+
+org.mozdev.compactHeader.buttons.init();
diff --git a/chrome/CompactHeader/content-31/buttonsOverlay.xul b/chrome/CompactHeader/content-31/buttonsOverlay.xul
new file mode 100644
index 0000000..4bc95a9
--- /dev/null
+++ b/chrome/CompactHeader/content-31/buttonsOverlay.xul
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+
+<?xml-stylesheet href="chrome://CompactHeader-os/skin/buttonsOverlay.css" type="text/css"?>
+
+<!DOCTYPE overlay [
+ <!ENTITY % messengerDTD SYSTEM "chrome://messenger/locale/messenger.dtd">
+ %messengerDTD;
+]>
+
+<overlay id="CompactHeaderButtonsOverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<script type="application/javascript" src="chrome://CompactHeader/content/buttonsOverlay.js"/>
+
+<!--ThunderBird-->
+<toolbarpalette id="MailToolbarPalette">
+
+<!--
+<script type="application/x-javascript" src="chrome://CompactHeader/content/buttons.js"/>
+-->
+
+<toolbarbutton
+ class="toolbarbutton-1"
+ id="button-starMessages"
+ label="&markStarredCmd.label;"
+ tooltiptext="&markStarredCmd.label;"
+ oncommand="goDoCommand('cmd_markAsFlagged');" />
+</toolbarpalette>
+
+</overlay>
diff --git a/chrome/CompactHeader/content/compactHeaderOverlay.js b/chrome/CompactHeader/content-31/compactHeaderOverlay.js
similarity index 91%
copy from chrome/CompactHeader/content/compactHeaderOverlay.js
copy to chrome/CompactHeader/content-31/compactHeaderOverlay.js
index e19b3fb..54b4bc3 100644
--- a/chrome/CompactHeader/content/compactHeaderOverlay.js
+++ b/chrome/CompactHeader/content-31/compactHeaderOverlay.js
@@ -245,7 +245,8 @@ org.mozdev.compactHeader.pane = function() {
MailToolboxCustomizeDone(aEvent, "CustomizeHeaderToolbar");
document.getElementById("header-view-toolbox").removeAttribute("doCustomization");
enableButtons();
- org.mozdev.customizeHeaderToolbar.pane.CHTUpdateReplyButton();
+ UpdateReplyButtons();
+ UpdateJunkButton();
org.mozdev.compactHeader.buttons.coheToggleStar();
org.mozdev.customizeHeaderToolbar.messenger.saveToolboxData();
};
@@ -256,7 +257,7 @@ org.mozdev.compactHeader.pane = function() {
}
if (cohe.firstrun || document.getElementById("hdrReplyAllButton") == null) {
- org.mozdev.customizeHeaderToolbar.pane.CHTSetDefaultButtons();
+ SetDefaultButtons();
cohe.firstrun = false;
}
@@ -414,8 +415,8 @@ org.mozdev.compactHeader.pane = function() {
//fillToolboxPalette();
coheToggleHeaderContent();
- org.mozdev.customizeHeaderToolbar.pane.CHTUpdateReplyButton();
- org.mozdev.customizeHeaderToolbar.pane.CHTUpdateJunkButton();
+ UpdateReplyButtons();
+ UpdateJunkButton();
org.mozdev.compactHeader.buttons.coheToggleStar();
}
@@ -479,9 +480,9 @@ org.mozdev.compactHeader.pane = function() {
}
}
- var buttonsRemove = ["hdrJunkButton", "hdrForwardButton", "hdrArchiveButton",
- "hdrReplyToSenderButton", "hdrReplyButton",
- "hdrReplyAllButton", "hdrReplyListButton"];
+ var buttonsRemove = ["hdrForwardButton", "hdrArchiveButton",
+ "hdrReplyToSenderButton"];//, "hdrReplyButton",
+ //"hdrReplyAllButton", "hdrReplyListButton"];
for (var i=0; i<buttonsRemove.length; i++) {
var buttonName = buttonsRemove[i];
var button = document.getElementById(buttonName) ||
@@ -676,10 +677,16 @@ org.mozdev.compactHeader.pane = function() {
strLabel = strShowLabel;
var cBox = document.getElementById("collapsed2LButtonBox");
if (cBox.parentNode.id != hdrToolbox.parentNode.id) {
- var cloneToolboxPalette = hdrToolbox.palette.cloneNode(true);
- var cloneToolbarset = hdrToolbox.toolbarset.cloneNode(true);
+ var cloneToolboxPalette;
+ var cloneToolbarset;
+ if (hdrToolbox.palette) {
+ cloneToolboxPalette = hdrToolbox.palette.cloneNode(true);
+ }
+ if (hdrToolbox.toolbarset) {
+ cloneToolbarset = hdrToolbox.toolbarset.cloneNode(true);
+ }
cBox.parentNode.insertBefore(hdrToolbox, cBox);
- hdrToolbox.palette = cloneToolboxPalette;
+ hdrToolbox.palette = cloneToolboxPalette;
hdrToolbox.toolbarset = cloneToolbarset;
hdrToolbar = document.getElementById("header-view-toolbar");
hdrToolbar.firstPermanentChild = firstPermanentChild;
@@ -689,8 +696,14 @@ org.mozdev.compactHeader.pane = function() {
strLabel = strHideLabel;
var cBox = document.getElementById("expandedHeaders");
if (cBox.parentNode.id != hdrToolbox.parentNode.id) {
- var cloneToolboxPalette = hdrToolbox.palette.cloneNode(true);
- var cloneToolbarset = hdrToolbox.toolbarset.cloneNode(true);
+ var cloneToolboxPalette;
+ var cloneToolbarset;
+ if (hdrToolbox.palette) {
+ cloneToolboxPalette = hdrToolbox.palette.cloneNode(true);
+ }
+ if (hdrToolbox.toolbarset) {
+ cloneToolbarset = hdrToolbox.toolbarset.cloneNode(true);
+ }
cBox.parentNode.appendChild(hdrToolbox);
hdrToolbox.palette = cloneToolboxPalette;
hdrToolbox.toolbarset = cloneToolbarset;
@@ -918,7 +931,7 @@ org.mozdev.compactHeader.pane = function() {
} else if (topic == "quit-application-granted") {
if (this._uninstall) {
cohePrefBranch.deleteBranch("");
- org.mozdev.customizeHeaderToolbar.pane.CHTCleanupButtons();
+ CleanupButtons();
}
this.unregister();
}
@@ -960,6 +973,61 @@ org.mozdev.compactHeader.pane = function() {
return false;
}
+
+ function SetDefaultButtons() {
+ var hdrToolbox = document.getElementById("header-view-toolbox");
+ var hdrToolbar = document.getElementById("header-view-toolbar");
+ var hdrBarDefaultSet = hdrToolbar.getAttribute("defaultset");
+ var hdrBoxDefaultLabelalign = hdrToolbox.getAttribute("defaultlabelalign");
+ var hdrBoxDefaultIconsize = hdrToolbox.getAttribute("defaulticonsize");
+ var hdrBoxDefaultMode = hdrToolbox.getAttribute("defaultmode");
+ var hdrBarDefaultIconsize = hdrToolbar.getAttribute("defaulticonsize");
+ var hdrBarDefaultMode = hdrToolbar.getAttribute("defaultmode");
+
+ hdrToolbox.setAttribute("labelalign", hdrBoxDefaultLabelalign);
+ hdrToolbox.setAttribute("iconsize", hdrBoxDefaultIconsize);
+ hdrToolbox.setAttribute("mode", hdrBoxDefaultMode);
+ hdrToolbar.setAttribute("iconsize", hdrBarDefaultIconsize);
+ hdrToolbar.setAttribute("mode", hdrBarDefaultMode);
+
+ hdrToolbar.currentSet = hdrBarDefaultSet;
+ hdrToolbar.setAttribute("currentset", hdrBarDefaultSet);
+
+ document.persist(hdrToolbox.id,"labelalign");
+ document.persist(hdrToolbox.id,"iconsize");
+ document.persist(hdrToolbox.id,"mode");
+ document.persist(hdrToolbar.id,"iconsize");
+ document.persist(hdrToolbar.id,"mode");
+ document.persist(hdrToolbar.id,"currentset");
+ }
+
+ function CleanupButtons() {
+ var hdrToolbox = document.getElementById("header-view-toolbox");
+ var hdrToolbar = document.getElementById("header-view-toolbar");
+ var hdrBarDefaultSet = "hdrReplyButton,hdrReplyAllButton,hdrReplyListButton,hdrForwardButton,hdrArchiveButton,hdrJunkButton,hdrTrashButton";
+ var hdrBoxDefaultLabelalign = hdrToolbox.getAttribute("defaultlabelalign");
+ var hdrBoxDefaultIconsize = hdrToolbox.getAttribute("defaulticonsize");
+ var hdrBoxDefaultMode = hdrToolbox.getAttribute("defaultmode");
+ var hdrBarDefaultIconsize = hdrToolbar.getAttribute("defaulticonsize");
+ var hdrBarDefaultMode = hdrToolbar.getAttirbute("defaultmode");
+
+ hdrToolbox.setAttribute("labelalign", hdrBoxDefaultLabelalign);
+ hdrToolbox.setAttribute("iconsize", hdrBoxDefaultIconsize);
+ hdrToolbox.setAttribute("mode", hdrBoxDefaultMode);
+ hdrToolbar.setAttribute("iconsize", hdrBarDefaultIconsize);
+ hdrToolbar.setAttribute("mode", hdrBarDefaultMode);
+
+ hdrToolbar.currentSet = hdrBarDefaultSet;
+ hdrToolbar.setAttribute("currentset", hdrBarDefaultSet);
+
+ document.persist(hdrToolbox.id,"labelalign");
+ document.persist(hdrToolbox.id,"iconsize");
+ document.persist(hdrToolbox.id,"mode");
+ document.persist(hdrToolbar.id,"iconsize");
+ document.persist(hdrToolbar.id,"mode");
+ document.persist(hdrToolbar.id,"currentset");
+ }
+
return pub;
}();
diff --git a/chrome/CompactHeader/content-31/compactHeaderOverlay.xul b/chrome/CompactHeader/content-31/compactHeaderOverlay.xul
new file mode 100644
index 0000000..4af345b
--- /dev/null
+++ b/chrome/CompactHeader/content-31/compactHeaderOverlay.xul
@@ -0,0 +1,215 @@
+<?xml version="1.0" ?>
+
+<!DOCTYPE overlay [
+ <!ENTITY % msgHeaderDTD SYSTEM
+ "chrome://messenger/locale/msgHdrViewOverlay.dtd">
+ %msgHeaderDTD;
+ <!ENTITY % compactHeaderDTD SYSTEM
+ "chrome://CompactHeader/locale/CompactHeader.dtd">
+ %compactHeaderDTD;
+ <!ENTITY % preferencesDTD SYSTEM
+ "chrome://CompactHeader/locale/preferences.dtd">
+ %preferencesDTD;
+ <!ENTITY % messengerDTD SYSTEM "chrome://messenger/locale/messenger.dtd">
+ %messengerDTD;
+]>
+
+<?xml-stylesheet href="chrome://CompactHeader/skin/CompactHeader.css" type="text/css"?>
+<?xml-stylesheet href="chrome://CompactHeader-os/skin/osdef.css" type="text/css"?>
+
+
+<overlay id="compactHeaderOverlay"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+ <script type="application/javascript" src="chrome://CompactHeader/content/compactHeaderOverlay.js"/>
+
+ <keyset>
+ <key id="hideDetailsKey"
+ modifiers="shift"
+ key="&toggleDetails.key;"
+ oncommand="org.mozdev.compactHeader.pane.coheToggleHeaderView();"/>
+ </keyset>
+
+ <popup id="header-toolbar-context-menu">
+ <menuitem id="hidecohePreferencesButton"
+ label="&dialog.title;"
+ oncommand="openDialog('chrome://CompactHeader/content/preferences.xul', 'prefs', 'chrome,resizable=no,centerscreen,modal');"/>
+ </popup>
+
+ <deck id="msgHeaderViewDeck">
+
+ <vbox id="expandedHeaderView" orient="horizontal">
+ <vbox id="hideDetailsButtonBox" insertbefore="expandedHeadersBox">
+ <button id="hideDetailsButton"
+ tooltiptext="&hideDetailsButton.label;"
+ onclick="org.mozdev.compactHeader.pane.coheToggleHeaderView();"
+ class="msgHeaderView-flat-button"/>
+ </vbox>
+
+ <hbox id="coheStringTransferBox" hidden="true">
+ <label id="CoheHideDetailsLabel" value="&hideDetailsButton.label;"/>
+ <label id="CoheShowDetailsLabel" value="&showDetailsButton.label;"/>
+ </hbox>
+
+ <vbox id="expandedHeadersBox">
+ <hbox id="expandedHeadersTopBox" flex="1">
+ <toolbox id="header-view-toolbox"
+ mode="icons"
+ defaultmode="icons">
+ <toolbarpalette id="header-view-toolbar-palette">
+ <toolbarbutton id="hdrOtherActionsButton"
+ label="&otherActionsButton.label;"
+ tooltiptext="&otherActionsButton.label;"
+ class="toolbarbutton-1 msgHeaderView-button hdrOtherActionsButton"
+ type="menu"/>
+ </toolbarpalette>
+ <toolbar id="header-view-toolbar"
+ mode="icons" defaultmode="icons"
+ defaultset="hdrReplyToSenderButton,hdrReplyButton,hdrReplyAllButton,hdrReplyListButton,hdrForwardButton,button-reply,button-forward,hdrArchiveButton,hdrJunkButton,hdrTrashButton,hdrOtherActionsButton">
+ </toolbar>
+ </toolbox>
+ </hbox>
+
+
+ <hbox id="expandedHeadersBottomBox">
+
+ <vbox id="otherActionsBox" flex="0">
+ <hbox id="dateValueBox" flex="0"/>
+ <button type="menu" id="otherActionsButton" collapsed="true"
+ label="&otherActionsButton.label;"
+ class="msgHeaderView-button msgHeaderView-flat-button">
+ <menupopup id="otherActionsPopup" onpopupshowing="InitMessageMark()">
+ <menuitem id="hdrPlane-markFlagged"
+ type="checkbox"
+ label="&markStarredCmd.label;"
+ accesskey="&markStarredCmd.accesskey;"
+ command="cmd_markAsFlagged"
+ insertbefore="viewSourceMenuItem"
+ key="key_toggleFlagged"/>
+ <menu id="hdrPlane-HeadersPopupMenu" label="&headersMenu.label;" accesskey="&headersMenu.accesskey;">
+ <menupopup id="menu_HeadersPopup" onpopupshowing="InitViewHeadersMenu();">
+ <menuitem id="hdrPlane-viewallheaders"
+ type="radio"
+ name="viewheadergroup"
+ label="&headersAllCmd.label;"
+ accesskey="&headersAllCmd.accesskey;"
+ command="cmd_viewAllHeader"/>
+ <menuitem id="hdrPlane-viewnormalheaders"
+ type="radio"
+ name="viewheadergroup"
+ label="&headersNormalCmd.label;"
+ accesskey="&headersNormalCmd.accesskey;"
+ command="cmd_viewNormalHeader"/>
+ </menupopup>
+ </menu>
+ <menuseparator id="otherActionPopupAfterViewSource"/>
+ <menuitem id="hideDetailsMenu"
+ label="&hideDetailsButton.label;"
+ oncommand="org.mozdev.compactHeader.pane.coheToggleHeaderView();"/>
+ <menuitem id="hidecohePreferencesButton"
+ label="&dialog.title;"
+ oncommand="openDialog('chrome://CompactHeader/content/preferences.xul', 'prefs', 'chrome,centerscreen,dependent,all,resizable=no');"/>
+ </menupopup>
+ </button>
+ </vbox>
+ </hbox>
+
+ </vbox>
+ </vbox>
+
+ <vbox id="collapsedHeaderView" orient="horizontal" flex="1">
+ <popup id="CohecopyUrlPopup" popupanchor="bottomleft">
+ <menuitem label="©LinkCmd.label;" accesskey="©LinkCmd.accesskey;" oncommand="CoheCopyWebsiteAddress(document.popupNode)"/>
+ </popup>
+ <vbox id="showDetailsButtonBox" align="start" flex="0">
+ <button id="showDetailsButton"
+ tooltiptext="&showDetailsButton.label;"
+ onclick="org.mozdev.compactHeader.pane.coheToggleHeaderView();"
+ class="msgHeaderView-flat-button"/>
+ </vbox>
+ <vbox id="collapsed1LHeadersBox" flex="1" collapsed="false">
+ <hbox id="collapsed1LHeaderViewFirstLine" flex="0">
+ <hbox id="collapsed1LsubjectOutBox" align="start" flex="99">
+ <row id="collapsed1LsubjectRow" flex="99">
+ <mail-headerfield id="collapsed1LsubjectBox" flex="99"/>
+ </row>
+ </hbox>
+ <hbox id="collapsed1LfromOutBox" align="start" flex="0">
+ <grid flex="1">
+ <columns>
+ <column flex="0"/>
+ </columns>
+ <rows>
+ <row id="collapsed1LfromRow">
+ <mail-multi-emailHeaderField id="collapsed1LfromBox" flex="0"/>
+ </row>
+ </rows>
+ </grid>
+ </hbox>
+ <grid id="collapsed1LtoCcBccOutBox" flex="1" hidden="true">
+ <row id="collapsed1LtoCcBccRow" align="baseline">
+ <mail-multi-emailHeaderField id="collapsed1LtoCcBccBox" flex="1"/>
+ </row>
+ </grid>
+ <hbox id="collapsed1LdateOutBox" align="start" pack="end" flex="0">
+ <row id="collapsed1LdateRow">
+ <label id="collapsed1LdateBox" class="dateLabel" flex="1"/>
+ </row>
+ </hbox>
+ <header-view-button-box id="collapsed1LButtonBox" flex="0" align="start" hidden="true"/>
+ </hbox>
+ <hbox id="collapsed1LHeaderViewSecondLine" align="top" flex="1" collapsed="true">
+ </hbox>
+ </vbox>
+
+ <vbox id="collapsed2LHeadersBox" flex="1" collapsed="true">
+ <hbox id="collapsed2LHeaderViewFirstLine" flex="0">
+ <hbox id="collapsed2LfromOutBox" align="start" flex="0">
+ <grid flex="1">
+ <columns>
+ <column flex="0"/>
+ </columns>
+ <rows>
+ <row id="collapsed2LfromRow">
+ <mail-multi-emailHeaderField id="collapsed2LfromBox" flex="0"/>
+ </row>
+ </rows>
+ </grid>
+ </hbox>
+ <grid id="collapsed2LtoCcBccOutBox" flex="1">
+ <columns>
+ <column flex="0"/>
+ <column flex="1"/>
+ </columns>
+ <rows>
+ <row id="collapsed2LtoCcBccRow" align="baseline">
+ <label id="collapsed2LtoCcBccLabel" class="headerName"
+ value="&toField2.label;" control="collapsed2LtoCcBccBox"/>
+ <mail-multi-emailHeaderField id="collapsed2LtoCcBccBox" flex="1"/>
+ </row>
+ </rows>
+ </grid>
+ <header-view-button-box id="collapsed2LButtonBox" flex="0" align="start"/>
+ </hbox>
+ <hbox id="collapsed2LHeaderViewSecondLine" align="top" flex="1">
+ <hbox id="collapsed2LsubjectOutBox" align="top" flex="99">
+ <row id="collapsed2LsubjectRow" flex="99">
+ <mail-headerfield id="collapsed2LsubjectBox" flex="99"/>
+ </row>
+ </hbox>
+ <hbox id="collapsed2LdateOutBox" align="top" pack="end" flex="0">
+ <row id="collapsed2LdateRow" align="top" pack="end">
+ <label id="collapsed2LdateBox" class="dateLabel" flex="1"/>
+ </row>
+ </hbox>
+ </hbox>
+ </vbox>
+
+ </vbox>
+
+ </deck>
+
+</overlay>
+
+<!--
+-->
\ No newline at end of file
diff --git a/chrome/CompactHeader/content-31/customizeToolbarOverlay.xul b/chrome/CompactHeader/content-31/customizeToolbarOverlay.xul
new file mode 100644
index 0000000..a9324a1
--- /dev/null
+++ b/chrome/CompactHeader/content-31/customizeToolbarOverlay.xul
@@ -0,0 +1,15 @@
+<?xml version="1.0" ?>
+
+<!DOCTYPE overlay [
+<!ENTITY % customizeToolbarDTD SYSTEM "chrome://global/locale/customizeToolbar.dtd">
+ %customizeToolbarDTD;
+]>
+
+<?xml-stylesheet href="chrome://CompactHeader-os/skin/osdef.css" type="text/css"?>
+
+<overlay id="customizeToolbarOverlay"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+ <script type="application/javascript" src="chrome://CompactHeader/content/compactHeaderOverlay.js"/>
+
+</overlay>
diff --git a/chrome/CompactHeader/content-31/preferences.js b/chrome/CompactHeader/content-31/preferences.js
new file mode 100644
index 0000000..8c718b2
--- /dev/null
+++ b/chrome/CompactHeader/content-31/preferences.js
@@ -0,0 +1,100 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+// preferences.js
+//
+// Copyright 2005 by Michael Buschbeck <michael at buschbeck.net>
+//
+// Preferences dialog box for the Unselect Message extension. Allows users to
+// customize the behavior of the extension.
+//
+
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Variables
+//
+
+
+if(!org) var org={};
+if(!org.mozdev) org.mozdev={};
+if(!org.mozdev.compactHeader) org.mozdev.compactHeader = {};
+
+org.mozdev.compactHeader.preferences = function() {
+ var pub = {};
+ var prefBranch;
+ ///////////////////////////////////////////////////////////////////////////////
+ //
+ // onLoad
+ //
+ // Called when the preferences dialog has finished loading. Initializes the
+ // controls according to current configuration settings.
+ //
+
+ pub.onLoad = function()
+ {
+ prefBranch = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefService)
+ .getBranch("extensions.CompactHeader.");
+
+ loadPrefCheckbox("headersize.twolineview", "checkbox.Compact.TwolineView");
+ loadPrefCheckbox("headersize.linkify", "checkbox.Linkify");
+ //loadPrefInt("headersize.addressstyle", "AddressStyle");
+ loadPrefCheckbox("headersize.addressstyle", "checkbox.ShowOnlyAddress");
+ loadPrefCheckbox("headersize.flatButtons", "checkbox.flatButtons");
+ }
+
+ ///////////////////////////////////////////////////////////////////////////////
+ //
+ // onDialogAccept
+ //
+ // Called when the preferences dialog is closed by pressing the OK button.
+ // Saves the configuration settings.
+ //
+
+ pub.onDialogAccept = function ()
+ {
+ savePrefCheckbox("headersize.twolineview", "checkbox.Compact.TwolineView");
+ savePrefCheckbox("headersize.linkify", "checkbox.Linkify");
+ //savePrefInt("headersize.addressstyle", "AddressStyle");
+ savePrefCheckbox("headersize.addressstyle", "checkbox.ShowOnlyAddress");
+ savePrefCheckbox("headersize.flatButtons", "checkbox.flatButtons");
+ return true;
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////////
+ //
+ // loadPrefCheckbox
+ //
+ // Loads the given boolean preference value into the given checkbox element.
+ //
+
+ function loadPrefCheckbox(pref, idCheckbox)
+ {
+ document.getElementById(idCheckbox).checked = prefBranch.getBoolPref(pref);
+ }
+
+
+ function loadPrefInt(pref, idCheckbox)
+ {
+ document.getElementById(idCheckbox).value = prefBranch.getIntPref(pref);
+ }
+
+ ///////////////////////////////////////////////////////////////////////////////
+ //
+ // savePrefCheckbox
+ //
+ // Saves the given boolean preference value from the given checkbox element.
+ //
+
+ function savePrefCheckbox(pref, idCheckbox)
+ {
+ prefBranch.setBoolPref(pref, document.getElementById(idCheckbox).checked);
+ }
+
+ function savePrefInt(pref, idCheckbox)
+ {
+ prefBranch.setIntPref(pref, document.getElementById(idCheckbox).value);
+ }
+ return pub;
+}();
diff --git a/chrome/CompactHeader/content-31/preferences.xul b/chrome/CompactHeader/content-31/preferences.xul
new file mode 100644
index 0000000..f17eb34
--- /dev/null
+++ b/chrome/CompactHeader/content-31/preferences.xul
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+
+<?xml-stylesheet type="text/css" href="chrome://global/skin/"?>
+<?xml-stylesheet type="text/css" href="chrome://communicator/skin/"?>
+<?xml-stylesheet type="text/css" href="chrome://CompactHeader/skin/preferences.css"?>
+
+<!DOCTYPE window [
+<!ENTITY % CompactHeaderDTD SYSTEM "chrome://CompactHeader/locale/preferences.dtd">
+%CompactHeaderDTD;
+<!ENTITY % msgHdrDTD SYSTEM "chrome://messenger/locale/msgHdrViewOverlay.dtd">
+%msgHdrDTD;
+<!ENTITY % messengerDTD SYSTEM "chrome://messenger/locale/messenger.dtd">
+%messengerDTD;
+]>
+
+<!--
+ void(openDialog("chrome://CompactHeader/content/preferences.xul"))
+-->
+
+<dialog id="cohePreferences"
+ title="&dialog.title;"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ onload="org.mozdev.compactHeader.preferences.onLoad();"
+ ondialogaccept="return org.mozdev.compactHeader.preferences.onDialogAccept();">
+
+ <script type="application/x-javascript" src="chrome://CompactHeader/content/preferences.js"/>
+
+ <checkbox id="checkbox.Compact.TwolineView"
+ label="&checkbox.Compact.TwolineView.caption;"/>
+
+ <checkbox id="checkbox.Linkify"
+ label="&menu.Linkify.caption;"/>
+ <checkbox id="checkbox.ShowOnlyAddress"
+ label="&menu.ShowOnlyAddress.caption;"/>
+ <checkbox id="checkbox.flatButtons"
+ label="&menu.flatButtons.caption;"/>
+
+</dialog>
diff --git a/chrome/CompactHeader/content/compactHeaderOverlay.js b/chrome/CompactHeader/content/compactHeaderOverlay.js
index e19b3fb..22a4e50 100644
--- a/chrome/CompactHeader/content/compactHeaderOverlay.js
+++ b/chrome/CompactHeader/content/compactHeaderOverlay.js
@@ -676,10 +676,16 @@ org.mozdev.compactHeader.pane = function() {
strLabel = strShowLabel;
var cBox = document.getElementById("collapsed2LButtonBox");
if (cBox.parentNode.id != hdrToolbox.parentNode.id) {
- var cloneToolboxPalette = hdrToolbox.palette.cloneNode(true);
- var cloneToolbarset = hdrToolbox.toolbarset.cloneNode(true);
+ var cloneToolboxPalette;
+ var cloneToolbarset;
+ if (hdrToolbox.palette) {
+ cloneToolboxPalette = hdrToolbox.palette.cloneNode(true);
+ }
+ if (hdrToolbox.toolbarset) {
+ cloneToolbarset = hdrToolbox.toolbarset.cloneNode(true);
+ }
cBox.parentNode.insertBefore(hdrToolbox, cBox);
- hdrToolbox.palette = cloneToolboxPalette;
+ hdrToolbox.palette = cloneToolboxPalette;
hdrToolbox.toolbarset = cloneToolbarset;
hdrToolbar = document.getElementById("header-view-toolbar");
hdrToolbar.firstPermanentChild = firstPermanentChild;
@@ -689,8 +695,14 @@ org.mozdev.compactHeader.pane = function() {
strLabel = strHideLabel;
var cBox = document.getElementById("expandedHeaders");
if (cBox.parentNode.id != hdrToolbox.parentNode.id) {
- var cloneToolboxPalette = hdrToolbox.palette.cloneNode(true);
- var cloneToolbarset = hdrToolbox.toolbarset.cloneNode(true);
+ var cloneToolboxPalette;
+ var cloneToolbarset;
+ if (hdrToolbox.palette) {
+ cloneToolboxPalette = hdrToolbox.palette.cloneNode(true);
+ }
+ if (hdrToolbox.toolbarset) {
+ cloneToolbarset = hdrToolbox.toolbarset.cloneNode(true);
+ }
cBox.parentNode.appendChild(hdrToolbox);
hdrToolbox.palette = cloneToolboxPalette;
hdrToolbox.toolbarset = cloneToolbarset;
diff --git a/install.rdf b/install.rdf
index 946ad6c..d99eca3 100644
--- a/install.rdf
+++ b/install.rdf
@@ -6,7 +6,7 @@
<RDF:Description about="urn:mozilla:install-manifest">
<em:name>CompactHeader</em:name>
- <em:version>1.1.8</em:version>
+ <em:version>1.2.0beta1</em:version>
<em:description>Add ability to reduce header size to one or two lines. Linkify subjects in RSS feeds.</em:description>
<em:creator>Joachim Herb</em:creator>
<em:contributor>Zamula</em:contributor>
@@ -22,7 +22,7 @@
<RDF:Description>
<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
<em:minVersion>3.0</em:minVersion>
- <em:maxVersion>3.0.*</em:maxVersion>
+ <em:maxVersion>3.2.a1pre</em:maxVersion>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/compactheader.git
More information about the Pkg-mozext-commits
mailing list