Bug 103387 - Allow drag and drop of articles to other programs
Summary: Allow drag and drop of articles to other programs
Status: RESOLVED FIXED
Alias: None
Product: akregator
Classification: Applications
Component: general (show other bugs)
Version: 1.0
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-06 23:30 UTC by Eckhart Wörner
Modified: 2008-11-30 22:10 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eckhart Wörner 2005-04-06 23:30:41 UTC
Version:           1.0 (using KDE 3.4.0, Debian Package 4:3.4.0-0ubuntu3 (3.1))
Compiler:          gcc version 3.3.5 (Debian 1:3.3.5-8ubuntu2)
OS:                Linux (i686) release 2.6.10-5-386

At the moment, you can't drag an article from the articles list to another program, e.g. drag'n drop it to an e-mail. It should behave like KMail itself where dragging a mail to the mail composer will attach that mail.
Comment 1 Teemu Rytilahti 2005-05-12 23:22:25 UTC
Sounds reasonable.
Comment 2 Teemu Rytilahti 2005-05-15 22:29:00 UTC
SVN commit 414333 by rytilahti:

Allow dragging of article. (will give you link for the article)
This feature removes also bug when multiple articles are marked as read when trying to drag something :)
warning-- too...

BUGS:103384
FEATURE:103387



 M  +10 -2     trunk/KDE/kdepim/akregator/src/articlelistview.cpp  
 M  +3 -0      trunk/KDE/kdepim/akregator/src/articlelistview.h  


--- trunk/KDE/kdepim/akregator/src/articlelistview.cpp #414332:414333
@@ -34,6 +34,7 @@
 #include <kiconloader.h>
 #include <klocale.h>
 #include <kcharsets.h>
+#include <kurl.h>
 
 #include <qdatetime.h>
 #include <qpixmap.h>
@@ -41,6 +42,7 @@
 #include <qvaluelist.h>
 #include <qwhatsthis.h>
 #include <qheader.h>
+#include <qdragobject.h>
 
 using namespace Akregator;
 
@@ -113,7 +115,7 @@
     setItemsRenameable(false);
     setItemsMovable(false);
     setAllColumnsShowFocus(true);
-    setDragEnabled(false); // FIXME before we implement dragging between archived feeds??
+    setDragEnabled(true); // FIXME before we implement dragging between archived feeds??
     setAcceptDrops(false); // FIXME before we implement dragging between archived feeds??
     setFullWidth(false);
     
@@ -317,6 +319,12 @@
     }
 }
 
+QDragObject *ArticleListView::dragObject()
+{
+    QDragObject *d = new QTextDrag(currentItem()->article().link().prettyURL(), this);
+    return d;
+}
+
 void ArticleListView::slotPreviousArticle()
 {
     QListViewItem *lvi = currentItem();
@@ -446,7 +454,7 @@
         emit signalArticleChosen( ai->article() );
 }
 
-void ArticleListView::slotCurrentChanged(QListViewItem* item)
+void ArticleListView::slotCurrentChanged(QListViewItem*/* item*/)
 {/*
     ArticleItem* ai = dynamic_cast<ArticleItem*> (item);
     if (ai)
--- trunk/KDE/kdepim/akregator/src/articlelistview.h #414332:414333
@@ -32,6 +32,7 @@
 #include <qptrlist.h>
 
 class QKeyEvent;
+class QDragObject;
 
 namespace Akregator
 {
@@ -118,6 +119,8 @@
             /** applies text filter and status filter by setting visibility
             of items accordingly */
             virtual void applyFilters();
+            
+            virtual QDragObject *dragObject();
 
         protected slots:
             virtual void slotSelectionChanged();
Comment 3 squan 2008-11-30 22:10:58 UTC
This feature is broken in 4.1.3.
How can I reopen this bug?