Mozilla Home
Privacy
Cookies
Legal
Bugzilla
Browse
Advanced Search
New Bug
Reports
Documentation
Log In
Log In with GitHub
or
Remember me
Browse
Advanced Search
New Bug
Reports
Documentation
Attachment 215875 Details for
Bug 327269
[patch]
new patch against HEAD
patch-327269.diff (text/plain), 21.39 KB, created by
Anton Bobrov
(
hide
)
Description:
new patch against HEAD
Filename:
MIME Type:
Creator:
Anton Bobrov
Size:
21.39 KB
patch
obsolete
>Index: mozilla/mail/base/content/ABSearchDialog.js >=================================================================== >RCS file: /cvsroot/mozilla/mail/base/content/ABSearchDialog.js,v >retrieving revision 1.12 >diff -u -8 -p -r1.12 ABSearchDialog.js >--- mozilla/mail/base/content/ABSearchDialog.js 21 Aug 2005 17:06:05 -0000 1.12 >+++ mozilla/mail/base/content/ABSearchDialog.js 22 Mar 2006 09:24:51 -0000 >@@ -46,16 +46,17 @@ var nsIAbDirectory = Components.interfac > var gStatusText; > var gSearchBundle; > var gAddressBookBundle; > > var gSearchStopButton; > var gPropertiesButton; > var gComposeButton; > var gSearchPhoneticName = "false"; >+var gStatusBar = null; > > var gRDF = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService); > > var gSearchAbViewListener = { > onSelectionChanged: function() { > UpdateCardView(); > }, > onCountChanged: function(total) { >@@ -67,16 +68,19 @@ var gSearchAbViewListener = { > case 1: > statusText = gAddressBookBundle.getString("matchFound"); > break; > default: > statusText = gAddressBookBundle.getFormattedString("matchesFound", [total]); > break; > } > gStatusText.setAttribute("label", statusText); >+ }, >+ onSearchDone: function() { >+ SearchIsDone(); > } > }; > > function searchOnLoad() > { > initializeSearchWidgets(); > initializeSearchWindowWidgets(); > >@@ -110,31 +114,49 @@ function searchOnUnload() > } > > function initializeSearchWindowWidgets() > { > gSearchStopButton = document.getElementById("search-button"); > gPropertiesButton = document.getElementById("propertiesButton"); > gComposeButton = document.getElementById("composeButton"); > gStatusText = document.getElementById('statusText'); >+ gStatusBar = document.getElementById('statusbar-icon'); > } > > function onSearchStop() > { >+ if (gStatusBar) { >+ gStatusBar.mode = "normal"; >+ gStatusBar.value = 0; >+ } >+} >+ >+function SearchIsDone() >+{ >+ if (gStatusBar) { >+ gStatusBar.mode = "normal"; >+ gStatusBar.value = 0; >+ } > } > > function onAbSearchReset(event) > { > gPropertiesButton.setAttribute("disabled","true"); > gComposeButton.setAttribute("disabled","true"); > > CloseAbView(); > > onReset(event); > gStatusText.setAttribute("label", ""); >+ >+ if (gStatusBar) { >+ gStatusBar.mode = "normal"; >+ gStatusBar.value = 0; >+ } > } > > function SelectDirectory(aURI) > { > var selectedAB = aURI; > > if (!selectedAB) > selectedAB = kPersonalAddressbookURI; >@@ -306,16 +328,22 @@ function onSearch() > > for (var j=0;j<max_attrs;j++) { > // append the term(s) to the searchUri > searchUri += "(" + attrs[j] + "," + opStr + "," + encodeURIComponent(searchTerm.value.str) + ")"; > } > } > > searchUri += ")"; >+ >+ if (gStatusBar) { >+ gStatusBar.mode = "undetermined"; >+ gStatusBar.value = 100; >+ } >+ > SetAbView(searchUri, null, null); > } > > // used to toggle functionality for Search/Stop button. > function onSearchButton(event) > { > if (event.target.label == gSearchBundle.getString("labelForSearchButton")) > onSearch(); >Index: mozilla/mail/components/addrbook/content/abCommon.js >=================================================================== >RCS file: /cvsroot/mozilla/mail/components/addrbook/content/abCommon.js,v >retrieving revision 1.13 >diff -u -8 -p -r1.13 abCommon.js >--- mozilla/mail/components/addrbook/content/abCommon.js 20 Feb 2006 18:11:05 -0000 1.13 >+++ mozilla/mail/components/addrbook/content/abCommon.js 22 Mar 2006 09:24:52 -0000 >@@ -964,21 +964,29 @@ function onAbSearchInput(returnKeyHit) > else { > gSearchTimer = setTimeout("onEnterInSearchBar();", 800); > } > } > > function SearchInputChanged() > { > var clearButton = document.getElementById("clear"); >- if (clearButton) { >- if (gSearchInput.value && (gSearchInput.value != "")) >- clearButton.removeAttribute("disabled"); >- else >- clearButton.setAttribute("disabled", "true"); >+ if (clearButton || gThrobber) { >+ if (gSearchInput.value && (gSearchInput.value != "")) { >+ if (clearButton) >+ clearButton.removeAttribute("disabled"); >+ } >+ else { >+ if (clearButton) >+ clearButton.setAttribute("disabled", "true"); >+ >+ // stop the throbber >+ if (gThrobber) >+ gThrobber.setAttribute("busy", false); >+ } > } > } > > function onAbClearSearch() > { > if (gSearchInput) > gSearchInput.value =""; //on input does not get fired for some reason > onAbSearchInput(true); >Index: mozilla/mail/components/addrbook/content/abContactsPanel.js >=================================================================== >RCS file: /cvsroot/mozilla/mail/components/addrbook/content/abContactsPanel.js,v >retrieving revision 1.12 >diff -u -8 -p -r1.12 abContactsPanel.js >--- mozilla/mail/components/addrbook/content/abContactsPanel.js 23 Dec 2005 00:38:36 -0000 1.12 >+++ mozilla/mail/components/addrbook/content/abContactsPanel.js 22 Mar 2006 09:24:52 -0000 >@@ -30,21 +30,34 @@ > * 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 ***** */ > > var gAddressBookBundle; >+var gThrobber = null; >+ >+var gAddressBookAbViewListener = { >+ onSelectionChanged: function() { >+ return null; >+ }, >+ onCountChanged: function(total) { >+ return null; >+ }, >+ onSearchDone: function() { >+ SearchIsDone(); >+ } >+}; > > function GetAbViewListener() > { > // the ab panel doesn't care if the total changes, or if the selection changes >- return null; >+ return gAddressBookAbViewListener; > } > > > function contactsListDoubleClick(event) > { > // we only care about button 0 (left click) events > if (event.button != 0) > return; >@@ -140,16 +153,19 @@ function AbPanelOnComposerClose() > gSearchInput.value = ""; > } > > function AbPanelLoad() > { > InitCommonJS(); > gAddressBookBundle = document.getElementById("bundle_addressBook"); > >+ if (!gThrobber) >+ gThrobber = document.getElementById("navigator-throbber"); >+ > LoadPreviouslySelectedAB(); > > // add a listener, so we can switch directories if > // the current directory is deleted, and change the name if the > // selected directory's name is modified > var addrbookSession = Components.classes["@mozilla.org/addressbook/services/session;1"].getService().QueryInterface(Components.interfaces.nsIAddrBookSession); > // this listener only cares when a directory is removed or modified > addrbookSession.addAddressBookListener( >@@ -179,16 +195,23 @@ function AbPanelNewList() > goNewListDialog(abList.selectedItem.getAttribute('id')); > } > > function ResultsPaneSelectionChanged() > { > // do nothing for ab panel > } > >+function SearchIsDone() >+{ >+ // stop the throbber >+ if (gThrobber) >+ gThrobber.setAttribute("busy", false); >+} >+ > function OnClickedCard() > { > // do nothing for ab panel > } > > function AbResultsPaneDoubleClick(card) > { > // double click for ab panel means "send mail to this person / list" >@@ -206,12 +229,18 @@ function onEnterInSearchBar() > gQueryURIFormat = gPrefs.getComplexValue("mail.addr_book.quicksearchquery.format", > Components.interfaces.nsIPrefLocalizedString).data; > > var sortColumn = gAbResultsTree.getAttribute("sortCol"); > var sortDirection = document.getElementById(sortColumn).getAttribute("sortDirection"); > var searchURI = GetSelectedDirectory(); > > if (gSearchInput.value != "") >+ { > searchURI += gQueryURIFormat.replace(/@V/g, encodeURIComponent(gSearchInput.value)); >+ >+ // start the throbber >+ if (gThrobber) >+ gThrobber.setAttribute("busy", true); >+ } > > SetAbView(searchURI, true, sortColumn, sortDirection); > } >Index: mozilla/mail/components/addrbook/content/abContactsPanel.xul >=================================================================== >RCS file: /cvsroot/mozilla/mail/components/addrbook/content/abContactsPanel.xul,v >retrieving revision 1.11 >diff -u -8 -p -r1.11 abContactsPanel.xul >--- mozilla/mail/components/addrbook/content/abContactsPanel.xul 1 Feb 2005 18:04:18 -0000 1.11 >+++ mozilla/mail/components/addrbook/content/abContactsPanel.xul 22 Mar 2006 09:24:52 -0000 >@@ -101,28 +101,31 @@ > </rule> > </template> > </menupopup> > </menulist> > </hbox> > > <separator class="thin"/> > >- <vbox> >- <label value="&searchInput.label;"/> >- <textbox id="searchInput" flex="1" onfocus="onSearchInputFocus(event);" onblur="onSearchInputBlur(event);" >- onclick="this.select();" oninput="onAbSearchInput(false);" >- onkeypress="onAbSearchKeyPress(event);"> >- <button id="quick-search-button" type="menu"> >- <menupopup id="quick-search-menupopup" value="0" persist="value" popupalign="topleft" popupanchor="bottomleft"> >- <menuitem value="0" label="&SearchNameOrEmail.label;" type="radio"/> >- </menupopup> >- </button> >- </textbox> >- </vbox> >+ <vbox> >+ <label value="&searchInput.label;"/> >+ <hbox id="search-box"> >+ <textbox id="searchInput" flex="1" onfocus="onSearchInputFocus(event);" onblur="onSearchInputBlur(event);" >+ onclick="this.select();" oninput="onAbSearchInput(false);" >+ onkeypress="onAbSearchKeyPress(event);"> >+ <button id="quick-search-button" type="menu"> >+ <menupopup id="quick-search-menupopup" value="0" persist="value" popupalign="topleft" popupanchor="bottomleft"> >+ <menuitem value="0" label="&SearchNameOrEmail.label;" type="radio"/> >+ </menupopup> >+ </button> >+ </textbox> >+ <button id="navigator-throbber"/> >+ </hbox> >+ </vbox> > > <separator class="thin"/> > > <tree id="abResultsTree" flex="1" context="cardProperties" class="plain" sortCol="GeneratedName" persist="sortCol" ondblclick="contactsListDoubleClick(event);"> > <treecols> > <!-- these column ids must match up to the mork column names, see nsIAddrDatabase.idl --> > <treecol id="GeneratedName" class="sortDirectionIndicator" > persist="hidden ordinal width sortDirection" flex="1" label="&GeneratedName.label;" primary="true"/> >Index: mozilla/mail/components/addrbook/content/addressbook.js >=================================================================== >RCS file: /cvsroot/mozilla/mail/components/addrbook/content/addressbook.js,v >retrieving revision 1.25 >diff -u -8 -p -r1.25 addressbook.js >--- mozilla/mail/components/addrbook/content/addressbook.js 24 Jan 2006 20:40:42 -0000 1.25 >+++ mozilla/mail/components/addrbook/content/addressbook.js 22 Mar 2006 09:24:53 -0000 >@@ -37,16 +37,17 @@ > # 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 ***** > > var cvPrefs = 0; > var addressbook = 0; > var gAddressBookBundle; >+var gThrobber = null; > var gSearchTimer = null; > var gStatusText = null; > var gQueryURIFormat = null; > var gSearchInput; > var gPrintSettings = null; > var gDirTree; > var gCardViewBox; > var gCardViewBoxEmail1; >@@ -128,16 +129,19 @@ function OnUnloadAddressBook() > } > > var gAddressBookAbViewListener = { > onSelectionChanged: function() { > ResultsPaneSelectionChanged(); > }, > onCountChanged: function(total) { > SetStatusText(total); >+ }, >+ onSearchDone: function() { >+ SearchIsDone(); > } > }; > > function GetAbViewListener() > { > return gAddressBookAbViewListener; > } > >@@ -174,16 +178,19 @@ function OnLoadAddressBook() > setTimeout(delayedOnLoadAddressBook, 0); // when debugging, set this to 5000, so you can see what happens after the window comes up. > } > > function delayedOnLoadAddressBook() > { > gAddressBookBundle = document.getElementById("bundle_addressBook"); > gSearchInput = document.getElementById("searchInput"); > >+ if (!gThrobber) >+ gThrobber = document.getElementById("navigator-throbber"); >+ > verifyAccounts(null); // this will do migration, if we need to. > > top.addressbook = Components.classes["@mozilla.org/addressbook;1"].createInstance(Components.interfaces.nsIAddressBook); > > InitCommonJS(); > > //This migrates the LDAPServer Preferences from 4.x to mozilla format. > var ldapPrefs = null; >@@ -321,16 +328,23 @@ function CommandUpdate_AddressBook() > goUpdateCommand('button_delete'); > } > > function ResultsPaneSelectionChanged() > { > UpdateCardView(); > } > >+function SearchIsDone() >+{ >+ // stop the throbber >+ if (gThrobber) >+ gThrobber.setAttribute("busy", false); >+} >+ > function UpdateCardView() > { > var cards = GetSelectedAbCards(); > > // display the selected card, if exactly one card is selected. > // either no cards, or more than one card is selected, clear the pane. > if (cards.length == 1) > OnClickedCard(cards[0]) >@@ -741,16 +755,20 @@ function onEnterInSearchBar() > XXX todo, handle the case where the LDAP url > already has a query, like > moz-abldapdirectory://nsdirectory.netscape.com:389/ou=People,dc=netscape,dc=com?(or(Department,=,Applications)) > */ > if (gSearchInput.value != "") { > // replace all instances of @V with the escaped version > // of what the user typed in the quick search text input > searchURI += gQueryURIFormat.replace(/@V/g, encodeURIComponent(gSearchInput.value)); >+ >+ // start the throbber >+ if (gThrobber) >+ gThrobber.setAttribute("busy", true); > } > > SetAbView(searchURI, gSearchInput.value != "", sortColumn, sortDirection); > > // XXX todo > // this works for synchronous searches of local addressbooks, > // but not for LDAP searches > SelectFirstCard(); >Index: mozilla/mail/components/compose/content/MsgComposeCommands.js >=================================================================== >RCS file: /cvsroot/mozilla/mail/components/compose/content/MsgComposeCommands.js,v >retrieving revision 1.87 >diff -u -8 -p -r1.87 MsgComposeCommands.js >--- mozilla/mail/components/compose/content/MsgComposeCommands.js 9 Mar 2006 20:01:07 -0000 1.87 >+++ mozilla/mail/components/compose/content/MsgComposeCommands.js 22 Mar 2006 09:24:55 -0000 >@@ -116,16 +116,18 @@ var gCharsetConvertManager; > var gLastWindowToHaveFocus; > var gReceiptOptionChanged; > var gAttachVCardOptionChanged; > > var gMailSession; > var gAutoSaveInterval; > var gAutoSaveTimeout; > >+var gThrobber = null; >+ > const kComposeAttachDirPrefName = "mail.compose.attach.dir"; > > function InitializeGlobalVariables() > { > gAccountManager = Components.classes["@mozilla.org/messenger/account-manager;1"].getService(Components.interfaces.nsIMsgAccountManager); > gIOService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService); > gPromptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService); > >@@ -1567,16 +1569,19 @@ function ComposeLoad() > sMsgComposeService.TimeStamp("Done with the initialization (ComposeLoad). Waiting on editor to load about:blank", false); > > // initialize the customizeDone method on the customizeable toolbar > var toolbox = document.getElementById("compose-toolbox"); > toolbox.customizeDone = MailToolboxCustomizeDone; > > var toolbarset = document.getElementById('customToolbars'); > toolbox.toolbarset = toolbarset; >+ >+ if (!gThrobber) >+ gThrobber = document.getElementById("navigator-throbber"); > } > > function ComposeUnload() > { > dump("\nComposeUnload from XUL\n"); > > EditorCleanup(); > >Index: mozilla/mailnews/addrbook/public/nsIAbView.idl >=================================================================== >RCS file: /cvsroot/mozilla/mailnews/addrbook/public/nsIAbView.idl,v >retrieving revision 1.13 >diff -u -8 -p -r1.13 nsIAbView.idl >--- mozilla/mailnews/addrbook/public/nsIAbView.idl 20 Apr 2004 14:01:28 -0000 1.13 >+++ mozilla/mailnews/addrbook/public/nsIAbView.idl 22 Mar 2006 09:24:56 -0000 >@@ -41,16 +41,17 @@ > interface nsIAbCard; > interface nsIAbDirectory; > > [scriptable, uuid(79ad5d6e-1dd2-11b2-addd-f547dab50d75)] > interface nsIAbViewListener : nsISupports > { > void onSelectionChanged(); > void onCountChanged(in long total); >+ void onSearchDone(); > }; > > [scriptable, uuid(e35c015c-1dd1-11b2-9494-f88326252aae)] > interface nsIAbView : nsISupports > { > /** > * returns the actual sortColumn. migration, switching from mozilla > * to netscape 6.x, etc, could cause >Index: mozilla/mailnews/addrbook/src/nsAbDirSearchListener.cpp >=================================================================== >RCS file: /cvsroot/mozilla/mailnews/addrbook/src/nsAbDirSearchListener.cpp,v >retrieving revision 1.6 >diff -u -8 -p -r1.6 nsAbDirSearchListener.cpp >--- mozilla/mailnews/addrbook/src/nsAbDirSearchListener.cpp 10 Mar 2006 17:08:55 -0000 1.6 >+++ mozilla/mailnews/addrbook/src/nsAbDirSearchListener.cpp 22 Mar 2006 09:24:56 -0000 >@@ -37,16 +37,17 @@ > * ***** END LICENSE BLOCK ***** */ > > #include "nsAbDirSearchListener.h" > > #include "nsCOMPtr.h" > #include "nsString.h" > #include "nsXPIDLString.h" > #include "nsCRT.h" >+#include "nsAbView.h" > > > NS_IMPL_THREADSAFE_ISUPPORTS1(nsAbDirSearchListener, nsIAbDirectoryQueryResultListener) > > nsAbDirSearchListener::nsAbDirSearchListener (nsAbDirSearchListenerContext* searchContext) : > mSearchContext (searchContext) > { > } >@@ -57,19 +58,22 @@ nsAbDirSearchListener::~nsAbDirSearchLis > > > /* void onQueryItem (in nsIAbDirectoryQueryResult result); */ > NS_IMETHODIMP nsAbDirSearchListener::OnQueryItem(nsIAbDirectoryQueryResult* result) > { > PRInt32 resultType; > nsresult rv = result->GetType(&resultType); > NS_ENSURE_SUCCESS(rv, rv); >+ extern nsCOMPtr<nsIAbViewListener> mAbViewListener; > > if (resultType != nsIAbDirectoryQueryResult::queryResultMatch) > { >+ if (mAbViewListener) >+ mAbViewListener->OnSearchDone(); > return mSearchContext->OnSearchFinished(resultType); > } > > nsCOMPtr<nsISupportsArray> properties; > rv = result->GetResult (getter_AddRefs (properties)); > NS_ENSURE_SUCCESS(rv, rv); > > PRUint32 count; >Index: mozilla/mailnews/addrbook/src/nsAbView.cpp >=================================================================== >RCS file: /cvsroot/mozilla/mailnews/addrbook/src/nsAbView.cpp,v >retrieving revision 1.60 >diff -u -8 -p -r1.60 nsAbView.cpp >--- mozilla/mailnews/addrbook/src/nsAbView.cpp 17 Mar 2006 13:48:07 -0000 1.60 >+++ mozilla/mailnews/addrbook/src/nsAbView.cpp 22 Mar 2006 09:24:57 -0000 >@@ -72,16 +72,18 @@ > > // also, our default primary sort > #define GENERATED_NAME_COLUMN_ID "GeneratedName" > > static NS_DEFINE_CID(kCollationFactoryCID, NS_COLLATIONFACTORY_CID); > > NS_IMPL_ISUPPORTS4(nsAbView, nsIAbView, nsITreeView, nsIAbListener, nsIObserver) > >+nsCOMPtr<nsIAbViewListener> mAbViewListener; >+ > nsAbView::nsAbView() > { > mMailListAtom = do_GetAtom("MailList"); > mSuppressSelectionChange = PR_FALSE; > mSuppressCountChange = PR_FALSE; > mSearchView = PR_FALSE; > mGeneratedNameFormat = 0; > } >Index: mozilla/mailnews/addrbook/src/nsAbView.h >=================================================================== >RCS file: /cvsroot/mozilla/mailnews/addrbook/src/nsAbView.h,v >retrieving revision 1.18 >diff -u -8 -p -r1.18 nsAbView.h >--- mozilla/mailnews/addrbook/src/nsAbView.h 20 Apr 2004 14:01:29 -0000 1.18 >+++ mozilla/mailnews/addrbook/src/nsAbView.h 22 Mar 2006 09:24:57 -0000 >@@ -98,17 +98,16 @@ private: > > nsCString mURI; > nsCOMPtr <nsIAbDirectory> mDirectory; > nsVoidArray mCards; > nsCOMPtr<nsIAtom> mMailListAtom; > nsString mSortColumn; > nsString mSortDirection; > nsCOMPtr<nsICollation> mCollationKeyGenerator; >- nsCOMPtr<nsIAbViewListener> mAbViewListener; > > PRPackedBool mSearchView; > PRPackedBool mSuppressSelectionChange; > PRPackedBool mSuppressCountChange; > PRInt32 mGeneratedNameFormat; > }; > > #endif /* _nsAbView_H_ */ >Index: mozilla/xpfe/components/autocomplete/resources/content/autocomplete.xml >=================================================================== >RCS file: /cvsroot/mozilla/xpfe/components/autocomplete/resources/content/autocomplete.xml,v >retrieving revision 1.129 >diff -u -8 -p -r1.129 autocomplete.xml >--- mozilla/xpfe/components/autocomplete/resources/content/autocomplete.xml 16 Mar 2006 16:21:00 -0000 1.129 >+++ mozilla/xpfe/components/autocomplete/resources/content/autocomplete.xml 22 Mar 2006 09:25:22 -0000 >@@ -516,16 +516,20 @@ > ]]></body> > </method> > > <!-- --> > <method name="startLookup"> > <body><![CDATA[ > var str = this.currentSearchString; > >+ // start the throbber >+ if (gThrobber) >+ gThrobber.setAttribute("busy", true); >+ > this.isSearching = true; > this.mSessionReturns = this.sessionCount; > this.mFailureCount = 0; > this.mFailureItems = 0; > this.mDefaultMatchFilled = false; // clear out our prefill state. > this.removeAttribute("noMatchesFound"); > > // tell each session to start searching... >@@ -644,16 +648,20 @@ > ]]></body> > </method> > > <!-- does some stuff after a search is done (success or failure) --> > <method name="postSearchCleanup"> > <body><![CDATA[ > this.isSearching = false; > >+ // stop the throbber >+ if (gThrobber) >+ gThrobber.setAttribute("busy", false); >+ > // figure out if there are no matches in all search sessions > var failed = true; > for (var name in this.mSessions) { > if (this.mLastResults[name]) > failed = this.mLastResults[name].items.Count() < 1; > if (!failed) > break; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
|
Review
Attachments on
bug 327269
:
211968
| 215875