<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>120087</bug_id>
          
          <creation_ts>2006-01-14 09:46:26 +0000</creation_ts>
          <short_desc>Problems in the HTML viewer</short_desc>
          <delta_ts>2006-01-25 23:41:50 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>akregator</product>
          <component>general</component>
          <version>1.2</version>
          <rep_platform>unspecified</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>118247</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="András Manţia">amantia</reporter>
          <assigned_to name="kdepim bugs">pim-bugs-null</assigned_to>
          
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>405923</commentid>
    <comment_count>0</comment_count>
    <who name="András Manţia">amantia</who>
    <bug_when>2006-01-14 09:46:26 +0000</bug_when>
    <thetext>Version:           1.2 (using KDE 3.5.0, compiled sources)
Compiler:          Target: x86_64-suse-linux
OS:                Linux (x86_64) release 2.6.13-15.7-default

1. Proxy settings are not honoured. I have set up privoxy to filter the unwanted ads, but they still appear in aKregator as it does not use Konqueror&apos;s proxy settings.

2. Clicking on binary links opens the files in the HTML part instead of asking to open in external app or to save. Try to click on a download link from www.kde-apps.org. Related to this, if you explicitely try to save the link from the context menu, you get a &quot;Malformed URL&quot; error. The only way to save the binary data is to first open the page in an external browser.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>406876</commentid>
    <comment_count>1</comment_count>
    <who name="Frank Osterfeld">osterfeld</who>
    <bug_when>2006-01-17 16:05:48 +0000</bug_when>
    <thetext>SVN commit 499312 by osterfeld:

Fix handling of binary files in pageviewer. Increase the breakage in the URL handling of Viewer and PageViewer.
Man, I am so happy that this all goes the way of the dodo in trunk.
CCBUG: 120087


 M  +3 -0      ChangeLog  
 M  +14 -6     src/akregator_view.cpp  
 M  +1 -1      src/akregator_view.h  
 M  +13 -15    src/pageviewer.cpp  
 M  +7 -2      src/viewer.cpp  
 M  +3 -1      src/viewer.h  


--- branches/KDE/3.5/kdepim/akregator/ChangeLog #499311:499312
@@ -7,6 +7,9 @@
 
 Bug fixes:
 
+ 2006/01/17 Do not open binary files in the HTML viewer but externally. 
+            Fix Save Link As for binary files (regression introduced after 1.2) 
+            (#120087 (partially)) -fo
  2006/01/16 Fix article order in Combined View: sort by date (reversed) (#118055) -fo
  2006/01/15 Fix parsing of Atom 1.0 feeds with escaped HTML in it: Don&apos;t show tags
             as text (#112491, #117938) -fo
--- branches/KDE/3.5/kdepim/akregator/src/akregator_view.cpp #499311:499312
@@ -306,8 +306,8 @@
 
     connect(m_searchBar, SIGNAL(signalSearch(const Akregator::Filters::ArticleMatcher&amp;, const Akregator::Filters::ArticleMatcher&amp;)), m_articleViewer, SLOT(slotSetFilter(const Akregator::Filters::ArticleMatcher&amp;, const Akregator::Filters::ArticleMatcher&amp;)));
 
-    connect( m_articleViewer, SIGNAL(urlClicked(const KURL&amp;, bool)),
-             this, SLOT(slotUrlClickedInViewer(const KURL&amp;, bool)) );
+    connect( m_articleViewer, SIGNAL(urlClicked(const KURL&amp;, Viewer*, bool, bool)),
+             this, SLOT(slotUrlClickedInViewer(const KURL&amp;, Viewer*, bool, bool)) );
 
     connect( m_articleViewer-&gt;browserExtension(), SIGNAL(mouseOverInfo(const KFileItem *)),
                                             this, SLOT(slotMouseOverInfo(const KFileItem *)) );
@@ -430,8 +430,8 @@
 
     connect( page, SIGNAL(setTabIcon(const QPixmap&amp;)),
             this, SLOT(setTabIcon(const QPixmap&amp;)));
-    connect( page, SIGNAL(urlClicked(const KURL &amp;,bool)),
-            this, SLOT(slotUrlClickedInViewer(const KURL &amp;, bool)) );
+    connect( page, SIGNAL(urlClicked(const KURL &amp;, Viewer*, bool, bool)),
+            this, SLOT(slotUrlClickedInViewer(const KURL &amp;, Viewer*, bool, bool)) );
 
     Frame* frame = new Frame(this, page, page-&gt;widget(), i18n(&quot;Untitled&quot;));
     frame-&gt;setAutoDeletePart(true); // delete page viewer when removing the tab
@@ -839,9 +839,17 @@
 }
 
 //TODO: KDE4 remove this ugly ugly hack
-void View::slotUrlClickedInViewer(const KURL&amp; url, bool background)
+void View::slotUrlClickedInViewer(const KURL&amp; url, Viewer* viewer, bool newTab, bool background)
 {
-    slotOpenURL(url, 0L, background ? BrowserRun::NEW_TAB_BACKGROUND : BrowserRun::NEW_TAB_FOREGROUND);
+    
+    if (!newTab)
+    {
+        slotOpenURL(url, viewer, BrowserRun::CURRENT_TAB);
+    }
+    else
+    {
+        slotOpenURL(url, 0L, background ? BrowserRun::NEW_TAB_BACKGROUND : BrowserRun::NEW_TAB_FOREGROUND);
+    }
 }
 
 //TODO: KDE4 remove this ugly ugly hack
--- branches/KDE/3.5/kdepim/akregator/src/akregator_view.h #499311:499312
@@ -294,7 +294,7 @@
             void slotOpenURLReply(const KURL&amp; url, Akregator::Viewer* currentViewer, Akregator::BrowserRun::OpeningMode mode);
 
             /** HACK: part of the url opening hack for 3.5. called when a viewer emits urlClicked(). TODO: Remove for KDE4 */
-            void slotUrlClickedInViewer(const KURL&amp; url, bool background);
+            void slotUrlClickedInViewer(const KURL&amp; url, Viewer* viewer, bool newTab, bool background);
 
             void slotOpenURL(const KURL&amp; url, Akregator::Viewer* currentViewer, Akregator::BrowserRun::OpeningMode mode);
 
--- branches/KDE/3.5/kdepim/akregator/src/pageviewer.cpp #499311:499312
@@ -270,21 +270,6 @@
 
 }
 
-void PageViewer::urlSelected(const QString &amp;url, int button, int state, const QString &amp;_target, KParts::URLArgs args)
-{
-    updateHistoryEntry();
-    if (button == MidButton)
-        Viewer::urlSelected(url, button, state, _target, args);
-    else
-    {
-        browserExtension()-&gt;setURLArgs(args);
-        if (_target.lower() == &quot;_blank&quot;)
-            Viewer::urlSelected(url, button, state, _target, args);
-        else
-            openURL(completeURL(url) );
-    }
-}
-
 void PageViewer::slotPopupActivated( int id )
 {
     QValueList&lt;HistoryEntry&gt;::Iterator it = d-&gt;history.begin();
@@ -360,6 +345,19 @@
     d-&gt;stopAction-&gt;setEnabled(false);
 }
 
+void PageViewer::urlSelected(const QString &amp;url, int button, int state, const QString &amp;_target, KParts::URLArgs args)
+{
+    if (button == LeftButton)
+    {
+        m_url = completeURL(url);
+        browserExtension()-&gt;setURLArgs(args); 
+        slotOpenLinkInThisTab();
+    }
+    else
+    {
+        Viewer::urlSelected(url,button,state,_target,args);
+    }
+}
 
 void PageViewer::slotSetCaption(const QString&amp; cap) 
 {
--- branches/KDE/3.5/kdepim/akregator/src/viewer.cpp #499311:499312
@@ -232,14 +232,19 @@
 
 void Viewer::slotOpenLinkInForegroundTab()
 {
-    emit urlClicked(m_url, false);
+    emit urlClicked(m_url, this, true, false);
 }
 
 void Viewer::slotOpenLinkInBackgroundTab()
 {
-    emit urlClicked(m_url, true);
+    emit urlClicked(m_url, this, true, true);
 }
 
+void Viewer::slotOpenLinkInThisTab()
+{
+    emit urlClicked(m_url, this, false, false);
+}
+
 void Viewer::slotOpenLinkInBrowser()
 {
     displayInExternalBrowser(m_url, QString::null);
--- branches/KDE/3.5/kdepim/akregator/src/viewer.h #499311:499312
@@ -66,7 +66,7 @@
         
         signals:
             /** This gets emitted when url gets clicked */
-            void urlClicked(const KURL&amp; url, bool background=false);
+            void urlClicked(const KURL&amp; url, Viewer* viewer, bool newTab, bool background);
 
             protected: // methods
             int pointsToPixel(int points) const;
@@ -100,6 +100,8 @@
 
             /** Opens @c m_url in background tab */
             virtual void slotOpenLinkInBackgroundTab();
+            
+            virtual void slotOpenLinkInThisTab();
 
             virtual void slotSaveLinkAs();
 
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>408996</commentid>
    <comment_count>2</comment_count>
    <who name="Frank Osterfeld">osterfeld</who>
    <bug_when>2006-01-25 23:41:50 +0000</bug_when>
    <thetext>2) is fixed, 1) is a dupe of 118247

*** This bug has been marked as a duplicate of 118247 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>