Bug 521927 - Make Search, Folder Location and Views widgets for MailNews customizable toolbars

r=mnyromyr sr=neil f=ratty/stefanh/kairo/ehsan
This commit is contained in:
Ian Neal 2010-06-06 22:59:58 +01:00
Родитель b774973f66
Коммит d4595dd870
25 изменённых файлов: 344 добавлений и 308 удалений

Просмотреть файл

@ -21,6 +21,7 @@
* Contributor(s):
* Samir Gehani <sgehani@netscape.com>
* Karsten Düsterloh <mnyromyr@tprac.de>
* Ian Neal <iann_bugzilla@blueyonder.co.uk>
*
* 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
@ -50,6 +51,10 @@ toolbar[printpreview="true"] {
-moz-binding: url("chrome://communicator/content/bindings/notification.xml#browser-notificationbox");
}
/* ::::: toolbaritem ::::: */
toolbaritem {
-moz-binding: url("chrome://global/content/bindings/general.xml#basecontrol");
}
/* With the move to the new toolkit, SeaMonkey needs to overwrite certain bindings
* if it wants to keep its distinctive likeness. The now hidden new toolkit bindings

Просмотреть файл

@ -20,6 +20,7 @@
the Initial Developer. All Rights Reserved.
Contributor(s):
Ian Neal <iann_bugzilla@blueyonder.co.uk>
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
@ -38,3 +39,7 @@
<!ENTITY unreadColumn.label "Unread">
<!ENTITY totalColumn.label "Total">
<!ENTITY folderSizeColumn.label "Size">
<!ENTITY folderLocationToolbarItem.title "Folder Location">
<!ENTITY mailViewsToolbarItem.title "Mail Views">
<!ENTITY searchToolbarItem.title "Search">
<!ENTITY searchSubjectOrAddress.placeholder "Search Subject or Address">

Просмотреть файл

@ -22,6 +22,7 @@
Contributor(s):
Karsten Düsterloh <mnyromyr@tprac.de>
Jeremy Morton <bugzilla@game-point.net>
Ian Neal <iann_bugzilla@blueyonder.co.uk>
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
@ -156,15 +157,10 @@
<!ENTITY redoDefaultCmd.label "Redo">
<!-- View Menu -->
<!ENTITY showMessengerToolbarCmd.label "Mail Toolbar">
<!ENTITY showMessengerToolbarCmd.accesskey "o">
<!-- showSearchToolbarCmd is also used by addressbook -->
<!ENTITY showSearchToolbarCmd.label "Search Bar">
<!ENTITY showSearchToolbarCmd.accesskey "e">
<!ENTITY showLocationToolbarCmd.label "Location Toolbar">
<!ENTITY showLocationToolbarCmd.accesskey "L">
<!ENTITY showMessengerToolbarCmd.label "Mail Toolbar">
<!ENTITY showMessengerToolbarCmd.accesskey "M">
<!ENTITY showSearchToolbarCmd.label "Search Bar">
<!ENTITY showSearchToolbarCmd.accesskey "e">
<!ENTITY messagePaneLayoutStyle.label "Layout">
<!ENTITY messagePaneLayoutStyle.accesskey "L">
@ -489,11 +485,12 @@
<!ENTITY stopButton.label "Stop">
<!ENTITY junkButton.label "Junk">
<!ENTITY notJunkButton.label "Not Junk">
<!ENTITY searchButton.title "Advanced Search">
<!-- Tooltips -->
<!ENTITY menuBar.tooltip "Menu Bar">
<!ENTITY mailToolbar.tooltip "Mail Toolbar">
<!ENTITY locationToolbar.tooltip "Location Toolbar">
<!ENTITY searchToolbar.tooltip "Search Bar">
<!ENTITY advancedButton.tooltip "Advanced message search">
<!ENTITY getMsgButton.tooltip "Get new messages">
<!ENTITY newMsgButton.tooltip "Create a new message">
@ -589,9 +586,10 @@
<!-- focusSearchInput.key also used by addressbook -->
<!ENTITY focusSearchInput.key "k">
<!ENTITY searchSubjectOrAddress.placeholder "Search Subject or Address">
<!ENTITY advancedButton.label "Advanced…">
<!ENTITY advancedButton.accesskey "A">
<!ENTITY searchButton.label "Search Messages…">
<!ENTITY searchButton.accesskey "S">
<!ENTITY all.label "All">
<!ENTITY all.accesskey "A">

Просмотреть файл

@ -877,8 +877,6 @@ function FolderPaneSelectionChange()
if (gAccountCentralLoaded)
UpdateMailToolbar("gAccountCentralLoaded");
else
document.getElementById('advancedButton').setAttribute("disabled" , !(IsCanSearchMessagesEnabled()));
if (gDisplayStartupPage)
{

Просмотреть файл

@ -24,6 +24,7 @@
Contributor(s):
Jan Varga <varga@ku.sk>
Håkan Waara <hwaara@chello.se>
Ian Neal <iann_bugzilla@blueyonder.co.uk>
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
@ -42,7 +43,12 @@
<?xml-stylesheet href="chrome://messenger/skin/folderPane.css" type="text/css"?>
<?xml-stylesheet href="chrome://messenger/skin/folderPaneExtras.css" type="text/css"?>
<!DOCTYPE overlay SYSTEM "chrome://messenger/locale/folderpane.dtd">
<!DOCTYPE overlay [
<!ENTITY % folderpaneDTD SYSTEM "chrome://messenger/locale/folderpane.dtd">
%folderpaneDTD;
<!ENTITY % msgViewPickerDTD SYSTEM "chrome://messenger/locale/msgViewPickerOverlay.dtd">
%msgViewPickerDTD;
]>
<overlay xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
@ -168,4 +174,90 @@
selectable="false"/>
</treecols>
</tree>
<toolbarpalette id="MailToolbarPalette">
<toolbaritem id="folder-location-container"
title="&folderLocationToolbarItem.title;"
align="center"
context="folderPaneContext"
class="chromeclass-toolbar-additional">
<image id="locationIcon" class="folderMenuItem"/>
<menulist id="locationFolders"
class="folderMenuItem"
label=" "
crop="center">
<menupopup id="folderLocationPopup"
height="400"
oncommand="OnLocationTreeSelect(this);"/>
</menulist>
</toolbaritem>
<toolbaritem id="mailviews-container"
title="&mailViewsToolbarItem.title;"
observes="mailDisableViewsSearch"
align="center"
class="chromeclass-toolbar-additional">
<label id="viewPickerLabel"
value="&viewPicker.label;"
accesskey="&viewPicker.accesskey;"
control="viewPicker">
<observes element="mailviews-container" attribute="disabled"/>
</label>
<menulist id="viewPicker"
oncommand="ViewChangeByMenuitem(event.target);">
<menupopup id="viewPickerPopup"
onpopupshowing="RefreshViewPopup(this);">
<menuitem id="viewPickerAll"
label="&viewAll.label;"
type="radio"
name="viewmessages"
value="0"/>
<menuitem id="viewPickerUnread"
label="&viewUnread.label;"
type="radio"
name="viewmessages"
value="1"/>
<menuitem id="viewPickerNotDeleted"
label="&viewNotDeleted.label;"
type="radio"
name="viewmessages"
value="3"/>
<menuseparator id="afterViewPickerUnreadSeparator"/>
<menu id="viewPickerTags" label="&viewTags.label;">
<menupopup id="viewPickerTagsPopup"
class="menulist-menupopup"
onpopupshowing="RefreshTagsPopup(this);"/>
</menu>
<menu id="viewPickerCustomViews" label="&viewCustomViews.label;">
<menupopup id="viewPickerCustomViewsPopup"
class="menulist-menupopup"
onpopupshowing="RefreshCustomViewsPopup(this);"/>
</menu>
<menuseparator id="afterViewPickerCustomViewsSeparator"/>
<menuitem id="viewPickerVirtualFolder"
label="&viewVirtualFolder.label;"
value="7"/>
<menuitem id="viewPickerCustomize"
label="&viewCustomizeView.label;"
value="8"/>
</menupopup>
<observes element="mailviews-container" attribute="disabled"/>
</menulist>
</toolbaritem>
<toolbaritem id="search-container"
title="&searchToolbarItem.title;"
observes="mailDisableViewsSearch"
align="center"
flex="1"
class="chromeclass-toolbar-additional">
<textbox id="searchInput"
flex="1"
type="search"
placeholder="&searchSubjectOrAddress.placeholder;"
clickSelectsAll="true"
onkeypress="if (event.keyCode == KeyEvent.DOM_VK_RETURN) this.select();"
oncommand="onEnterInSearchBar();">
<observes element="search-container" attribute="disabled"/>
</textbox>
</toolbaritem>
</toolbarpalette>
</overlay>

Просмотреть файл

@ -16,8 +16,6 @@ messenger.jar:
% overlay chrome://editor/content/editor.xul chrome://messenger/content/mailEditorOverlay.xul
% overlay chrome://editor/content/EdImageOverlay.xul chrome://messenger/content/messengercompose/mailComposeEditorOverlay.xul
% overlay chrome://editor/content/EdLinkProps.xul chrome://messenger/content/messengercompose/mailComposeEditorOverlay.xul
% overlay chrome://messenger/content/mailWindowOverlay.xul chrome://messenger/content/msgViewPickerOverlay.xul
content/messenger/msgViewPickerOverlay.xul
content/messenger/msgViewPickerOverlay.js
content/messenger/mailViewSetup.js
content/messenger/mailViewSetup.xul

Просмотреть файл

@ -23,6 +23,7 @@
* Contributor(s):
* Jan Varga <varga@ku.sk>
* Håkan Waara (hwaara@chello.se)
* Ian Neal <iann_bugzilla@blueyonder.co.uk>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
@ -210,6 +211,7 @@ var DefaultController =
case "cmd_find":
case "cmd_findAgain":
case "cmd_findPrev":
case "button_search":
case "cmd_search":
case "button_mark":
case "cmd_markAsRead":
@ -411,6 +413,7 @@ var DefaultController =
case "cmd_findPrev":
return IsMessageDisplayedInMessagePane();
break;
case "button_search":
case "cmd_search":
return IsCanSearchMessagesEnabled();
case "cmd_selectAll":
@ -652,6 +655,7 @@ var DefaultController =
case "cmd_properties":
MsgFolderProperties();
return;
case "button_search":
case "cmd_search":
MsgSearchMessages();
return;
@ -1028,36 +1032,6 @@ function MsgGoForward()
GoNextMessage(nsMsgNavigationType.forward, true);
}
/* XXX hiding the search bar while it is focus kills the keyboard so we focus the thread pane */
function SearchBarToggled()
{
var searchBox = document.getElementById('searchBox');
if (searchBox)
{
var attribValue = searchBox.getAttribute("hidden") ;
if (attribValue == "true")
{
/*come out of quick search view */
if (gDBView && gDBView.viewType == nsMsgViewType.eShowQuickSearchResults)
onClearSearch();
}
else
{
/*we have to initialize searchInput because we cannot do it when searchBox is hidden */
var searchInput = GetSearchInput();
searchInput.value="";
}
}
for (var currentNode = top.document.commandDispatcher.focusedElement; currentNode; currentNode = currentNode.parentNode) {
// But skip the last node, which is a XULDocument.
if ((currentNode instanceof XULElement) && currentNode.hidden) {
SetFocusThreadPane();
return;
}
}
}
function SwitchPaneFocus(event)
{
var folderTree = GetFolderTree();

Просмотреть файл

@ -68,7 +68,7 @@ var accountManagerDataSource;
var folderDataSource;
var accountCentralBox = null;
var gSearchBox = null;
var gDisableViewsSearch = null;
var gAccountCentralLoaded = true;
//End progress and Status variables

Просмотреть файл

@ -27,7 +27,7 @@
* Jan Varga <varga@ku.sk>
* Seth Spitzer <sspitzer@netscape.com>
* David Bienvenu <bienvenu@netscape.com>
* Ian Neal <bugzilla@arlen.demon.co.uk>
* Ian Neal <iann_bugzilla@blueyonder.co.uk>
* Karsten Düsterloh <mnyromyr@tprac.de>
* Christopher Thomas <cst@yecc.com>
* Jeremy Morton <bugzilla@game-point.net>
@ -3135,6 +3135,10 @@ function MailToolboxCustomizeDone(aToolboxChanged)
{
toolboxCustomizeDone("mail-menubar", getMailToolbox(), aToolboxChanged);
SetupMoveCopyMenus('button-file', accountManagerDataSource, folderDataSource);
// make sure the folder location picker is initialized, if it exists
if ("OnLoadLocationTree" in window)
OnLoadLocationTree();
}
function MailToolboxCustomizeChange(event)

Просмотреть файл

@ -70,6 +70,7 @@
<script type="application/javascript" src="chrome://messenger/content/mailCommands.js"/>
<script type="application/javascript" src="chrome://messenger/content/junkCommands.js"/>
<script type="application/javascript" src="chrome://messenger/content/mailWindowOverlay.js"/>
<script type="application/javascript" src="chrome://messenger/content/msgViewPickerOverlay.js"/>
<script type="application/javascript" src="chrome://messenger-newsblog/content/newsblogOverlay.js"/>
<script type="application/javascript" src="chrome://messenger/content/mail-offline.js"/>
<script type="application/javascript" src="chrome://communicator/content/findUtils.js"/>
@ -281,6 +282,7 @@
<command id="button_file"/>
<command id="cmd_shiftDelete" oncommand="goDoCommand('cmd_shiftDelete');"/>
<command id="button_junk"/>
<command id="button_search"/>
</commandset>
@ -1156,21 +1158,14 @@
checked="true"
label="&showMessengerToolbarCmd.label;"
accesskey="&showMessengerToolbarCmd.accesskey;"
oncommand="goToggleToolbar('msgToolbar', 'menu_showMessengerToolbar')"/>
<menuitem id="menu_showLocationToolbar"
type="checkbox"
label="&showLocationToolbarCmd.label;"
accesskey="&showLocationToolbarCmd.accesskey;"
oncommand="goToggleToolbar('msgLocationToolbar', 'menu_showLocationToolbar');"
observes="mailHideMenus"
checked="false" persist="checked"/>
oncommand="goToggleToolbar('msgToolbar', 'menu_showMessengerToolbar');"/>
<menuitem id="menu_showSearchToolbar"
type="checkbox"
checked="true"
label="&showSearchToolbarCmd.label;"
accesskey="&showSearchToolbarCmd.accesskey;"
oncommand="goToggleToolbar('searchBox', 'menu_showSearchToolbar'); SearchBarToggled();"
observes="mailHideMenus"/>
observes="mailHideMenus"
oncommand="goToggleToolbar('searchToolbar', 'menu_showSearchToolbar');"/>
<menuitem id="menu_showTaskbar"/>
</menupopup>
</menu>
@ -1236,16 +1231,34 @@
</menu>
<menu id="viewMessageViewMenu" label="&msgsMenu.label;" accesskey="&msgsMenu.accesskey;"
observes="mailHideMenus" oncommand="ViewChangeByMenuitem(event.target);">
<menupopup id="viewMessagePopup" onpopupshowing="RefreshViewPopup(this, false);">
<menuitem id="viewMessageAll" value="0" type="radio" label="&viewAll.label;" accesskey="&viewAll.accesskey;"/>
<menuitem id="viewMessageUnread" value="1" type="radio" label="&viewUnread.label;" accesskey="&viewUnread.accesskey;"/>
<menuitem id="viewMessageNotDeleted" value="3" type="radio" label="&viewNotDeleted.label;" accesskey="&viewNotDeleted.accesskey;"/>
<menupopup id="viewMessagePopup"
onpopupshowing="RefreshViewPopup(this);">
<menuitem id="viewMessageAll"
label="&viewAll.label;"
accesskey="&viewAll.accesskey;"
type="radio"
name="viewmessages"
value="0"/>
<menuitem id="viewMessageUnread"
label="&viewUnread.label;"
accesskey="&viewUnread.accesskey;"
type="radio"
name="viewmessages"
value="1"/>
<menuitem id="viewMessageNotDeleted"
label="&viewNotDeleted.label;"
accesskey="&viewNotDeleted.accesskey;"
type="radio"
name="viewmessages"
value="3"/>
<menuseparator id="messageViewAfterUnreadSeparator"/>
<menu id="viewMessageTags" label="&viewTags.label;" accesskey="&viewTags.accesskey;">
<menupopup id="viewMessageTagsPopup" onpopupshowing="RefreshTagsPopup(this, false);"/>
<menupopup id="viewMessageTagsPopup"
onpopupshowing="RefreshTagsPopup(this);"/>
</menu>
<menu id="viewMessageCustomViews" label="&viewCustomViews.label;" accesskey="&viewCustomViews.accesskey;">
<menupopup id="viewMessageCustomViewsPopup" onpopupshowing="RefreshCustomViewsPopup(this, false);"/>
<menupopup id="viewMessageCustomViewsPopup"
onpopupshowing="RefreshCustomViewsPopup(this);"/>
</menu>
<menuseparator id="messageViewAfterCustomSeparator"/>
<menuitem id="viewMessageVirtualFolder" value="7" label="&viewVirtualFolder.label;" accesskey="&viewVirtualFolder.accesskey;"/>
@ -1922,6 +1935,7 @@
togglemenuitem="menu_showMessengerToolbar"
context="toolbar-context-menu">
</toolbar>
<toolbarset id="customToolbars" context="toolbar-context-menu"/>
<toolbarpalette id="MailToolbarPalette">
<toolbarbutton id="button-getmsg"
@ -2193,12 +2207,12 @@
class="toolbarbutton-1"
label="&junkButton.label;"
tooltiptext="&junkButton.tooltip;"
observes="button_junk"/>
observes="button-junk"/>
<toolbarbutton id="button-notJunk"
class="toolbarbutton-1"
label="&notJunkButton.label;"
tooltiptext="&notJunkButton.tooltip;"
observes="button_junk"/>
observes="button-junk"/>
</deck>
</toolbaritem>
@ -2209,13 +2223,13 @@
class="toolbarbutton-1"
label="&deleteButton.label;"
tooltiptext="&deleteButton.tooltip;"
observes="button_delete"
observes="button-delete"
oncommand="goDoCommand(event.shiftKey ? 'button_shiftDelete' : 'button_delete')"/>
<toolbarbutton id="button-mark-undelete"
class="toolbarbutton-1"
label="&undeleteButton.label;"
tooltiptext="&undeleteButton.tooltip;"
observes="button_delete"
observes="button-delete"
oncommand="goDoCommand('button_delete')"/>
</deck>
</toolbaritem>
@ -2278,6 +2292,23 @@
label="&stopButton.label;"
tooltiptext="&stopButton.tooltip;"
command="cmd_stop"/>
<toolbaritem id="button-search-container"
title="&searchButton.title;"
align="center"
class="chromeclass-toolbar-additional">
<button id="button-search"
label="&searchButton.label;"
accesskey="&searchButton.accesskey;"
tooltiptext="&advancedButton.tooltip;"
observes="button_search"
oncommand="goDoCommand('button_search')"/>
<button id="button-advanced"
label="&advancedButton.label;"
accesskey="&advancedButton.accesskey;"
tooltiptext="&advancedButton.tooltip;"
observes="button_search"
oncommand="goDoCommand('button_search')"/>
</toolbaritem>
<toolbaritem id="throbber-box"
align="center">
<button id="navigator-throbber"
@ -2288,37 +2319,6 @@
</toolbox>
<toolbar id="msgLocationToolbar"
persist="hidden"
hidden="true"
grippytooltiptext="&locationToolbar.tooltip;"
nowindowdrag="true">
<hbox align="center" context="folderPaneContext">
<image id="locationIcon" class="folderMenuItem"/>
<menulist id="locationFolders" class="folderMenuItem"
label=" " crop="center">
<menupopup id="locationPopup" height="400"
oncommand="OnLocationTreeSelect(this);"/>
</menulist>
</hbox>
<hbox id="searchBox" align="center" flex="1">
<spacer id="searchSpacer" flex="2"/>
<textbox id="searchInput"
flex="1"
type="search"
placeholder="&searchSubjectOrAddress.placeholder;"
clickSelectsAll="true"
onkeypress="if (event.keyCode == KeyEvent.DOM_VK_RETURN) this.select();"
oncommand="onEnterInSearchBar();"/>
<button id="advancedButton"
label="&advancedButton.label;"
tooltiptext="&advancedButton.tooltip;"
accesskey="&advancedButton.accesskey;"
oncommand="onAdvancedSearch();"/>
</hbox>
</toolbar>
<!-- The msgNotificationBar appears on top of the message and displays
information like: junk, contains remote images, or is a suspected phishing
URL.

Просмотреть файл

@ -21,6 +21,7 @@
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Ian Neal <iann_bugzilla@blueyonder.co.uk>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
@ -668,6 +669,7 @@ var MessageWindowController =
case "cmd_find":
case "cmd_findAgain":
case "cmd_findPrev":
case "button_search":
case "cmd_search":
case "cmd_reload":
case "cmd_saveAsFile":
@ -796,6 +798,7 @@ var MessageWindowController =
case "cmd_goForward":
case "button_goForward":
return gDBView && gDBView.navigateStatus(nsMsgNavigationType.forward);
case "button_search":
case "cmd_search":
loadedFolder = GetLoadedMsgFolder();
return (loadedFolder && loadedFolder.server.canSearchMessages);
@ -922,6 +925,7 @@ var MessageWindowController =
case "cmd_findPrev":
MsgFindAgain(true);
break;
case "button_search":
case "cmd_search":
MsgSearchMessages();
break;

Просмотреть файл

@ -132,7 +132,8 @@
<menubar id="mail-menubar"/>
</toolbaritem>
</toolbar>
<toolbarset id="customToolbars" context="toolbar-context-menu"/>
<toolbar id="msgToolbar"/>
<toolbarset id="customToolbars"/>
</toolbox>
<tooltip id="aHTMLTooltip" onpopupshowing="return FillInHTMLTooltip(document.tooltipNode);"/>

Просмотреть файл

@ -20,6 +20,7 @@
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Ian Neal <iann_bugzilla@blueyonder.co.uk>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
@ -162,7 +163,7 @@ searchterm {
-moz-binding: url("chrome://messenger/content/mailWidgets.xml#searchpopup");
}
#locationPopup {
#folderLocationPopup {
display: -moz-popup;
-moz-binding: url("chrome://messenger/content/mailWidgets.xml#locationpopup");
visibility: visible;
@ -255,6 +256,26 @@ dummy.usesMailWidgets {
-moz-binding: url("chrome://messenger/content/tabmail.xml#tabmail-alltabs-popup") ! important;
}
/* Used for selecting appropriate button for when next to search box */
#button-search {
display: -moz-box;
}
#search-container + #button-search-container > #button-search,
#wrapper-search-container + toolbarpaletteitem[place="toolbar"] > #button-search-container > #button-search {
display: none;
}
#button-advanced {
display: none;
}
#search-container + #button-search-container > #button-advanced,
#wrapper-search-container + toolbarpaletteitem[place="toolbar"] > #button-search-container > #button-advanced {
display: -moz-box;
}
/* Wallpaper patch for Bug 517924 */
#expandedHeaderView {

