Bug 250141 - Introduce deletion of newsgroup messages r=bienvenu, sr=neil

This also makes the distinction between `cancel' and `delete' much more clear.
This commit is contained in:
Joshua Cranmer 2010-09-06 08:57:09 -04:00
Родитель d0067b9cd8
Коммит 21448e9616
18 изменённых файлов: 110 добавлений и 122 удалений

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

@ -101,8 +101,7 @@ var nsSearchResultsController =
case "cmd_shiftDelete":
case "button_delete":
// this assumes that advanced searches don't cross accounts
if (GetNumSelectedMessages() <= 0 ||
isNewsURI(gFolderDisplay.view.dbView.getURIForViewIndex(0)))
if (GetNumSelectedMessages() <= 0)
enabled = false;
break;
case "saveas_vf_button":
@ -619,11 +618,6 @@ function GetNumSelectedMessages()
function MsgDeleteSelectedMessages(aCommandType)
{
// we don't delete news messages, we just return in that case
if (gFolderDisplay.selectedMessageIsNews)
return;
// if mail messages delete
gFolderDisplay.hintAboutToDeleteMessages();
gFolderDisplay.doCommand(aCommandType);
}
@ -640,16 +634,9 @@ function MoveMessageInSearch(destFolder)
let destMsgFolder = GetMsgFolderFromUri(destUri).QueryInterface(
Components.interfaces.nsIMsgFolder);
// we don't move news messages, we copy them
if (gFolderDisplay.selectedMessageIsNews) {
gFolderDisplay.doCommandWithFolder(nsMsgViewCommandType.copyMessages,
destMsgFolder);
}
else {
gFolderDisplay.hintAboutToDeleteMessages();
gFolderDisplay.doCommandWithFolder(nsMsgViewCommandType.moveMessages,
destMsgFolder);
}
gFolderDisplay.hintAboutToDeleteMessages();
gFolderDisplay.doCommandWithFolder(nsMsgViewCommandType.moveMessages,
destMsgFolder);
}
function OpenInFolder()

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

