Bug 76256 - feature to load external references manually (when disabled)
Summary: feature to load external references manually (when disabled)
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: 1.6.51
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 43775 90770 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-02-27 11:01 UTC by Roger Larsson
Modified: 2007-09-14 12:17 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to enable this feature (7.26 KB, patch)
2004-04-18 23:30 UTC, Jason Keirstead
Details
Patch version 2 (7.70 KB, patch)
2004-04-19 13:46 UTC, Jason Keirstead
Details
Fix for patch (7.70 KB, patch)
2004-04-19 22:59 UTC, Jason Keirstead
Details
Updated patch (9.48 KB, patch)
2004-06-30 02:30 UTC, Roger Larsson
Details
Fixed updated patch (8.49 KB, patch)
2004-06-30 02:38 UTC, Roger Larsson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roger Larsson 2004-02-27 11:01:40 UTC
Version:           1.6.51 (using KDE 3.2.90 (CVS >= 20040117), compiled sources)
Compiler:          gcc version 3.3.1 (SuSE Linux)
OS:          Linux (i686) release 2.4.21-192-default

Related to bug 34857 and bug 54779

Without the possibility to manually download and view
images, the feature to disable automatic load of external references is incomplete.

In browsers you can specify that you do not want to
automatically download messages, but then you can do
it manually later.
Comment 1 Jens 2004-03-31 10:04:09 UTC
Hi,

I would also like this feature. Currently, even attached images are displayed not "where they are supposed to be" but below the whole mail, if you have IMAP "load attachments on demand" enabled.

I would like this to be an option that

- loads all external references
- loads all needed attachments
- and renders the whole mail as HTML (or as needed).

Thank you!


Jens
Comment 2 Jason Keirstead 2004-04-18 23:30:13 UTC
Created attachment 5689 [details]
Patch to enable this feature

I have wanted this for a long time, so I just decided to do it. Attached is a
patch to let you toggle "View External References" on demand. It is on the
right click of the preview pane and mail open window, and also under the "View"
menu. It is a KAction so you could also add it to your toolbar.

KMail devs, please review + commit. Patched against HEAD on Sun Apr 18 18:29:22
ADT 2004
Comment 3 Jason Keirstead 2004-04-19 13:46:23 UTC
Created attachment 5693 [details]
Patch version 2

Version 2 of the patch. This one is better in that the setting is re-loaded
oneach call of setMsg, so it really is *on demand*, you are only viewing
external refs for that one message. Also I call a simpler method to refresh the
HTML.
Comment 4 Jason Keirstead 2004-04-19 22:59:38 UTC
Created attachment 5699 [details]
Fix for patch

