Bug 77291 - 'copy link location' doesn't work from knode
Summary: 'copy link location' doesn't work from knode
Status: RESOLVED FIXED
Alias: None
Product: knode
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: 0.7.7
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-11 15:32 UTC by Amit Shah
Modified: 2004-07-10 17:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Amit Shah 2004-03-11 15:32:25 UTC
Version:           0.7.7 (using KDE 3.2.1,  (testing/unstable))
Compiler:          gcc version 3.3.3 (Debian)
OS:          Linux (i686) release 2.6.3-mm3

1. Right-click on a url in a knode article
2. paste somewhere. 

The pasted text is the last 'copy' action.

3. Select the latest 'copy' action from klipper (which it shows as the default).

4. Paste.

You get the right text this time.
Comment 1 Amit Shah 2004-07-03 15:58:37 UTC
Hi, is anyone working on this one? This is quite an irritating bug. I can help if someone points me to the right places.
Comment 2 Volker Krause 2004-07-03 16:41:49 UTC
> 2. paste somewhere.
>
> The pasted text is the last 'copy' action.

This only happens here with MMB-paste, not with Edit->Paste.

So, now one could argue if this is a bug or not. As far as I understand the copy/paste stuff, MMB should paste the current selection while Edit->Paste should paste the clipboard content. Since you copy the link into the clipboard and don't select it, the current behaviour would be correct...
On the other hand, when using "Copy link location" in KHTML (and thus also KMail) MMB-paste works too.
I agree that this should be solved consistently within KDE, but therefore it would be good to know what the right behaviour is ;)
Comment 3 Amit Shah 2004-07-03 16:55:29 UTC
On Saturday 03 Jul 2004 20:11, Volker Krause wrote:
> clipboard and don't select it, the current behaviour would be correct... On
> the other hand, when using "Copy link location" in KHTML (and thus also
> KMail) MMB-paste works too. I agree that this should be solved consistently
> within KDE, but therefore it would be good to know what the right behaviour
> is ;)

Right. Where could we discuss this? kde-usability?

Comment 4 Volker Krause 2004-07-03 17:41:16 UTC
> Where could we discuss this? kde-usability?

I guess that might be the right place.
Comment 5 Amit Shah 2004-07-10 11:21:08 UTC
Hi Volker, can you please fix this for the next beta (as well as 3_2_branch) since this is how kmail does things; and there weren't any responses on the -usability list?

Thanks.
Comment 6 Volker Krause 2004-07-10 17:02:21 UTC
CVS commit by vkrause: 

- Fix copying of email addresses.
- Make link copy behaviour consistent with khtml/kmail (ie. set the selection too).

CCMAIL: 77291-done@bugs.kde.org


  M +7 -4      knarticlewidget.cpp   1.180


--- kdepim/knode/knarticlewidget.cpp  #1.179:1.180
@@ -3,5 +3,5 @@
 
     KNode, the KDE newsreader
-    Copyright (c) 1999-2001 the KNode authors.
+    Copyright (c) 1999-2004 the KNode authors.
     See file AUTHORS for details
 
@@ -1609,4 +1609,5 @@ void KNArticleWidget::anchorClicked(cons
     }
     else if ( type==ATauthor || type == ATmailto ) {
+        if ( type == ATauthor )
         target = a_rticle->from()->asUnicodeString();
         switch( u_mailtoPopup->exec( *p ) ) {
@@ -1618,5 +1619,6 @@ void KNArticleWidget::anchorClicked(cons
             break;
         case PUP_COPYTOCLIPBOARD:
-            QApplication::clipboard()->setText(target);
+            QApplication::clipboard()->setText(target, QClipboard::Clipboard);
+            QApplication::clipboard()->setText(target, QClipboard::Selection);
             break;
         }
@@ -1629,5 +1631,6 @@ void KNArticleWidget::anchorClicked(cons
         break;
         case PUP_COPYURL:
-          QApplication::clipboard()->setText(target);
+          QApplication::clipboard()->setText(target, QClipboard::Clipboard);
+          QApplication::clipboard()->setText(target, QClipboard::Selection);
         break;
       case PUP_ADDBOOKMARKS:


Comment 7 Amit Shah 2004-07-10 17:17:46 UTC
On Saturday 10 Jul 2004 20:32, Volker Krause wrote:
> - Fix copying of email addresses.
> - Make link copy behaviour consistent with khtml/kmail (ie. set the
> selection too).

Hey Volker, thanks!