Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27466/src/gui
Modified Files:
wxComposeView.cpp
Log Message:
Just cleaning up code and commenting a bit...
Index: wxComposeView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxComposeView.cpp,v
retrieving revision 1.390
retrieving revision 1.391
diff -b -u -2 -r1.390 -r1.391
--- wxComposeView.cpp 14 Nov 2005 10:25:20 -0000 1.390
+++ wxComposeView.cpp 15 Nov 2005 15:22:30 -0000 1.391
@@ -1909,4 +1909,9 @@
+// A simple subclass of wxFileDropTarget so that the composer
+// window can be dropped files to be attached to the message...
+//
+// Todo: also allow messages to be dropped (but this is much more complicated)
+
class wxComposeViewFileDropTarget : public wxFileDropTarget {
public:
@@ -1915,8 +1920,11 @@
, m_composeView(composeView)
{}
+
+ // This method is called when a set of files is dropped onto the window
virtual bool OnDropFiles(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), const
wxArrayString& filenames) {
size_t countFiles = filenames.GetCount();
for ( size_t nFiles = 0; nFiles < countFiles; nFiles++ )
{
+ // Insert each of them as an attachment
m_composeView->InsertFile(filenames[nFiles]);
}
@@ -1947,6 +1955,7 @@
CreateToolAndStatusBars();
- m_dropTarget = new wxComposeViewFileDropTarget(this);
- SetDropTarget(m_dropTarget);
+ // Create the wxFileDropTarget subclass that allows to
+ // drop files in the Composer window
+ SetDropTarget(new wxComposeViewFileDropTarget(this));
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates