Bug 1494574 - Port bug 1494524 - Replace SelectionChanged() with SelectionChangedXPCOM() in mailnews/. r=bz
authorJorg K <jorgk@jorgk.com>
Thu, 27 Sep 2018 23:44:42 +0200
changeset 33252 add9c2d8bfd0f196e689b1ea86849acfeb035451
parent 33251 42e6ccd2c53e639340431048801fad49eed08006
child 33253 d796a9fbbe9a6f8d8da2b3a98b7f8af56a9edbf4
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersbz
bugs1494574, 1494524
Bug 1494574 - Port bug 1494524 - Replace SelectionChanged() with SelectionChangedXPCOM() in mailnews/. r=bz
mailnews/addrbook/src/nsAbView.cpp
mailnews/base/src/nsMsgDBView.cpp
mailnews/base/src/nsSubscribableServer.cpp
mailnews/news/src/nsNntpIncomingServer.cpp
--- a/mailnews/addrbook/src/nsAbView.cpp
+++ b/mailnews/addrbook/src/nsAbView.cpp
@@ -503,17 +503,17 @@ nsresult nsAbView::RefreshTree()
     rv = SortBy(mSortColumn.get(), mSortDirection.get(), true);
   }
   else {
     rv = InvalidateTree(ALL_ROWS);
 
     // Although the selection hasn't changed, the card that is selected may need
     // to be displayed differently, therefore pretend that the selection has
     // changed to force that update.
-    SelectionChanged();
+    SelectionChangedXPCOM();
   }
 
   return rv;
 }
 
 NS_IMETHODIMP nsAbView::GetCellText(int32_t row, nsTreeColumn* col, nsAString& _retval)
 {
   NS_ENSURE_TRUE(row >= 0 && (size_t)row < mCards.Length(), NS_ERROR_UNEXPECTED);
@@ -545,17 +545,17 @@ nsresult nsAbView::InvalidateTree(int32_
     return NS_OK;
 
   if (row == ALL_ROWS)
     return mTree->Invalidate();
   else
     return mTree->InvalidateRow(row);
 }
 
-NS_IMETHODIMP nsAbView::SelectionChanged()
+NS_IMETHODIMP nsAbView::SelectionChangedXPCOM()
 {
   if (mAbViewListener && !mSuppressSelectionChange) {
     nsresult rv = mAbViewListener->OnSelectionChanged();
     NS_ENSURE_SUCCESS(rv,rv);
   }
   return NS_OK;
 }
 
@@ -1098,17 +1098,17 @@ NS_IMETHODIMP nsAbView::OnItemPropertyCh
     if (cardWasSelected && mTree)
       mTree->EnsureRowIsVisible(index);
   }
 
   // Although the selection hasn't changed, the card that is selected may need
   // to be displayed differently, therefore pretend that the selection has
   // changed to force that update.
   if (cardWasSelected)
-    SelectionChanged();
+    SelectionChangedXPCOM();
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAbView::SelectAll()
 {
   if (mTreeSelection && mTree) {
     mTreeSelection->SelectAll();
--- a/mailnews/base/src/nsMsgDBView.cpp
+++ b/mailnews/base/src/nsMsgDBView.cpp
@@ -1225,17 +1225,17 @@ nsMsgDBView::LoadMessageByUrl(const char
     m_currentlyDisplayedMsgUri = aUrl;
     m_currentlyDisplayedViewIndex = nsMsgViewIndex_None;
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsMsgDBView::SelectionChanged()
+nsMsgDBView::SelectionChangedXPCOM()
 {
   // If the currentSelection changed then we have a message to display -
   // not if we are in the middle of deleting rows.
   if (m_deletingRows)
     return NS_OK;
 
   uint32_t numSelected = 0;
 
@@ -5641,17 +5641,17 @@ nsMsgDBView::ToggleExpansion(nsMsgViewIn
     return NS_MSG_MESSAGE_NOT_FOUND;
 
   if (flags & nsMsgMessageFlags::Elided)
     rv = ExpandByIndex(threadIndex, numChanged);
   else
     rv = CollapseByIndex(threadIndex, numChanged);
 
   // If we collaps/uncollapse a thread, this changes the selected URIs.
-  SelectionChanged();
+  SelectionChangedXPCOM();
   return rv;
 }
 
 nsresult
 nsMsgDBView::ExpandAndSelectThread()
 {
   nsresult rv;
 
@@ -5745,17 +5745,17 @@ nsMsgDBView::ExpandAll()
     uint32_t flags = m_flags[i];
     if (flags & nsMsgMessageFlags::Elided)
       ExpandByIndex(i, &numExpanded);
   }
 
   if (mTree)
     mTree->EndUpdateBatch();
 
-  SelectionChanged();
+  SelectionChangedXPCOM();
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgDBView::GetThreadContainingMsgHdr(nsIMsgDBHdr *msgHdr,
                                        nsIMsgThread **pThread)
 {
   return m_db->GetThreadContainingMsgHdr(msgHdr, pThread);
@@ -5813,17 +5813,17 @@ nsMsgDBView::CollapseAll()
   for (uint32_t i = 0; i < GetSize(); i++)
   {
     uint32_t numExpanded;
     uint32_t flags = m_flags[i];
     if (!(flags & nsMsgMessageFlags::Elided) && (flags & MSG_VIEW_FLAG_HASCHILDREN))
       CollapseByIndex(i, &numExpanded);
   }
 
-  SelectionChanged();
+  SelectionChangedXPCOM();
   return NS_OK;
 }
 
 nsresult
 nsMsgDBView::CollapseByIndex(nsMsgViewIndex index,
                              uint32_t *pNumCollapsed)
 {
   nsresult  rv;
--- a/mailnews/base/src/nsSubscribableServer.cpp
+++ b/mailnews/base/src/nsSubscribableServer.cpp
@@ -1180,17 +1180,17 @@ nsSubscribableServer::GetImageSrc(int32_
 
 NS_IMETHODIMP
 nsSubscribableServer::CycleHeader(nsTreeColumn *aCol)
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsSubscribableServer::SelectionChanged()
+nsSubscribableServer::SelectionChangedXPCOM()
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsSubscribableServer::CycleCell(int32_t aRow, nsTreeColumn *aCol)
 {
   return NS_OK;
--- a/mailnews/news/src/nsNntpIncomingServer.cpp
+++ b/mailnews/news/src/nsNntpIncomingServer.cpp
@@ -1925,17 +1925,17 @@ nsNntpIncomingServer::CycleHeader(nsTree
                             NS_LITERAL_STRING("ascending"),
                           rv2);
     mTree->Invalidate();
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsNntpIncomingServer::SelectionChanged()
+nsNntpIncomingServer::SelectionChangedXPCOM()
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 nsNntpIncomingServer::CycleCell(int32_t row, nsTreeColumn* col)
 {
   return NS_OK;