X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=lisp%2Ftoolbar.el;h=4ddc1e04814cfacfe956dc6980684fa899980727;hp=74d44e7c030ae1c216496d57c808d88dfb37f338;hb=8102beb3c89559a36ffa287184fe7cae1d541de4;hpb=76759ab036458c54499a454399e19602b8ae6ce3 diff --git a/lisp/toolbar.el b/lisp/toolbar.el index 74d44e7..4ddc1e0 100644 --- a/lisp/toolbar.el +++ b/lisp/toolbar.el @@ -32,8 +32,8 @@ (defcustom toolbar-visible-p ;; added for the options menu - dverna apr. 98 (specifier-instance default-toolbar-visible-p) - "Whether the default toolbar is globally visible. This option can be -customized through the options menu." + "Whether the default toolbar is globally visible. +This option can be customized through the options menu." :group 'display :type 'boolean :set #'(lambda (var val) @@ -43,8 +43,8 @@ customized through the options menu." (defcustom toolbar-captioned-p ;; added for the options menu - dverna apr. 98 (specifier-instance toolbar-buttons-captioned-p) - "Whether the toolbars buttons are globally captioned. This option can be -customized through the options menu." + "Whether the toolbars buttons are globally captioned. +This option can be customized through the options menu." :group 'display :type 'boolean :set #'(lambda (var val) @@ -54,8 +54,9 @@ customized through the options menu." (defcustom default-toolbar-position ;; added for the options menu - dverna (default-toolbar-position) - "The location of the default toolbar. It can be 'top, 'bottom, 'left or -'right. This option can be customized through the options menu." + "The location of the default toolbar. +It can be 'top, 'bottom, 'left or 'right. This option can be +customized through the options menu." :group 'display :type '(choice (const :tag "top" top) (const :tag "bottom" bottom) @@ -70,7 +71,7 @@ customized through the options menu." "If non-nil help is echoed for toolbar buttons.") (defvar toolbar-icon-directory nil - "Location of standard toolbar icon bitmaps.") + "Location of standard toolbar icon bitmaps, with trailing path separator.") (defun toolbar-make-button-list (up &optional down disabled cap-up cap-down cap-disabled) "Call make-glyph on each arg and return a list of the results." @@ -123,6 +124,9 @@ customized through the options menu." (defvar last-pressed-toolbar-button nil) (defvar toolbar-active nil) +(defvar toolbar-blank-press-function nil + "Function to call if a blank area of the toolbar is pressed.") + ;; ;; It really sucks that we also have to tie onto ;; default-mouse-motion-handler to make sliding buttons work right. @@ -143,9 +147,8 @@ an argument if press is over a blank area of the toolbar." (setq last-pressed-toolbar-button button)) ;; Added by Bob Weiner, Motorola Inc., 10/6/95, to handle ;; presses on blank portions of toolbars. - (and (boundp 'toolbar-blank-press-function) - (functionp toolbar-blank-press-function) - (funcall toolbar-blank-press-function event))))) + (when (functionp toolbar-blank-press-function) + (funcall toolbar-blank-press-function event))))) (defun release-and-activate-toolbar-button (event) "Release a toolbar button and activate its callback.