Mercurial > hg > xemacs-beta
diff lisp/toolbar.el @ 278:90d73dddcdc4 r21-0b37
Import from CVS: tag r21-0b37
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:31:29 +0200 |
parents | 6330739388db |
children | 8e84bee8ddd0 |
line wrap: on
line diff
--- a/lisp/toolbar.el Mon Aug 13 10:30:38 2007 +0200 +++ b/lisp/toolbar.el Mon Aug 13 10:31:29 2007 +0200 @@ -30,6 +30,42 @@ ;;; Code: +(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." + :group 'display + :type 'boolean + :set '(lambda (var val) + (set-specifier default-toolbar-visible-p val) + (setq toolbar-visible-p val)) + ) + +(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." + :group 'display + :type 'boolean + :set '(lambda (var val) + (set-specifier toolbar-buttons-captioned-p val) + (setq toolbar-captioned-p val)) + ) + +(defcustom default-toolbar-position ;; added for the options menu - dverna + (default-toolbar-position) + "The location of the default toolbar. It can be 'top, 'bootom, 'left or +'right. This option can be customized through the options menu." + :group 'display + :type '(choice (const :tag "top" 'top) + (const :tag "bottom" 'bottom) + (const :tag "left" 'left) + (const :tag "right" 'right)) + :set '(lambda (var val) + (set-default-toolbar-position val) + (setq default-toolbar-position val)) + ) + (defvar toolbar-help-enabled t "If non-nil help is echoed for toolbar buttons.") @@ -60,9 +96,10 @@ (defun init-toolbar-location () (if (not toolbar-icon-directory) - (setq toolbar-icon-directory - (file-name-as-directory - (locate-data-directory "toolbar"))))) + (let ((name (locate-data-directory "toolbar"))) + (if name + (setq toolbar-icon-directory + (file-name-as-directory name)))))) (defun init-toolbar-from-resources (locale) (if (and (featurep 'x)