kdenetwork/kmail

Waldo Bastian bastian at kde.org
Thu Aug 15 19:11:49 BST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 15 August 2002 03:12 am, Marc Mutz wrote:
> On Thursday 15 August 2002 09:34, Daniel Molkentin wrote:
> > Mi Marc!
> >
> > >There's a reason that not all of these protocols are highlighted.
> > > Why should an smb URL be highlighted in an _email_???
> >
> > Because some ppl use it in the intranet where it is interesting to
> > have that. I am also considering to add fish://, if that is fine for
> > you (if course this again is more of an internet thingy).
>
> <snip>
>
> It's fine with me if instead of hacking all protocols directly, you do
> the following:
>
> Enhance linklocator to recognize _any_ url (plus www.*, ftp.* like it
> does now) and add a config section
> [URL highlighting]
> # whether to enable or disable URL highlighting for the reader:
> default=diasable
> allow_ftp=true
> allow_ftps=true
> allow_http=true
> allow_https=enable
> and install that as the global kmailrc. There's no need for a GUI, since
> this should be something the admin enables or disables.

> LinkLocator would then lookup the protocol found thus:
> bool allowHighlight( const QString & proto ) {
>   KConfigGroup config( kapp->config(), "URL highlighting" );
>   QString key = "allow_" + proto;
>   if ( !config.hasKey( key ) )
>     return config.readEntry("default") == "enable"; // disable is deflt
>   return config.readBoolEntry( key );
> }

Hi Marc,

I wanted to add a generic solution for this for almost a year now and still 
haven't done so. (I suck). In README.kiosk it is listed as 
authorizeURLAction(QString action, KURL referringURL, KURL destinationURL)

The idea is that various URL operations can check this for permissions so that 
you have all URL handling policies in one central place. We would need to 
define a set of defined actions such as "browse", "open", "redirect"

In this case you would call it then with something like:
if (kapp->authorizeURLAction("open", KURL("mail:"), url))
  do_highlight

It sucks a little because mail messages don't have a real URL of their own, so 
we will have to use something like "mail:" instead, but you get the idea I 
hope.

Cheers,
Waldo
- -- 
bastian at kde.org  |   SuSE Labs KDE Developer  |  bastian at suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9W+7lN4pvrENfboIRAlhlAJ4+gA5K5XiYloPQeKOEI2mKjRJvUACfTnAV
3dGl9wHSNBCyjgwwayIsIF8=
=VdmS
-----END PGP SIGNATURE-----





More information about the kde-core-devel mailing list