Bug 86735 - Bookmarking of articles in global bookmarks
Summary: Bookmarking of articles in global bookmarks
Status: RESOLVED FIXED
Alias: None
Product: akregator
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-06 23:33 UTC by Michael Schuerig
Modified: 2004-12-02 05:19 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 Michael Schuerig 2004-08-06 23:33:31 UTC
Version:           1.0-beta5 "Pierre" (using KDE 3.2.3,  (3.1))
Compiler:          gcc version 3.3.4 (Debian 1:3.3.4-7)
OS:                Linux (i686) release 2.6.7

Sometimes I find an interesting article that I don't want to read right away. In that case I'd like to have an easy way to record a reference to the article for later.

This could be handled entirely within akregator (see 85242), but I favor another solution. I'd like to be able to add a bookmark in the global bookmarks, i.e. those shared with Konqueror.

Michael
Comment 1 George Staikos 2004-12-02 05:19:46 UTC
CVS commit by staikos: 

Allow bookmarking articles in global bookmarks
FEATURE: 86735


  M +1 -0      akregator_view.cpp   1.173
  M +18 -0     pageviewer.cpp   1.17
  M +3 -0      pageviewer.h   1.12


--- kdenonbeta/akregator/src/akregator_view.cpp  #1.172:1.173
@@ -719,4 +719,5 @@ void aKregatorView::slotTabCaption(const
         PageViewer *pv=(PageViewer *)sender();
         m_tabs->setTitle(capt, pv->widget());
+        pv->slotSetCaption(capt);
     }
 }

--- kdenonbeta/akregator/src/pageviewer.cpp  #1.16:1.17
@@ -12,4 +12,6 @@
 #include <kaction.h>
 #include <kapplication.h>
+#include <kbookmark.h>
+#include <kbookmarkmanager.h>
 #include <kglobalsettings.h>
 #include <khtmlview.h>
@@ -256,4 +258,19 @@ void PageViewer::slotCancelled( const QS
 }
 
+
+void PageViewer::slotSetCaption(const QString& cap) {
+    m_caption = cap;
+}
+
+
+void PageViewer::slotGlobalBookmarkArticle()
+{
+    KBookmarkManager *mgr = KBookmarkManager::userBookmarksManager();
+    KBookmarkGroup grp = mgr->root();
+    grp.addBookmark(mgr, m_caption, toplevelURL());
+    mgr->save();
+}
+
+
 void PageViewer::slotPopupMenu(KXMLGUIClient*, const QPoint& p, const KURL& kurl, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t)
 {
@@ -320,4 +337,5 @@ void PageViewer::slotPopupMenu(KXMLGUICl
         if (ac)
             ac->plug(&popup);
+        popup.insertItem(SmallIcon("bookmark_add"),i18n("Add to Konqueror Bookmarks"), this, SLOT(slotGlobalBookmarkArticle()));
     }
     

--- kdenonbeta/akregator/src/pageviewer.h  #1.11:1.12
@@ -51,4 +51,5 @@ namespace Akregator
             void slotReload();
             void slotStop();
+            void slotSetCaption(const QString& cap);
 
         protected:
@@ -66,4 +67,5 @@ namespace Akregator
             void slotCopy();
             void slotSelectionChanged();
+            void slotGlobalBookmarkArticle();
             
         private:
@@ -79,4 +81,5 @@ namespace Akregator
 
             bool m_restoring;
+            QString m_caption;
             
         private slots: