Update of /cvsroot/mahogany/M/src/gui
In directory usw-pr-cvs1:/tmp/cvs-serv4024/src/gui
Modified Files:
wxComposeView.cpp wxMenuDefs.cpp wxMsgCmdProc.cpp
Log Message:
added resend message command
Index: wxComposeView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxComposeView.cpp,v
retrieving revision 1.294
retrieving revision 1.295
diff -b -u -2 -r1.294 -r1.295
--- wxComposeView.cpp 8 Aug 2002 16:30:59 -0000 1.294
+++ wxComposeView.cpp 15 Aug 2002 00:52:17 -0000 1.295
@@ -1096,4 +1096,5 @@
// second, ignore some headers which we always generate ourselves and don't
// allow the user to override anyhow
+ ignoredHeaders.Add("MESSAGE-ID");
ignoredHeaders.Add("MIME-VERSION");
ignoredHeaders.Add("CONTENT-TYPE");
Index: wxMenuDefs.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMenuDefs.cpp,v
retrieving revision 1.191
retrieving revision 1.192
diff -b -u -2 -r1.191 -r1.192
--- wxMenuDefs.cpp 8 Aug 2002 16:31:04 -0000 1.191
+++ wxMenuDefs.cpp 15 Aug 2002 00:52:18 -0000 1.192
@@ -319,11 +319,10 @@
// msg
- // the available accelerators for this menu:
- // jqwz
+ // no more available accelerators for this menu!
{ WXMENU_MSG_OPEN, gettext_noop("&Open"), gettext_noop("View
selected message in a separate window") , wxITEM_NORMAL },
{ WXMENU_MSG_EDIT, gettext_noop("Ed&it in composer\tCtrl-E"),
gettext_noop("Edit selected message in composer") , wxITEM_NORMAL },
{ WXMENU_MSG_PRINT, gettext_noop("&Print\tCtrl-P"), gettext_noop("Print
this message") , wxITEM_NORMAL },
- { WXMENU_MSG_PRINT_PREVIEW, gettext_noop("Print Pre&view"),gettext_noop("Preview a
printout of this message") , wxITEM_NORMAL },
+ { WXMENU_MSG_PRINT_PREVIEW, gettext_noop("Print Previe&w"),gettext_noop("Preview a
+printout of this message") , wxITEM_NORMAL },
#ifdef USE_PS_PRINTING
{ WXMENU_MSG_PRINT_PS, gettext_noop("PS-Prin&t"), gettext_noop("Print
this message as PostScript") , wxITEM_NORMAL },
@@ -399,9 +398,10 @@
},
{ WXMENU_SUBMENU, "", "", wxITEM_NORMAL },
- { WXMENU_MSG_BOUNCE, gettext_noop("&Bounce..."), gettext_noop("Redirect this
message to another recipient"), wxITEM_NORMAL },
+ { WXMENU_MSG_BOUNCE, gettext_noop("&Bounce..."), gettext_noop("Redirect the
+selected messages to another recipient"), wxITEM_NORMAL },
+ { WXMENU_MSG_RESEND, gettext_noop("R&esend..."), gettext_noop("Send the
+selected messages again."), wxITEM_NORMAL },
{ WXMENU_SEPARATOR, "", "" ,
wxITEM_NORMAL },
{ WXMENU_MSG_FILTER, gettext_noop("&Apply filter rules..."),
gettext_noop("Apply filter rules to selected messages") , wxITEM_NORMAL },
{ WXMENU_MSG_QUICK_FILTER, gettext_noop("&Quick filter..."), gettext_noop("Create
a new filter for the selected message") , wxITEM_NORMAL },
- { WXMENU_MSG_SAVE_TO_FILE, gettext_noop("Save as &file..."), gettext_noop("Export
message to a file") , wxITEM_NORMAL },
+ { WXMENU_MSG_SAVE_TO_FILE, gettext_noop("Sa&ve as file..."), gettext_noop("Export
+message to a file") , wxITEM_NORMAL },
{ WXMENU_MSG_SAVE_TO_FOLDER, gettext_noop("&Copy to folder..."),gettext_noop("Save
message to another folder") , wxITEM_NORMAL },
{ WXMENU_MSG_MOVE_TO_FOLDER, gettext_noop("&Move to folder..."),gettext_noop("Move
message to another folder") , wxITEM_NORMAL },
@@ -413,5 +413,5 @@
{ WXMENU_MSG_GOTO_MSGNO, gettext_noop("&Jump to message...\tCtrl-J"),
gettext_noop("Select the message by its number") , wxITEM_NORMAL },
{ WXMENU_MSG_NEXT_UNREAD, gettext_noop("&Next unread\tCtrl-U"),
gettext_noop("Select next unread message") , wxITEM_NORMAL },
- { WXMENU_MSG_NEXT_FLAGGED, gettext_noop("N&ext flagged"), gettext_noop("Select
next flagged message") , wxITEM_NORMAL },
+ { WXMENU_MSG_NEXT_FLAGGED, gettext_noop("Nex&t flagged"), gettext_noop("Select
+next flagged message") , wxITEM_NORMAL },
{ WXMENU_SEPARATOR, "", "" ,
wxITEM_NORMAL },
{ WXMENU_MSG_FLAG, gettext_noop("Fla&g\tCtrl-I"), gettext_noop("Mark message
as flagged/unflagged") , wxITEM_NORMAL },
Index: wxMsgCmdProc.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMsgCmdProc.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -b -u -2 -r1.28 -r1.29
--- wxMsgCmdProc.cpp 8 Aug 2002 16:31:05 -0000 1.28
+++ wxMsgCmdProc.cpp 15 Aug 2002 00:52:18 -0000 1.29
@@ -78,4 +78,10 @@
// ----------------------------------------------------------------------------
+// persistent msgboxes we use here
+// ----------------------------------------------------------------------------
+
+extern const MPersMsgBox *M_MSGBOX_CONFIRM_RESEND;
+
+// ----------------------------------------------------------------------------
// MsgCmdProcImpl
// ----------------------------------------------------------------------------
@@ -155,4 +161,5 @@
void BounceMessages(const UIdArray& selections);
+ void ResendMessages(const UIdArray& selections);
void PrintOrPreviewMessages(const UIdArray& selections, bool preview);
@@ -790,4 +797,8 @@
break;
+ case WXMENU_MSG_RESEND:
+ ResendMessages(messages);
+ break;
+
case WXMENU_MSG_UNDELETE:
@@ -982,5 +993,6 @@
}
- size_t count = messages.GetCount();
+ size_t countOk = 0,
+ count = messages.GetCount();
for ( size_t n = 0; n < count; n++ )
{
@@ -988,5 +1000,5 @@
if ( !msg )
{
- ERRORMESSAGE((_("Failed to bounce the message %ld"), messages[n]));
+ ERRORMESSAGE((_("Failed to retrieve the message to bounce.")));
continue;
}
@@ -998,4 +1010,9 @@
GetFrame()
);
+ if ( !sendMsg )
+ {
+ ERRORMESSAGE((_("Failed to create a new message.")));
+ continue;
+ }
sendMsg->SetAddresses(address);
@@ -1006,9 +1023,77 @@
else
{
- STATUSMESSAGE((_("Message bounced to '%s'."), address.c_str()));
+ countOk++;
}
msg->DecRef();
}
+
+ STATUSMESSAGE((_("Bounced %lu messages."), (unsigned long)countOk));
+}
+
+void
+MsgCmdProcImpl::ResendMessages(const UIdArray& messages)
+{
+ size_t count = messages.GetCount();
+ if ( !count )
+ return;
+
+ if ( !MDialog_YesNoDialog
+ (
+ String::Format
+ (
+ _("Do you want to resend the %lu selected messages?"),
+ (unsigned long)count
+ ),
+ GetFrame(),
+ MDIALOG_YESNOTITLE,
+ M_DLG_NO_DEFAULT,
+ M_MSGBOX_CONFIRM_RESEND
+ ) )
+ {
+ // cancelled by user
+ return;
+ }
+
+ size_t countOk = 0;
+ for ( size_t n = 0; n < count; n++ )
+ {
+ Message_obj msg = GetMessage(messages[n]);
+ if ( !msg )
+ {
+ ERRORMESSAGE((_("Failed to retrieve the message to be resent")));
+ continue;
+ }
+
+ SendMessage_obj sendMsg = SendMessage::CreateResent
+ (
+ m_asmf->GetProfile(),
+ msg.Get(),
+ GetFrame()
+ );
+
+ if ( !sendMsg )
+ {
+ ERRORMESSAGE((_("Failed to create a new message.")));
+ continue;
+ }
+
+ String to = msg->GetAddressesString(MAT_TO),
+ cc = msg->GetAddressesString(MAT_CC),
+ bcc = msg->GetAddressesString(MAT_BCC);
+
+ sendMsg->SetAddresses(to, cc, bcc);
+
+ if ( !sendMsg->SendOrQueue() )
+ {
+ ERRORMESSAGE((_("Failed to resend the message %lu."), (unsigned long)n));
+ }
+ else
+ {
+ countOk++;
+ }
+ }
+
+ STATUSMESSAGE((_("Resent %lu messages."), (unsigned long)countOk));
}
-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates