[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdepim/korganizer
From:       Bram Schoenmakers <bramschoenmakers () kde ! nl>
Date:       2005-03-24 13:06:53
Message-ID: 20050324130653.77F583E9 () office ! kde ! org
[Download RAW message or body]

CVS commit by bram: 

o Add attachment to item when dropping file on it.
o Use functionality from libemailfunctions to split up e-mail addresses
o Don't allow drops on quick editor todo's


  M +16 -9     kotodoview.cpp   1.198


--- kdepim/korganizer/kotodoview.cpp  #1.197:1.198
@@ -48,4 +48,6 @@
 #include <libkdepim/kdatepickerpopup.h>
 
+#include <libemailfunctions/email.h>
+
 #include "docprefs.h"
 
@@ -253,7 +255,10 @@ void KOTodoListView::contentsDropEvent( 
       //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) );
       kdDebug(5850) << "Dropped : " << text << endl;
-      QStringList emails = QStringList::split(",",text);
       Todo*todo = todoi->todo();
       Todo*oldtodo = todo->clone();
+      if( text.startsWith( "file:" ) ) {
+        todo->addAttachment( new Attachment( text ) );
+      } else {
+        QStringList emails = KPIM::splitEmailAddrList( text );
       if ( mChanger->beginChange( todo ) ) {
         for(QStringList::ConstIterator it = emails.begin();it!=emails.end();++it) {
@@ -266,4 +271,5 @@ void KOTodoListView::contentsDropEvent( 
           }
         }
+        }
         mChanger->changeIncidence( oldtodo, todo );
         mChanger->endChange( todo );
@@ -364,4 +370,5 @@ KOTodoView::KOTodoView( Calendar *calend
 
   mQuickAdd = new KPIM::ClickLineEdit( this, i18n( "Click to add a new to-do" ) );
+  mQuickAdd->setAcceptDrops( false );
   topLayout->addWidget( mQuickAdd );
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic