|
From: | Lennart Borgman |
Subject: | Re: fancy-splash-screen customize group... |
Date: | Wed, 07 Dec 2005 01:34:02 +0100 |
User-agent: | Mozilla Thunderbird 1.0.7 (Windows/20050923) |
Luc Teirlinck wrote:
I do not think it will make things more complicated. This is what I am currently using for doing similar things:Lennart Borgman wrote:You are right, I forgot those. Of course I mean that those should be changed too. Is not that easy enough to do now?I did not look at it in depth, but at first view it does not look that trivial. You would have to make the :link widget type more different from other widget types, thereby making the widget library less homogeneous and, I would guess, thereby more complex (as if it were not already complicated enough).
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> (defface emacsw32-link-face `((((class color) (background light)) (:foreground "blue" :underline t)) (((class color) (background dark)) (:foreground "cyan" :underline t))) "Face used to highlight attributes that are links." :group 'emacsw32) (defun emacsw32-custom-url-link(txt url) (let ((plain-url (substring-no-properties url))) (unless (equal txt url) (put-text-property 0 (length txt) 'help-echo plain-url txt)) (put-text-property 0 (length txt) 'mouse-face 'highlight txt) (let ((btn (widget-create 'push-button :notify 'emacsw32-notify-btn-url :button-face 'emacsw32-link-face :button-prefix "" :button-suffix "" txt))) (widget-put btn 'url url)))) (defun emacsw32-notify-btn-url(widget &rest ignore) (browse-url (widget-get widget 'url))) ;;; Use it like this: (emacsw32-custom-url-link "GNU Home page" "http://www.gnu.org/") <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<Changing this code a bit will do the trick I believe. No changes to basic functions are needed. Or am I wrong?
[Prev in Thread] | Current Thread | [Next in Thread] |