From 1f62c4741f7cd73620fc02307e3db4b68557a813 Mon Sep 17 00:00:00 2001 From: David Ascher Date: Sun, 21 Sep 2008 13:18:44 +0100 Subject: [PATCH] Bug 455801 Polish changes to message reader for b1 - Mac theme improvements and start of Linux/Window improvements. r=Standard8,ui-review=clarkbw --- mail/base/content/mailWindowOverlay.js | 11 ++ mail/base/content/msgHdrViewOverlay.js | 17 +- mail/base/content/msgHdrViewOverlay.xul | 84 ++++----- mail/base/jar.mn | 2 +- .../chrome/messenger/msgHdrViewOverlay.dtd | 1 + mail/themes/pinstripe/mail/bump.png | Bin 0 -> 258 bytes mail/themes/pinstripe/mail/gradient.png | Bin 0 -> 830 bytes .../pinstripe/mail/icons/arrow-dn-black.png | Bin 0 -> 628 bytes .../pinstripe/mail/icons/arrow-dn-blue.png | Bin 0 -> 678 bytes .../pinstripe/mail/icons/arrow-dn-grey.png | Bin 0 -> 654 bytes .../pinstripe/mail/icons/arrow-dn-sepia.png | Bin 0 -> 666 bytes .../pinstripe/mail/icons/arrow-dn-white.png | Bin 0 -> 628 bytes mail/themes/pinstripe/mail/jar.mn | 4 + mail/themes/pinstripe/mail/messageHeader.css | 169 ++++++++++++++--- mail/themes/pinstripe/mail/tagColors.css | 151 ++++++++------- mail/themes/pinstripe/mail/tagbg.png | Bin 0 -> 162 bytes .../themes/qute/mail/icons/arrow-dn-black.png | Bin 0 -> 628 bytes mail/themes/qute/mail/icons/arrow-dn-blue.png | Bin 0 -> 678 bytes mail/themes/qute/mail/icons/arrow-dn-grey.png | Bin 0 -> 654 bytes mail/themes/qute/mail/jar.mn | 4 + mail/themes/qute/mail/messageHeader.css | 172 +++++++++++++++--- mail/themes/qute/mail/tagColors.css | 151 ++++++++------- mail/themes/qute/mail/tagbg.png | Bin 0 -> 162 bytes .../base/resources/content/mailWidgets.xml | 10 +- mailnews/jar.mn | 2 +- 25 files changed, 516 insertions(+), 262 deletions(-) create mode 100644 mail/themes/pinstripe/mail/bump.png create mode 100644 mail/themes/pinstripe/mail/gradient.png create mode 100644 mail/themes/pinstripe/mail/icons/arrow-dn-black.png create mode 100644 mail/themes/pinstripe/mail/icons/arrow-dn-blue.png create mode 100644 mail/themes/pinstripe/mail/icons/arrow-dn-grey.png create mode 100644 mail/themes/pinstripe/mail/icons/arrow-dn-sepia.png create mode 100644 mail/themes/pinstripe/mail/icons/arrow-dn-white.png create mode 100644 mail/themes/pinstripe/mail/tagbg.png create mode 100644 mail/themes/qute/mail/icons/arrow-dn-black.png create mode 100644 mail/themes/qute/mail/icons/arrow-dn-blue.png create mode 100644 mail/themes/qute/mail/icons/arrow-dn-grey.png create mode 100644 mail/themes/qute/mail/tagbg.png diff --git a/mail/base/content/mailWindowOverlay.js b/mail/base/content/mailWindowOverlay.js index 130227a141..4f35588a93 100644 --- a/mail/base/content/mailWindowOverlay.js +++ b/mail/base/content/mailWindowOverlay.js @@ -1758,6 +1758,17 @@ function MsgJunk() JunkSelectedMessages(!SelectedMessagesAreJunk()); } + +function UpdateJunkButton() +{ + var hdr = gDBView.hdrForFirstSelectedMessage; + var junkScore = hdr.getStringProperty("junkscore"); + var isJunk = ((junkScore != "") && (junkScore != "0")); + if (isNewsURI(hdr.folder.URI)) + isJunk = true; + document.getElementById('junkButton').disabled = isJunk; +} + function MsgMarkMsgAsRead(markRead) { if (!markRead) { diff --git a/mail/base/content/msgHdrViewOverlay.js b/mail/base/content/msgHdrViewOverlay.js index d460359320..3f29ee1249 100644 --- a/mail/base/content/msgHdrViewOverlay.js +++ b/mail/base/content/msgHdrViewOverlay.js @@ -23,6 +23,7 @@ # Contributor(s): # Markus Hossner # Mark Banner +# David Ascher # # 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 @@ -263,6 +264,14 @@ function OnLoadMsgHeaderPane() var deckHeaderView = document.getElementById("msgHeaderViewDeck"); gCollapsedHeaderViewMode = deckHeaderView.selectedIndex == 0; + + // work around XUL deck bug where collapsed header view, if it's the persisted + // default, wouldn't be sized properly because of the larger expanded + // view "stretches" the deck. + if (gCollapsedHeaderViewMode) + document.getElementById('expandedHeaderView').collapsed = true; + else + document.getElementById('collapsedHeaderView').collapsed = true; // dispatch an event letting any listeners know that we have loaded the message pane var event = document.createEvent('Events'); @@ -394,6 +403,7 @@ var messageHeaderSink = { ShowMessageHeaderPane(); UpdateMessageHeaders(); ShowEditMessageBox(); + UpdateJunkButton(); for (index in gMessageListeners) gMessageListeners[index].onEndHeaders(); @@ -785,7 +795,11 @@ function updateHeaderValue(headerEntry, headerValue) function updateHeaderValueInTextNode(headerEntry, headerValue) { - headerEntry.textNode.value = headerValue; + try { + headerEntry.textNode.value = headerValue; + } catch (e) { + dump("headerEntry = " + headerEntry + " and headerValue = " + headerValue + '\n') + } } function createNewHeaderView(headerName, label) @@ -795,6 +809,7 @@ function createNewHeaderView(headerName, label) newHeader.setAttribute('id', idName); newHeader.setAttribute('label', label); + newHeader.setAttribute('flex', '1'); newHeader.collapsed = true; // this new element needs to be inserted into the view... diff --git a/mail/base/content/msgHdrViewOverlay.xul b/mail/base/content/msgHdrViewOverlay.xul index 574859d561..a291f75300 100644 --- a/mail/base/content/msgHdrViewOverlay.xul +++ b/mail/base/content/msgHdrViewOverlay.xul @@ -102,41 +102,38 @@ - - - - - - - - - - - - - - - - - - + + + + + label="&fromField2.label;"/> - - - - + + + + - - - + + + + + + + + +