Prop: make URL's clickable



Hi all!

I attach a patch (against today's cvs) which makes url's in mails clickable
and calls the browser defined in the Gnome Control Center with it.

Basically, it scans mails for [s]http://... and [s]ftp:// entries, prints them
in a different color, and uses gnome_url_show() to invoke the browser if the
left mouse button is released over one of this entries. Changed files are---

* src/balsa-app.h: added field for url color
* src/save-restore.c: save and restore this entry
* src/pref-manager.c: add "Hyperlink color" in the Colors notebook
* src/balsa-message.c: the stuff to detect and store url's, and to call the
browser.

Although I hope that this patch makes life a little easier, it is far from
being perfect. As I did not want to move from the gtk_text widget, I can not
change the mouse cursor shape when it moves over an URL. The alternative would
be using a canvas (like gnome-help-browser does?), but then we loose the
ability to select (and copy & past) parts of a message. Maybe it is possible
to hack an extension, catching the motion-notify-event, and change the cursor.

An other nice extension would be to make mailto:... links clickable as well.
This would lead to some bigger changes in sendmsg_window_new(), though.

As always, any comment is really welcome!

Yours, 
	Albrecht.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Albrecht Dreß  -  Monschauer Straße 22  -  D-53121 Bonn (Germany)
      Phone (+49) 228 6199571  -  E-Mail albrecht.dress@arcormail.de
_________________________________________________________________________

balsa-url-patch.gz



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]