@ -250,6 +250,7 @@ var DefaultController =
case "cmd_watchThread":
case "cmd_killThread":
case "cmd_killSubthread":
case "cmd_cancel":
return(gFolderDisplay.selectedMessageIsNews);
default:
@ -273,6 +274,11 @@ var DefaultController =
return gFolderDisplay.getCommandStatus(nsMsgViewCommandType.deleteMsg);
case "cmd_shiftDelete":
return gFolderDisplay.getCommandStatus(nsMsgViewCommandType.deleteNoTrash);
case "cmd_cancel": {
let selectedMessages = gFolderDisplay.selectedMessages;
return selectedMessages.length == 1 && selectedMessages[0].folder &&
selectedMessages[0].folder.server.type == "nntp";
}
case "cmd_deleteFolder":
var folders = gFolderTreeView.getSelectedFolders();
if (folders.length == 1) {
@ -621,6 +627,11 @@ var DefaultController =
gFolderDisplay.hintAboutToDeleteMessages();
gFolderDisplay.doCommand(nsMsgViewCommandType.deleteMsg);
break;
case "cmd_cancel":
let message = gFolderDisplay.selectedMessages[0];
message.folder.QueryInterface(Components.interfaces.nsIMsgNewsFolder)
.cancelMessage(message, msgWindow);
break;
case "cmd_shiftDelete":
MarkSelectedMessagesRead(true);
gFolderDisplay.hintAboutToDeleteMessages();

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

@ -354,6 +354,7 @@ function InitMessageMenu()
document.getElementById("killThread").hidden = !isNews;
document.getElementById("killSubthread").hidden = !isNews;
document.getElementById("watchThread").hidden = !isNews;
document.getElementById("menu_cancel").hidden = !isNews;
// Disable the move and copy menus if there are no messages selected or if
@ -1016,9 +1017,7 @@ function UpdateDeleteToolbarButton()
function UpdateDeleteCommand()
{
var value = "value";
if (gFolderDisplay.selectedMessageIsNews)
value += "News";
else if (SelectedMessagesAreDeleted())
if (SelectedMessagesAreDeleted())
value += "IMAPDeleted";
if (GetNumSelectedMessages() < 2)
value += "Message";
@ -1226,18 +1225,8 @@ function MsgCopyMessage(aDestFolder)
*/
function MsgMoveMessage(aDestFolder)
{
// We don't move news messages, we copy them.
// XXX this check is incorrect in two ways. For saved searches we could have
// cross folder/newsgroup messages, so this check would do the wrong thing.
// For global search views, we don't have a msgFolder - however as we don't
// index newsgroup messages, we can at least temporarily get away with this.
if (gDBView.msgFolder && isNewsURI(gDBView.msgFolder.URI))
gDBView.doCommandWithFolder(nsMsgViewCommandType.copyMessages, aDestFolder);
else
{
gFolderDisplay.hintAboutToDeleteMessages();
gDBView.doCommandWithFolder(nsMsgViewCommandType.moveMessages, aDestFolder);
}
gFolderDisplay.hintAboutToDeleteMessages();
gDBView.doCommandWithFolder(nsMsgViewCommandType.moveMessages, aDestFolder);
pref.setCharPref("mail.last_msg_movecopy_target_uri", aDestFolder.URI);
pref.setBoolPref("mail.last_msg_movecopy_was_move", true);
}
@ -2203,12 +2192,7 @@ function SetUpToolbarButtons(uri)
if (!deleteButton)
return;
// Eventually, we might want to set up the toolbar differently for imap,
// pop, and news. For now, just tweak it based on if it is news or not.
if (isNewsURI(uri))
deleteButton.setAttribute('hidden', true);
else
deleteButton.removeAttribute('hidden');
deleteButton.removeAttribute('hidden');
}
function MsgSynchronizeOffline()

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

@ -199,14 +199,11 @@
valueMessageAccessKey="&deleteMsgCmd.accesskey;"
valueIMAPDeletedMessage="&undeleteMsgCmd.label;"
valueIMAPDeletedMessageAccessKey="&undeleteMsgCmd.accesskey;"
valueNewsMessage="&cancelNewsMsgCmd.label;"
valueNewsMessageAccessKey="&cancelNewsMsgCmd.accesskey;"
valueMessages="&deleteMsgsCmd.label;"
valueMessagesAccessKey="&deleteMsgsCmd.accesskey;"
valueIMAPDeletedMessages="&undeleteMsgsCmd.label;"
valueIMAPDeletedMessagesAccessKey="&undeleteMsgsCmd.accesskey;"
valueNewsMessages="&cancelNewsMsgsCmd.label;"
valueNewsMessagesAccessKey="&cancelNewsMsgsCmd.accesskey;"/>
valueIMAPDeletedMessagesAccessKey="&undeleteMsgsCmd.accesskey;"/>
<command id="cmd_cancel" oncommand="goDoCommand('cmd_cancel')"/>
<command id="cmd_selectAll"/>
<command id="cmd_selectThread" oncommand="goDoCommand('cmd_selectThread')"/>
<command id="cmd_selectFlagged" oncommand="goDoCommand('cmd_selectFlagged')"/>
@ -1484,6 +1481,9 @@
accesskey="&archiveMsgCmd.accesskey;"
key="key_archive"
command="cmd_archive"/>
<menuitem id="menu_cancel" command="cmd_cancel"
label="&cancelNewsMsgCmd.label;"
accesskey="&cancelNewsMsgCmd.accesskey;"/>
<menu id="moveMenu"
label="&moveMsgToMenu.label;"
accesskey="&moveMsgToMenu.accesskey;"

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

@ -73,14 +73,10 @@
<!ENTITY deleteMsgCmd.accesskey "D">
<!ENTITY undeleteMsgCmd.label "Undelete Message">
<!ENTITY undeleteMsgCmd.accesskey "d">
<!ENTITY cancelNewsMsgCmd.label "Cancel Message">
<!ENTITY cancelNewsMsgCmd.accesskey "M">
<!ENTITY deleteMsgsCmd.label "Delete Selected Messages">
<!ENTITY deleteMsgsCmd.accesskey "D">
<!ENTITY undeleteMsgsCmd.label "Undelete Selected Messages">
<!ENTITY undeleteMsgsCmd.accesskey "d">
<!ENTITY cancelNewsMsgsCmd.label "Cancel Selected Messages">
<!ENTITY cancelNewsMsgsCmd.accesskey "n">
<!ENTITY deleteFolderCmd.label "Delete Folder">
<!ENTITY deleteFolderCmd.accesskey "D">
<!ENTITY unsubscribeNewsgroupCmd.label "Unsubscribe">
@ -330,6 +326,8 @@ you can use these alternative items. Otherwise, their values should be empty. -
<!ENTITY archiveMsgCmd.label "Archive">
<!ENTITY archiveMsgCmd.accesskey "A">
<!ENTITY archiveMsgCmd.key "a">
<!ENTITY cancelNewsMsgCmd.label "Cancel Message">
<!ENTITY cancelNewsMsgCmd.accesskey "C">
<!ENTITY replyMsgCmd.label "Reply">
<!ENTITY replyMsgCmd.accesskey "R">
<!ENTITY replyMsgCmd.key "r">

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

@ -67,8 +67,6 @@ downloadingArticles=Downloading articles %S-%S
bytesReceived=Downloading newsgroups: %S received (%SKB read at %SKB/sec)
downloadingArticlesForOffline=Downloading articles %S-%S in %S
onlyCancelOneMessage=You can only cancel one article at a time.
# LOCALIZATION NOTE (autoUnsubscribeText): %1$S is the newsgroup and %2$S is the newsgroup-server it is being removed from.
autoUnsubscribeText=The newsgroup %1$S does not appear to exist on the host %2$S. Would you like to unsubscribe from it?

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

@ -410,6 +410,16 @@ interface nsIMsgFolder : nsISupports {
ACString getUriForMsg(in nsIMsgDBHdr msgHdr);
/**
* Deletes the messages from the folder.
*
* @param messages The array of nsIMsgDBHdr objects to be deleted.
* @param msgWindow The standard message window object, for alerts et al.
* @param deleteStorage Whether or not the message should be truly deleted, as
opposed to moving to trash.
* @param isMove Whether or not this is a deletion for moving messages.
* @param allowUndo Whether this action should be undoable.
*/
void deleteMessages(in nsIArray messages,
in nsIMsgWindow msgWindow,
in boolean deleteStorage, in boolean isMove,

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

@ -2508,9 +2508,7 @@ NS_IMETHODIMP nsMsgDBView::GetCommandStatus(nsMsgViewCommandTypeValue command, P
case nsMsgViewCommandType::deleteNoTrash:
{
PRBool canDelete;
// news folders can't delete (or move messages)
// but we use delete for cancel messages.
if (m_folder && !mIsNews && NS_SUCCEEDED(m_folder->GetCanDeleteMessages(&canDelete)) && !canDelete)
if (m_folder && NS_SUCCEEDED(m_folder->GetCanDeleteMessages(&canDelete)) && !canDelete)
*selectable_p = PR_FALSE;
else
*selectable_p = haveSelection;

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

@ -47,7 +47,7 @@ interface nsINntpIncomingServer;
[ref] native nsMsgKeyArrayRef(nsTArray<nsMsgKey>);
[scriptable, uuid(e56a2366-e66c-4240-a9a1-48c4a0a9ffbc)]
[scriptable, uuid(86a38356-6ab0-4117-8269-674cbb4f264f)]
interface nsIMsgNewsFolder : nsISupports {
attribute ACString groupUsername;
attribute ACString groupPassword;
@ -101,4 +101,15 @@ interface nsIMsgNewsFolder : nsISupports {
* This is useful for operations that shouldn't hold open the database.
*/
nsIMsgDatabase getDatabaseWithoutCache();
/**
* Requests that a message be canceled.
*
* Note that, before sending the news cancel, this method will check to make
* sure that the user has proper permission to cancel the message.
*
* @param aMsgHdr The header of the message to be canceled.
* @param aMsgWindow The standard message window object, for error dialogs.
*/
void cancelMessage(in nsIMsgDBHdr aMsgHdr, in nsIMsgWindow aMsgWindow);
};

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

@ -400,14 +400,6 @@ nsMsgNewsFolder::GetCanFileMessages(PRBool *aResult)
return NS_OK;
}
NS_IMETHODIMP
nsMsgNewsFolder::GetCanDeleteMessages(PRBool *aCanDeleteMessages)
{
NS_ENSURE_ARG_POINTER(aCanDeleteMessages);
*aCanDeleteMessages = PR_FALSE;
return NS_OK;
}
NS_IMETHODIMP
nsMsgNewsFolder::GetCanCreateSubfolders(PRBool *aResult)
{
@ -791,52 +783,61 @@ NS_IMETHODIMP nsMsgNewsFolder::GetSizeOnDisk(PRUint32 *size)
return NS_ERROR_NOT_IMPLEMENTED;
}
/* this is news, so remember that DeleteMessage is really CANCEL. */
NS_IMETHODIMP
nsMsgNewsFolder::DeleteMessages(nsIArray *messages, nsIMsgWindow *aMsgWindow,
PRBool deleteStorage, PRBool isMove,
nsIMsgCopyServiceListener* listener, PRBool allowUndo)
nsIMsgCopyServiceListener* listener,
PRBool allowUndo)
{
nsresult rv = NS_OK;
NS_ENSURE_ARG_POINTER(messages);
NS_ENSURE_ARG_POINTER(aMsgWindow);
PRUint32 count = 0;
rv = messages->GetLength(&count);
if (!isMove)
{
nsCOMPtr<nsIMsgFolderNotificationService> notifier(do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID));
if (notifier)
notifier->NotifyMsgsDeleted(messages);
}
rv = GetDatabase();
NS_ENSURE_SUCCESS(rv, rv);
if (count != 1)
rv = EnableNotifications(allMessageCountNotifications, PR_FALSE, PR_TRUE);
if (NS_SUCCEEDED(rv))
{
nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
PRUint32 count = 0;
rv = messages->GetLength(&count);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIStringBundle> bundle;
rv = bundleService->CreateBundle(NEWS_MSGS_URL, getter_AddRefs(bundle));
NS_ENSURE_SUCCESS(rv, rv);
nsString alertText;
rv = bundle->GetStringFromName(NS_LITERAL_STRING("onlyCancelOneMessage").get(), getter_Copies(alertText));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIPrompt> dialog;
rv = aMsgWindow->GetPromptDialog(getter_AddRefs(dialog));
NS_ENSURE_SUCCESS(rv,rv);
if (dialog)
for (PRUint32 i = 0; i < count && NS_SUCCEEDED(rv); i++)
{
rv = dialog->Alert(nsnull, alertText.get());
NS_ENSURE_SUCCESS(rv,rv);
nsCOMPtr<nsIMsgDBHdr> msgHdr = do_QueryElementAt(messages, i, &rv);
if (msgHdr)
rv = mDatabase->DeleteHeader(msgHdr, nsnull, PR_TRUE, PR_TRUE);
}
// return failure, since the cancel failed
return NS_ERROR_FAILURE;
EnableNotifications(allMessageCountNotifications, PR_TRUE, PR_TRUE);
}
if (!isMove)
NotifyFolderEvent(NS_SUCCEEDED(rv) ? mDeleteOrMoveMsgCompletedAtom :
mDeleteOrMoveMsgFailedAtom);
return NS_OK;
}
NS_IMETHODIMP nsMsgNewsFolder::CancelMessage(nsIMsgDBHdr *msgHdr,
nsIMsgWindow *aMsgWindow)
{
NS_ENSURE_ARG_POINTER(msgHdr);
NS_ENSURE_ARG_POINTER(aMsgWindow);
nsresult rv;
nsCOMPtr <nsINntpService> nntpService = do_GetService(NS_NNTPSERVICE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv,rv);
nsCOMPtr<nsIMsgDBHdr> msgHdr(do_QueryElementAt(messages, 0));
// for cancel, we need to
// turn "newsmessage://sspitzer@news.mozilla.org/netscape.test#5428"
// into "news://sspitzer@news.mozilla.org/23423@netscape.com"

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

@ -94,7 +94,6 @@ public:
NS_IMETHOD GetCanSubscribe(PRBool *aResult);
NS_IMETHOD GetCanFileMessages(PRBool *aResult);
NS_IMETHOD GetCanDeleteMessages(PRBool *aCanDeleteMessages);
NS_IMETHOD GetCanCreateSubfolders(PRBool *aResult);
NS_IMETHOD GetCanRename(PRBool *aResult);
NS_IMETHOD GetCanCompact(PRBool *aResult);

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

@ -126,8 +126,6 @@
<!ENTITY deleteMsgsCmd.accesskey "D">
<!ENTITY undeleteMsgsCmd.label "Undelete Selected Messages">
<!ENTITY undeleteMsgsCmd.accesskey "d">
<!ENTITY cancelNewsMsgsCmd.label "Cancel Selected Messages">
<!ENTITY cancelNewsMsgsCmd.accesskey "n">
<!ENTITY deleteFolderCmd.label "Delete Folder">
<!ENTITY deleteFolderCmd.accesskey "D">
<!ENTITY unsubscribeNewsgroupCmd.label "Unsubscribe">

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

@ -67,8 +67,6 @@ downloadingArticles=Downloading articles %S-%S
bytesReceived=Downloading newsgroups: %S received (%SKB read at %SKB/sec)
downloadingArticlesForOffline=Downloading articles %S-%S in %S
onlyCancelOneMessage=You can only cancel one article at a time.
# LOCALIZATION NOTE (autoUnsubscribeText): %1$S is the newsgroup and %2$S is the newsgroup-server it is being removed from.
autoUnsubscribeText=The newsgroup %1$S does not appear to exist on the host %2$S. Would you like to unsubscribe from it?

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

@ -246,6 +246,7 @@ var DefaultController =
case "cmd_watchThread":
case "cmd_killThread":
case "cmd_killSubthread":
case "cmd_cancel":
return(isNewsURI(GetFirstSelectedMessage()));
default:
@ -275,6 +276,9 @@ var DefaultController =
if (gDBView)
gDBView.getCommandStatus(nsMsgViewCommandType.deleteNoTrash, enabled, checkStatus);
return enabled.value;
case "cmd_cancel":
return GetNumSelectedMessages() == 1 &&
gFolderDisplay.selectedMessageIsNews;
case "button_junk":
UpdateJunkToolbarButton();
if (gDBView)
@ -557,6 +561,11 @@ var DefaultController =
MsgDeleteMessage(true);
UpdateDeleteToolbarButton(false);
break;
case "cmd_cancel":
let message = gFolderDisplay.selectedMessage;
message.folder.QueryInterface(Components.interfaces.nsIMsgNewsFolder)
.cancelMessage(message, msgWindow);
break;
case "cmd_killThread":
/* kill thread kills the thread and then does a next unread */
GoNextMessage(nsMsgNavigationType.toggleThreadKilled, true);

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

@ -389,6 +389,10 @@ function InitMessageMenu()
if (watchThreadMenuItem) {
watchThreadMenuItem.setAttribute("hidden", isNews ? "" : "true");
}
var cancelMenuItem = document.getElementById("menu_cancel");
if (cancelMenuItem) {
cancelMenuItem.setAttribute("hidden", isNews ? "" : "true");
}
// Disable the Move and Copy menus if there are no messages selected.
// Disable the Move menu if we can't delete messages from the folder.
@ -874,9 +878,7 @@ function UpdateDeleteCommand()
{
var value = "value";
var uri = GetFirstSelectedMessage();
if (IsNewsMessage(uri))
value += "News";
else if (SelectedMessagesAreDeleted())
if (SelectedMessagesAreDeleted())
value += "IMAPDeleted";
if (GetNumSelectedMessages() < 2)
value += "Message";
@ -1085,14 +1087,8 @@ function MsgMoveMessage(destFolder)
// get the msg folder we're moving messages into
var destUri = destFolder.getAttribute('id');
let destMsgFolder = GetMsgFolderFromUri(destUri);
// we don't move news messages, we copy them
if (isNewsURI(gDBView.msgFolder.URI)) {
gDBView.doCommandWithFolder(nsMsgViewCommandType.copyMessages, destMsgFolder);
}
else {
SetNextMessageAfterDelete();
gDBView.doCommandWithFolder(nsMsgViewCommandType.moveMessages, destMsgFolder);
}
SetNextMessageAfterDelete();
gDBView.doCommandWithFolder(nsMsgViewCommandType.moveMessages, destMsgFolder);
}
catch (ex) {
dump("MsgMoveMessage failed: " + ex + "\n");

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

@ -199,14 +199,10 @@
valueMessageAccessKey="&deleteMsgCmd.accesskey;"
valueIMAPDeletedMessage="&undeleteMsgCmd.label;"
valueIMAPDeletedMessageAccessKey="&undeleteMsgCmd.accesskey;"
valueNewsMessage="&cancelNewsMsgCmd.label;"
valueNewsMessageAccessKey="&cancelNewsMsgCmd.accesskey;"
valueMessages="&deleteMsgsCmd.label;"
valueMessagesAccessKey="&deleteMsgsCmd.accesskey;"
valueIMAPDeletedMessages="&undeleteMsgsCmd.label;"
valueIMAPDeletedMessagesAccessKey="&undeleteMsgsCmd.accesskey;"
valueNewsMessages="&cancelNewsMsgsCmd.label;"
valueNewsMessagesAccessKey="&cancelNewsMsgsCmd.accesskey;"/>
valueIMAPDeletedMessagesAccessKey="&undeleteMsgsCmd.accesskey;"/>
<command id="cmd_selectAll"/>
<command id="cmd_selectThread" oncommand="goDoCommand('cmd_selectThread')"/>
<command id="cmd_selectFlagged" oncommand="goDoCommand('cmd_selectFlagged')"/>
@ -261,6 +257,7 @@
<command id="cmd_editAsNew" oncommand="goDoCommand('cmd_editAsNew')"/>
<command id="cmd_openMessage" oncommand="goDoCommand('cmd_openMessage')"/>
<command id="cmd_createFilterFromMenu" oncommand="goDoCommand('cmd_createFilterFromMenu')"/>
<command id="cmd_cancel" oncommand="goDoCommand('cmd_cancel')"/>
<command id="cmd_killThread" oncommand="goDoCommand('cmd_killThread')"/>
<command id="cmd_killSubthread" oncommand="goDoCommand('cmd_killSubthread')"/>
<command id="cmd_watchThread" oncommand="goDoCommand('cmd_watchThread')"/>
@ -1864,6 +1861,10 @@
accesskey="&createFilter.accesskey;"
command="cmd_createFilterFromMenu"/>
<menuseparator id="threadItemsSeparator"/>
<menuitem id="menu_cancel"
label="&cancelNewsMsgCmd.label;"
accesskey="&cancelNewsMsgCmd.accesskey;"
command="cmd_cancel"/>
<menuitem id="killThread"
label="&killThreadMenu.label;"
accesskey="&killThreadMenu.accesskey;"

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

@ -716,7 +716,7 @@ var MessageWindowController =
case "cmd_shiftDelete":
case "button_shiftDelete":
loadedFolder = GetLoadedMsgFolder();
return gCurrentMessageUri && loadedFolder && (loadedFolder.canDeleteMessages || isNewsURI(gCurrentFolderUri));
return gCurrentMessageUri && loadedFolder && loadedFolder.canDeleteMessages;
case "button_junk":
UpdateJunkToolbarButton();
// fall through

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

@ -99,7 +99,7 @@ var nsSearchResultsController =
case "cmd_shiftDelete":
case "button_delete":
// this assumes that advanced searches don't cross accounts
if (GetNumSelectedMessages() <= 0 || isNewsURI(gSearchView.getURIForViewIndex(0)))
if (GetNumSelectedMessages() <= 0)
enabled = false;
break;
case "saveas_vf_button":
@ -612,11 +612,6 @@ function GetDBView()
function MsgDeleteSelectedMessages(aCommandType)
{
// we don't delete news messages, we just return in that case
if (isNewsURI(gSearchView.getURIForViewIndex(0)))
return;
// if mail messages delete
SetNextMessageAfterDelete();
gSearchView.doCommand(aCommandType);
}
@ -741,14 +736,8 @@ function MoveMessageInSearch(destFolder)
var destMsgFolder = GetMsgFolderFromUri(destUri).QueryInterface(Components.interfaces.nsIMsgFolder);
// we don't move news messages, we copy them
if (isNewsURI(gSearchView.getURIForViewIndex(0))) {
gSearchView.doCommandWithFolder(nsMsgViewCommandType.copyMessages, destMsgFolder);
}
else {
SetNextMessageAfterDelete();
gSearchView.doCommandWithFolder(nsMsgViewCommandType.moveMessages, destMsgFolder);
}
SetNextMessageAfterDelete();
gSearchView.doCommandWithFolder(nsMsgViewCommandType.moveMessages, destMsgFolder);
}
catch (ex) {
dump("MsgMoveMessage failed: " + ex + "\n");