Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1:/tmp/cvs-serv27050/src/gui

Modified Files:
        ClickURL.cpp 
Log Message:
added Reply/Forward To commands to mail address popup menu

Index: ClickURL.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/ClickURL.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -b -u -2 -r1.17 -r1.18
--- ClickURL.cpp        19 Sep 2003 13:31:20 -0000      1.17
+++ ClickURL.cpp        19 Sep 2003 19:24:45 -0000      1.18
@@ -122,4 +122,7 @@
    {
       Append(WXMENU_URL_COMPOSE, _("&Write to"));
+      Append(WXMENU_URL_REPLYTO, _("&Reply to"));
+      Append(WXMENU_URL_FORWARDTO, _("&Forward to"));
+      AppendSeparator();
       Append(WXMENU_URL_ADD_TO_ADB, _("&Add to address book..."));
    }
@@ -130,4 +133,5 @@
    }
 
+   AppendSeparator();
    Append(WXMENU_URL_COPY, _("&Copy to clipboard"));
 }
@@ -136,5 +140,5 @@
 UrlPopup::OnCommandEvent(wxCommandEvent &event)
 {
-   int id = event.GetId();
+   const int id = event.GetId();
    switch ( id )
    {
@@ -152,4 +156,29 @@
          break;
 
+      case WXMENU_URL_REPLYTO:
+      case WXMENU_URL_FORWARDTO:
+         {
+            MessageView *msgview = m_clickableURL->GetMessageView();
+
+            MailFolder::Params params;
+            params.msgview = msgview;
+
+            Composer *cv = (id == WXMENU_URL_REPLYTO
+                              ? MailFolder::ReplyMessage
+                              : MailFolder::ForwardMessage)
+                                (
+                                  msgview ? msgview->GetMessage() : NULL,
+                                  params,
+                                  m_clickableURL->GetProfile(),
+                                  msgview ? msgview->GetWindow() : NULL
+                                );
+
+            if ( cv )
+            {
+               cv->SetAddresses(m_clickableURL->GetUrl());
+            }
+         }
+         break;
+
       case WXMENU_URL_ADD_TO_ADB:
          m_clickableURL->AddToAddressBook();
@@ -429,4 +458,6 @@
 {
    Composer *cv = Composer::CreateNewMessage(GetProfile());
+
+   CHECK_RET( cv, "creating new message failed?" );
 
    cv->SetAddresses(m_url);



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to