Bug 97385 - action > add to akregator
Summary: action > add to akregator
Status: RESOLVED FIXED
Alias: None
Product: akregator
Classification: Applications
Component: akregator konqueror plugin (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-18 20:47 UTC by _
Modified: 2005-02-19 17:11 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 _ 2005-01-18 20:47:24 UTC
Version:            (using KDE KDE 3.3.91)
Compiler:          gcc 3.4.3 
OS:                Linux

I miss the "Add to aKregator" action in Konqueror's action menu. Currently there is one for adding it to the KitchenSync Plucker Plugin (wouldn't know what it is but it shows a newspaper as icon).
Comment 1 Frank Osterfeld 2005-01-21 00:25:16 UTC
Do you have the konq plugin installed? It's now in kdeaddons/konq-plugins/akregator.
Comment 2 _ 2005-01-21 13:34:44 UTC
Yes I have.
Comment 3 Teemu Rytilahti 2005-01-25 23:58:34 UTC
Hmm, add to akregator 2nd button menu entry is only shown when you click on a feed link.
Comment 4 Frank Osterfeld 2005-02-19 17:11:14 UTC
CVS commit by osterfeld: 

fix plugin. Somehow iterating over the list didn't work, I switched iterator type from KFileItemListIterator to KFileItem*,
using the standard QPtrList methods first() and next().
BUG: 97385


  M +11 -10    akregatorplugin.cpp   1.23


--- kdeaddons/konq-plugins/akregator/akregatorplugin.cpp  #1.22:1.23
@@ -52,4 +52,5 @@ AkregatorMenu::AkregatorMenu( KonqPopupM
     : KonqPopupMenuPlugin( popupmenu, name), PluginBase()
 {
+    kdDebug() << "AkregatorMenu::AkregatorMenu()" << endl;
     if ( QCString( kapp->name() ) == "kdesktop" && !kapp->authorize("editable_desktop_icons" ) )
         return;
@@ -73,19 +74,19 @@ AkregatorMenu::AkregatorMenu( KonqPopupM
     //KFileItemList m_list = popupmenu->fileItemList();
     // See if any are RSS feeds.
-    KFileItemListIterator it(popupmenu->fileItemList());
-    KFileItem *item;
 
-    while ( ( item = it.current() ) != 0 )
+    KFileItem* it = popupmenu->fileItemList().first();
+    while (it != 0)
     {
-        ++it;
-        if (isFeedUrl(item))
+        if (isFeedUrl(it))
         {
-            kdDebug() << "Akregator::Menu found feed URL " << item->url().prettyURL() << endl;
+            kdDebug() << "AkregatorMenu: found feed URL " << it->url().prettyURL() << endl;
             KAction *action = new KAction( i18n( "Add Feed to aKregator" ), "akregator", 0, this, SLOT( slotAddFeed() ), actionCollection(), "akregatorkonqplugin_mnu" );
             addAction( action );
             addSeparator();
-            m_feedURL = item->url().url();
+            m_feedURL = it->url().url();
             break;
         }
+        
+        it = popupmenu->fileItemList().next();
     }
 }
@@ -98,5 +99,5 @@ AkregatorMenu::~AkregatorMenu()
 bool AkregatorMenu::isFeedUrl(const QString &url)
 {
-    if (url.contains(".htm", false)) return false;
+    if (url.contains(".htm", false) != 0) return false;
     if (url.contains("rss", false) != 0) return true;
     if (url.contains("rdf", false) != 0) return true;