Просмотреть файл

@ -21,6 +21,7 @@
the Initial Developer. All Rights Reserved.
Contributor(s):
Ian Neal <iann_bugzilla@blueyonder.co.uk>
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
@ -115,6 +116,7 @@
<broadcasterset id="mailBroadcasters">
<broadcaster id="mailHideMenus"/>
<broadcaster id="mailDisableKeys"/>
<broadcaster id="mailDisableViewsSearch" disabled="true"/>
<!-- File Menu -->
<broadcaster id="Communicator:WorkMode"/>
</broadcasterset>
@ -142,9 +144,26 @@
</toolbaritem>
</toolbar>
<toolbar id="msgToolbar"/>
<toolbarset id="customToolbars" context="toolbar-context-menu"/>
<toolbar id="msgLocationToolbar"/>
<toolbarset id="customToolbars"/>
<toolbar id="searchToolbar"
class="chromeclass-toolbar"
persist="collapsed"
grippytooltiptext="&searchToolbar.tooltip;"
toolbarname="&showSearchToolbarCmd.label;"
accesskey="&showSearchToolbarCmd.accesskey;"
customizable="true"
nowindowdrag="true"
mode="full"
iconsize="small"
labelalign="end"
defaultmode="full"
defaulticonsize="small"
defaultlabelalign="end"
defaultset="mailviews-container,spring,search-container,button-search-container"
togglemenuitem="menu_showSearchToolbar"
context="toolbar-context-menu"/>
</toolbox>
<panel id="customizeToolbarSheetPopup"/>
<!-- XXX This extension point (tabmail-container) is only temporary!
@ -203,7 +222,6 @@
</vbox>
<!-- second panel is the threadPane -->
<vbox id="threadPaneBox">
<hbox id="searchBoxHolder"/>
<tree id="threadTree"
treelines="true"
keepcurrentinview="true"

Просмотреть файл

@ -26,6 +26,7 @@
* Neil Rashbrook (neil@parkwaycc.co.uk)
* Seth Spitzer <sspitzer@netscape.com>
* Karsten Düsterloh <mnyromyr@tprac.de>
* Ian Neal <iann_bugzilla@blueyonder.co.uk>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
@ -864,8 +865,7 @@ function Create3PaneGlobals()
{
// Update <mailWindow.js> global variables.
accountCentralBox = document.getElementById("accountCentralBox");
gSearchBox = document.getElementById("searchBox");
gSearchBox.collapsed = true;
gDisableViewsSearch = document.getElementById("mailDisableViewsSearch");
GetMessagePane().collapsed = true;
}
@ -1072,27 +1072,15 @@ function UpdateAttachmentCol(aFirstTimeFlag)
threadTree.treeBoxObject.clearStyleAndImageCaches();
}
function OnLocationToolbarAttrModified(event)
{
if (!/collapsed|hidden/.test(event.attrName))
return;
var searchBox = document.getElementById("searchBox");
var desiredParent = document.getElementById("msgLocationToolbar");
if (desiredParent.hidden || desiredParent.collapsed)
desiredParent = document.getElementById("searchBoxHolder");
if (searchBox.parentNode != desiredParent)
desiredParent.appendChild(searchBox);
}
function OnLoadLocationTree()
{
var locationTree = document.getElementById('locationPopup').tree;
var locationTree = document.getElementById("folderLocationPopup").tree;
if (locationTree)
{
locationTree.database.AddDataSource(accountManagerDataSource);
locationTree.database.AddDataSource(folderDataSource);
locationTree.setAttribute("ref", "msgaccounts:/");
var toolbar = document.getElementById("msgLocationToolbar");
toolbar.addEventListener("DOMAttrModified", OnLocationToolbarAttrModified, false);
OnLocationToolbarAttrModified({attrName:"collapsed"});
}
}
function OnLocationTreeSelect(menulist)

Просмотреть файл

@ -23,6 +23,7 @@
* Scott MacGregor <mscott@netscape.com>
* Seth Spitzer <sspitzer@netscape.com>
* Karsten Düsterloh <mnyromyr@tprac.de>
* Ian Neal <iann_bugzilla@blueyonder.co.uk>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
@ -152,7 +153,7 @@ function GetLabelForValue(aValue)
if (!selectedItems || !selectedItems.length)
{
// we may have a new item
RefreshAllViewPopups(viewPickerPopup, true);
RefreshAllViewPopups(viewPickerPopup);
selectedItems = viewPickerPopup.getElementsByAttribute("value", aValue);
}
label = selectedItems && selectedItems.length && selectedItems.item(0).getAttribute("label");
@ -346,52 +347,53 @@ function PrepareForViewChange()
// refresh view popup and its subpopups
function RefreshAllViewPopups(aViewPopup, aIsMenulist)
function RefreshAllViewPopups(aViewPopup)
{
RefreshViewPopup(aViewPopup, aIsMenulist);
var menupopups = aViewPopup.getElementsByTagName("menupopup");
if (menupopups.length > 1)
{
// when we have menupopups, we assume both tags and custom views are there
RefreshTagsPopup(menupopups[0], aIsMenulist);
RefreshCustomViewsPopup(menupopups[1], aIsMenulist);
RefreshTagsPopup(menupopups[0]);
RefreshCustomViewsPopup(menupopups[1]);
}
}
function RefreshViewPopup(aViewPopup, aIsMenulist)
function RefreshViewPopup(aViewPopup)
{
// mark default views if selected
if (!aIsMenulist)
let viewAll = aViewPopup.getElementsByAttribute("value", kViewItemAll)[0];
viewAll.setAttribute("checked", gCurrentViewValue == kViewItemAll);
let viewUnread =
aViewPopup.getElementsByAttribute("value", kViewItemUnread)[0];
viewUnread.setAttribute("checked", gCurrentViewValue == kViewItemUnread);
let viewNotDeleted =
aViewPopup.getElementsByAttribute("value", kViewItemNotDeleted)[0];
var folderArray = GetSelectedMsgFolders();
if (folderArray.length == 0)
return;
// Only show the "Not Deleted" item for IMAP servers
// that are using the IMAP delete model.
viewNotDeleted.setAttribute("hidden", true);
var msgFolder = folderArray[0];
var server = msgFolder.server;
if (server.type == "imap")
{
var viewAll = aViewPopup.getElementsByAttribute("value", kViewItemAll)[0];
viewAll.setAttribute("checked", gCurrentViewValue == kViewItemAll);
var viewUnread = aViewPopup.getElementsByAttribute("value", kViewItemUnread)[0];
viewUnread.setAttribute("checked", gCurrentViewValue == kViewItemUnread);
var viewNotDeleted = aViewPopup.getElementsByAttribute("value", kViewItemNotDeleted)[0];
var folderArray = GetSelectedMsgFolders();
if (folderArray.length == 0)
return;
// only show the "Not Deleted" item for IMAP servers that are using the IMAP delete model
viewNotDeleted.setAttribute("hidden", true);
var msgFolder = folderArray[0];
var server = msgFolder.server;
if (server.type == "imap")
let imapServer =
server.QueryInterface(Components.interfaces.nsIImapIncomingServer);
if (imapServer.deleteModel == 0) // nsMsgImapDeleteModels.IMAPDelete == 0
{
var imapServer = server.QueryInterface(Components.interfaces.nsIImapIncomingServer);
if (imapServer.deleteModel == 0) // nsMsgImapDeleteModels.IMAPDelete == 0
{
viewNotDeleted.setAttribute("hidden", false);
viewNotDeleted.setAttribute("checked", gCurrentViewValue == kViewItemNotDeleted);
}
viewNotDeleted.setAttribute("hidden", false);
viewNotDeleted.setAttribute("checked",
gCurrentViewValue == kViewItemNotDeleted);
}
}
}
function RefreshCustomViewsPopup(aMenupopup, aIsMenulist)
function RefreshCustomViewsPopup(aMenupopup)
{
// for each mail view in the msg view list, add an entry in our combo box
if (!gMailViewList)
@ -410,18 +412,16 @@ function RefreshCustomViewsPopup(aMenupopup, aIsMenulist)
var menuitem = document.createElement("menuitem");
menuitem.setAttribute("label", viewInfo.prettyName);
menuitem.setAttribute("value", kViewItemFirstCustom + i);
if (!aIsMenulist)
{
menuitem.setAttribute("type", "radio");
if (kViewItemFirstCustom + i == currentView)
menuitem.setAttribute("checked", true);
}
menuitem.setAttribute("name", "viewmessages");
menuitem.setAttribute("type", "radio");
if (kViewItemFirstCustom + i == currentView)
menuitem.setAttribute("checked", true);
aMenupopup.appendChild(menuitem);
}
}
function RefreshTagsPopup(aMenupopup, aIsMenulist)
function RefreshTagsPopup(aMenupopup)
{
// remove all menuitems
while (aMenupopup.hasChildNodes())
@ -438,12 +438,10 @@ function RefreshTagsPopup(aMenupopup, aIsMenulist)
var menuitem = document.createElement("menuitem");
menuitem.setAttribute("label", tagInfo.tag);
menuitem.setAttribute("value", kViewTagMarker + tagInfo.key);
if (!aIsMenulist)
{
menuitem.setAttribute("type", "radio");
if (tagInfo.key == currentTagKey)
menuitem.setAttribute("checked", true);
}
menuitem.setAttribute("name", "viewmessages");
menuitem.setAttribute("type", "radio");
if (tagInfo.key == currentTagKey)
menuitem.setAttribute("checked", true);
var color = tagInfo.color;
if (color)
menuitem.setAttribute("class", "lc-" + color.substr(1));
@ -456,7 +454,7 @@ function ViewPickerOnLoad()
{
var viewPickerPopup = document.getElementById("viewPickerPopup");
if (viewPickerPopup)
RefreshAllViewPopups(viewPickerPopup, true);
RefreshAllViewPopups(viewPickerPopup);
}

Просмотреть файл

@ -1,76 +0,0 @@
<?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 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) 2002
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Scott MacGregor <mscott@netscape.com>
- Karsten Düsterloh <mnyromyr@tprac.de>
-
- Alternatively, the contents of this file may be used under the terms of
- either of 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 ***** -->
<!DOCTYPE overlay SYSTEM "chrome://messenger/locale/msgViewPickerOverlay.dtd">
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript"
src="chrome://messenger/content/msgViewPickerOverlay.js"/>
<hbox id="searchBox">
<hbox id="viewPickerBox" insertbefore="searchSpacer" align="center">
<label value="&viewPicker.label;" accesskey="&viewPicker.accesskey;"
control="viewPicker"/>
<menulist id="viewPicker" oncommand="ViewChangeByMenuitem(event.target);">
<menupopup id="viewPickerPopup" onpopupshowing="RefreshViewPopup(this, true);">
<menuitem id="viewPickerAll" value="0" label="&viewAll.label;"/>
<menuitem id="viewPickerUnread" value="1" label="&viewUnread.label;"/>
<menuitem id="viewPickerNotDeleted" value="3" label="&viewNotDeleted.label;"/>
<menuseparator/>
<menu id="viewPickerTags" label="&viewTags.label;">
<menupopup id="viewPickerTagsPopup"
class="menulist-menupopup"
onpopupshowing="RefreshTagsPopup(this, true);"/>
</menu>
<menu id="viewPickerCustomViews" label="&viewCustomViews.label;">
<menupopup id="viewPickerCustomViewsPopup"
class="menulist-menupopup"
onpopupshowing="RefreshCustomViewsPopup(this, true);"/>
</menu>
<menuseparator/>
<menuitem id="viewPickerVirtualFolder" value="7" label="&viewVirtualFolder.label;"/>
<menuitem id="viewPickerCustomize" value="8" label="&viewCustomizeView.label;"/>
</menupopup>
</menulist>
</hbox>
</hbox>
</overlay>