Last patch had a bug in it, deleted a line by mistake
Comment 5 Roger Larsson 2004-04-21 00:44:25 UTC
Almost perfect! (attachment id=5699 - isn't it stand alone?)

But the choice of keyboard shortcut (L) clashes with "reply to mailing list"
Can't find it in the menu bar...
No icon when in toolbar - what about the KGet icon? (circle with down arrow)
Comment 6 Jason Keirstead 2004-04-21 00:56:27 UTC
Hrm, I will probably just remove the shortcut unless someone has a good suggestion for it.

It is in the menu bar under View.

There's lots of Menu KActions without icons when in the toolbar. I was thinking it would be more of a right click action ( it is in the right click menu on preview pane or main viewer window ). Anyways, The KGet icon really isn't a good fit, and that would make it depend on KGet being installed.
Comment 7 Roger Larsson 2004-04-21 02:25:59 UTC
Shortcut: 'W' as in World Wide Web
Comment 8 Jason Keirstead 2004-04-21 02:29:45 UTC
On April 20, 2004 09:26 pm, Roger Larsson wrote:
> ------- Additional Comments From roger.larsson norran net  2004-04-21 02:25 -------
> Shortcut: 'W' as in World Wide Web

That's not a very good one, the letter W isn't anywhere in "Load External References" at all.

I was thinking maybe E, I can't find E in use anywhere in KMail.

Comment 9 Jason Keirstead 2004-04-21 02:31:19 UTC
On April 20, 2004 09:28 pm, Jason Keirstead wrote:
> On April 20, 2004 09:26 pm, Roger Larsson wrote:
> > ------- Additional Comments From roger.larsson norran net  2004-04-21 02:25 -------
> > Shortcut: 'W' as in World Wide Web
> 
> That's not a very good one, the letter W isn't anywhere in "Load External References" at all.
> 
> I was thinking maybe E, I can't find E in use anywhere in KMail.
> 

Actually, E is in use by Forward...

Maybe Shift+L ?

Comment 10 Roger Larsson 2004-04-21 04:01:50 UTC
Shift+L is OK
but it has a small problem: A, Shift+A, R, Shift+R,
 F, Shift+F, and L are about replying.

X is about how to view stuff (fixed font), what about Shift+X (eXternal)?
Comment 11 Jason Keirstead 2004-04-21 05:06:07 UTC
> ------- Additional Comments From roger.larsson norran net  2004-04-21 04:01 -------
> Shift+L is OK
> but it has a small problem: A, Shift+A, R, Shift+R,
>  F, Shift+F, and L are about replying.
> 
> X is about how to view stuff (fixed font), what about Shift+X (eXternal)?

KMail has too many keys!!!

Shift+X will do.

Comment 12 Roger Larsson 2004-06-23 08:51:27 UTC
I have been running with this patch since it appeared and had
no problems with it.

Only one question, why does it remove the following line?

- mForwardActionMenu->insert( mRedirectAction );

Noticed that this patch is not in upcoming alpha/beta, why not?
Comment 13 Roger Larsson 2004-06-30 00:23:21 UTC
Found another problem with the patch, see bug 80375

The patch for kmreaderwin.cpp function setMsg
adds the following lines:
+
+    mViewer->setOnlyLocalReferences( mLocalRefs );
+    mExternalReferencesAction->setChecked( !mLocalRefs );
+    mExternalReferencesAction->setEnabled( mHtmlMail );

It is the setChecked call that later crashes.
In gdb you can not print *mExternalReferencesAction
this => probably not initiated at this time (html email print)
 
Comment 14 Roger Larsson 2004-06-30 01:14:26 UTC
There might be a problem with this line too

+    mViewer->setOnlyLocalReferences( mLocalRefs ); 

Can it be to late? Suppose you set external viewing for
one message == setOnlyLocalReferences(false).
Then click on another one.
Won't the new one load external references to _completion_
only to disable external references a moment later?
(This might be related to me noticing that showing some
 messages are slow)

Will try to prepare a patch that fixes these problems.

BTW is setOnlyLocalReferences false by default - I do not
fully trust the program logic yet... If not it could cause
slow loading of first message clicked...
Comment 15 Roger Larsson 2004-06-30 02:30:13 UTC
Created attachment 6518 [details]
Updated patch

Changes:
  Default keyboard shortcut removed (use "shift X" or?)
  Crash fixed.

Remaining bug:
  Print output has not loaded external references
  (at least not when enabled temporarily for one message)

Possible problem:
  Original code did setOnlyLocalReferences(...) already
  in readConfig() never to change - 
  all these patches waits and are modifies value now
  and then... hmm... (review needed)
Comment 16 Roger Larsson 2004-06-30 02:38:35 UTC
Created attachment 6519 [details]
Fixed updated patch

A unrelated empty string check had sneaked in...
Comment 17 Tom Albers 2004-09-06 00:51:35 UTC
*** Bug 43775 has been marked as a duplicate of this bug. ***
Comment 18 Tom Albers 2004-10-08 20:24:20 UTC
*** Bug 90770 has been marked as a duplicate of this bug. ***
Comment 19 Tom Albers 2005-03-05 20:02:43 UTC
This is implemented in KDE 3.4.