Bug 103224 - please add mail function
Summary: please add mail function
Status: RESOLVED FIXED
Alias: None
Product: akregator
Classification: Applications
Component: kontact plugin (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-04 20:25 UTC by Christian Weilbach
Modified: 2005-05-22 07:46 UTC (History)
0 users

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 Christian Weilbach 2005-04-04 20:26:59 UTC
Version:           Unbekannt (using KDE 3.4.0, Gentoo)
Compiler:          gcc version 3.4.3-20050110 (Gentoo Linux 3.4.3.20050110-r1, ssp-3.4.3.20050110-0, pie-8.7.7)
OS:                Linux (i686) release 2.6.11-cko1

Please add a filemenue entry, which makes it possible to send a link or the site itself to a friend via email. This already works in konqueror... so you have to open the sites in the external browser.
Comment 1 Teemu Rytilahti 2005-05-22 07:46:22 UTC
SVN commit 416636 by rytilahti:

make possible to send link or article to a friend from file menu.. doesn't work in articleviewer, so you have to open the page into tab atm...


FEATURE:103224


 M  +4 -1      trunk/KDE/kdepim/akregator/src/actionmanager.cpp  
 M  +29 -0     trunk/KDE/kdepim/akregator/src/akregator_part.cpp  
 M  +4 -0      trunk/KDE/kdepim/akregator/src/akregator_part.h  
 M  +3 -1      trunk/KDE/kdepim/akregator/src/akregator_part.rc  
 M  +1 -1      trunk/KDE/kdepim/akregator/src/articlelistview.cpp  


--- trunk/KDE/kdepim/akregator/src/actionmanager.cpp #416635:416636
@@ -95,8 +95,11 @@
         
     new KAction(i18n("&Import Feeds..."), "", "", part, SLOT(fileImport()), m_actionCollection, "file_import");
     new KAction(i18n("&Export Feeds..."), "", "", part, SLOT(fileExport()), m_actionCollection, "file_export");
-    new KAction(i18n("&Get Feeds From Web..."), "", "", part, SLOT(fileGetFeeds()), m_actionCollection, "file_getfromweb");
+    //new KAction(i18n("&Get Feeds From Web..."), "", "", part, SLOT(fileGetFeeds()), m_actionCollection, "file_getfromweb");
     
+    new KAction(i18n("Send &Link Address..."), "mail_generic", "", part, SLOT(fileSendLink()), m_actionCollection, "file_sendlink");
+    new KAction(i18n("Send &File..."), "mail_generic", "", part, SLOT(fileSendFile()), m_actionCollection, "file_sendfile");
+    
     KStdAction::configureNotifications(part, SLOT(showKNotifyOptions()), m_actionCollection); // options_configure_notifications
     new KAction( i18n("Configure &Akregator..."), "configure", "", part, SLOT(showOptions()), m_actionCollection, "akregator_configure_akregator" );
 }
--- trunk/KDE/kdepim/akregator/src/akregator_part.cpp #416635:416636
@@ -567,6 +567,35 @@
      //KNS::DownloadDialog::open("akregator/feeds", i18n("Get New Feeds"));
 }
 
+void Part::fileSendArticle(bool attach)
+{
+    // FIXME: you have to open article to tab to be able to send...
+    QString title, text;
+    
+    text = m_view->currentFrame()->part()->url().prettyURL();
+    if(text.isEmpty() || text.isNull())
+        return;
+    
+    title = m_view->currentFrame()->title();
+    
+    if(attach) { 
+        kapp->invokeMailer("", 
+                           "", 
+                           "", 
+                           title, 
+                           text, 
+                           "", 
+                           text);
+    }
+    else {
+        kapp->invokeMailer("", 
+                           "", 
+                           "", 
+                           title, 
+                           text);
+    }
+}
+
 void Part::fetchAllFeeds()
 {
     m_view->slotFetchAllFeeds();
--- trunk/KDE/kdepim/akregator/src/akregator_part.h #416635:416636
@@ -141,6 +141,10 @@
             void fileImport();
             void fileExport();
             void fileGetFeeds();
+            
+            void fileSendLink() { fileSendArticle(); }
+            void fileSendFile() { fileSendArticle(true); }
+            void fileSendArticle(bool attach=false);
 
             /** Shows configuration dialog */
             void showOptions();
--- trunk/KDE/kdepim/akregator/src/akregator_part.rc #416635:416636
@@ -1,5 +1,5 @@
 <!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui name="akregator_part" version="48">
+<kpartgui name="akregator_part" version="49">
 <MenuBar>
   <Menu name="file">
     <Action name="file_import"/>
@@ -7,6 +7,8 @@
     <Action name="file_getfromweb"/>
     <Separator/> 
     <Action name="file_print"/>
+    <Action name="file_sendlink"/>
+    <Action name="file_sendfile"/>
     <Separator/> 
   </Menu>
 
--- trunk/KDE/kdepim/akregator/src/articlelistview.cpp #416635:416636
@@ -75,7 +75,7 @@
 {
     QColorGroup cg2(cg);
     
-    // XXX: make configurable
+    // FIXME: make configurable
     if (article().status()==Article::Unread)
         cg2.setColor(QColorGroup::Text, Qt::blue);
     else if (article().status()==Article::New)