Просмотреть файл

@ -428,11 +428,6 @@ function createSearchTerms()
searchTermsArray.Clear();
}
function onAdvancedSearch()
{
MsgSearchMessages();
}
function onSearchStop()
{
gSearchSession.interruptSearch();

Просмотреть файл

@ -25,6 +25,7 @@
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Ian Neal <iann_bugzilla@blueyonder.co.uk>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
@ -842,11 +843,11 @@ function UpdateLayoutVisibility()
// disable location bar if only message pane is visible
document.getElementById("locationFolders").disabled = onlyMessagePane;
// disable mailviews and search if threadpane is invisble
var viewPicker = document.getElementById("viewPicker");
viewPicker.disabled = !threadPaneVisible;
viewPicker.previousSibling.disabled = !threadPaneVisible;
GetSearchInput().disabled = !threadPaneVisible;
// disable mailviews and search if threadpane is invisible
if (!threadPaneVisible)
gDisableViewsSearch.setAttribute("disabled", true);
else
gDisableViewsSearch.removeAttribute("disabled");
}
function ChangeMessagePaneVisibility()
@ -959,7 +960,7 @@ function ShowThreadPane()
function ShowingThreadPane()
{
gSearchBox.collapsed = false;
gDisableViewsSearch.removeAttribute("disabled");
var threadPaneSplitter = GetThreadAndMessagePaneSplitter();
threadPaneSplitter.collapsed = false;
if (!threadPaneSplitter.hidden && threadPaneSplitter.getAttribute("state") != "collapsed")
@ -980,7 +981,7 @@ function HidingThreadPane()
GetTotalCountElement().hidden = true;
GetMessagePane().collapsed = true;
GetThreadAndMessagePaneSplitter().collapsed = true;
gSearchBox.collapsed = true;
gDisableViewsSearch.setAttribute("disabled", true);
document.getElementById("key_toggleThreadPane").setAttribute("disabled", "true");
document.getElementById("key_toggleMessagePane").setAttribute("disabled", "true");
}

Просмотреть файл

@ -21,6 +21,7 @@
*
* Contributor(s):
* Stefan Hermes <stefanh@inbox.com>
* Ian Neal <iann_bugzilla@blueyonder.co.uk>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
@ -73,7 +74,7 @@
background-color: #E8E8E8;
}
#msgLocationToolbar {
#searchToolbar {
-moz-appearance: none;
background-color: #CDCDCD;
background-image: url("chrome://communicator/skin/toolbar/toolbar-gradient34.png");
@ -135,27 +136,10 @@
min-width: 1px;
}
#searchBoxHolder > #searchBox {
border-bottom: 1px solid #9F9F9F;
height: 34px;
background-color: #CDCDCD;
background-image: url("chrome://communicator/skin/toolbar/toolbar-gradient34.png");
background-repeat: repeat-x;
}
/* XXX bug 313731 buttons are taller than menulists */
#msgLocationToolbar > #searchBox[collapsed="true"] {
visibility: hidden;
}
#locationIcon {
list-style-image: none;
}
#locationFolders {
width: 20em;
}
/* ..... message pane adjustments ..... */
#msgHeaderView {

Просмотреть файл

@ -21,6 +21,7 @@
*
* Contributor(s):
* Manuel Reimer (Manuel.Reimer@gmx.de)
* Ian Neal <iann_bugzilla@blueyonder.co.uk>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
@ -241,6 +242,22 @@ toolbarpaletteitem > #button-delete {
-moz-image-region: rect(30px 89px 59px 60px) !important;
}
#locationFolders {
width: 22em;
}
toolbarpaletteitem[place="palette"] > #folder-location-container > #locationFolders {
max-width: 11em;
}
toolbarpaletteitem[place="palette"] > #search-container > #searchInput {
max-width: 11em;
}
toolbarpaletteitem[place="palette"] > #mailviews-container > #viewPicker {
max-width: 11em;
}
/* ::::: small primary toolbar buttons ::::: */
toolbar[iconsize="small"] > #button-getmsg,

Просмотреть файл

@ -20,6 +20,7 @@
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Ian Neal <iann_bugzilla@blueyonder.co.uk>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
@ -110,30 +111,15 @@
}
#threadTree,
#accountCentralBox,
#searchBoxHolder > #searchBox {
#accountCentralBox {
border-left: 2px solid;
-moz-border-left-colors: ThreeDShadow ThreeDDarkShadow;
}
#searchBoxHolder > #searchBox {
border-top: 1px solid ThreeDHighlight;
border-bottom: 1px solid ThreeDShadow;
}
/* XXX bug 313731 buttons are taller than menulists */
#msgLocationToolbar > #searchBox[collapsed="true"] {
visibility: hidden;
}
#locationIcon {
list-style-image: none;
}
#locationFolders {
width: 20em;
}
/* ..... message pane adjustments ..... */
#messagepanebox {

Просмотреть файл

@ -21,6 +21,7 @@
*
* Contributor(s):
* Manuel Reimer (Manuel.Reimer@gmx.de)
* Ian Neal <iann_bugzilla@blueyonder.co.uk>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
@ -287,6 +288,27 @@ toolbarpaletteitem > #button-delete {
-moz-image-region: rect(30px 119px 59px 90px) !important;
}
#locationFolders {
width: 22em;
}
toolbarpaletteitem[place="palette"] > #folder-location-container > #locationFolders {
max-width: 11em;
}
toolbarpaletteitem[place="palette"] > #search-container > #searchInput {
max-width: 11em;
}
toolbarpaletteitem[place="palette"] > #mailviews-container > #viewPicker {
max-width: 11em;
}
#viewPickerPopup > menuitem > .menu-iconic-left,
#viewPickerPopup > menu > menupopup > menuitem > .menu-iconic-left {
display: -moz-box !important;
}
/* ::::: small primary toolbar buttons ::::: */
toolbar[iconsize="small"] > #button-getmsg,

Просмотреть файл

@ -20,6 +20,7 @@
*
* Contributor(s):
* Joe Hewitt <hewitt@netscape.com>
* Ian Neal <iann_bugzilla@blueyonder.co.uk>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
@ -109,50 +110,35 @@
#threadTree,
#accountCentralBox,
#searchBoxHolder > #searchBox,
#messagepanebox {
border-left: 2px solid;
-moz-border-left-colors: #AAB4BF #3B414F;
}
#searchBoxHolder > #searchBox {
border-top: 1px solid #EEF0F3;
border-right: 1px solid #A5ABB0;
border-bottom: 2px solid;
-moz-border-bottom-colors: #5D616E #BEC3D3;
}
/* ::::: search toolbar ::::: */
/* ::::: location toolbar ::::: */
#msgLocationToolbar {
#searchToolbar {
background: url("chrome://global/skin/toolbar/tb-mid.gif") #C7D0D9 repeat-x top;
}
#msgLocationToolbar > .toolbar-box > toolbargrippy,
#msgLocationToolbar > .toolbar-box > .toolbar-holder {
#searchToolbar > .toolbar-box > toolbargrippy,
#searchToolbar > .toolbar-box > .toolbar-holder {
border-top: 1px solid #CED6DD;
border-right: 1px solid #95A0AD;
border-bottom: 1px solid #95A0AD;
border-left: 1px solid #DAE3ED;
}
#msgLocationToolbar > .toolbar-box > toolbargrippy:hover:active {
#searchToolbar > .toolbar-box > toolbargrippy:hover:active {
border-color: #67737E;
}
/* XXX bug 313731 buttons are taller than menulists */
#msgLocationToolbar > #searchBox[collapsed="true"] {
visibility: hidden;
}
/* ::::: location widget ::::: */
#locationIcon {
list-style-image: none;
}
#locationFolders {
width: 20em;
}
/* ..... message pane adjustments ..... */
#messagepanebox {

Просмотреть файл

@ -22,6 +22,7 @@
* Joe Hewitt <hewitt@netscape.com>
* Adam Becevello <abecevello@sympatico.ca>
* Seth Spitzer <sspitzer@netscape.com>
* Ian Neal <iann_bugzilla@blueyonder.co.uk>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
@ -298,6 +299,22 @@ toolbarpaletteitem > #button-delete {
-moz-image-region: rect(68px 199px 101px 150px) !important;
}
#locationFolders {
width: 22em;
}
toolbarpaletteitem[place="palette"] > #folder-location-container > #locationFolders {
max-width: 11em;
}
toolbarpaletteitem[place="palette"] > #search-container > #searchInput {
max-width: 11em;
}
toolbarpaletteitem[place="palette"] > #mailviews-container > #viewPicker {
max-width: 11em;
}
/* ::::: small primary toolbar buttons ::::: */
/* XXXRatty We don't have any small graphics for these buttons yet.