diff options
-rw-r--r-- | generic/proof-splash.el | 28 | ||||
-rw-r--r-- | generic/proof-toolbar.el | 25 |
2 files changed, 15 insertions, 38 deletions
diff --git a/generic/proof-splash.el b/generic/proof-splash.el index 8e0df006..de0350ed 100644 --- a/generic/proof-splash.el +++ b/generic/proof-splash.el @@ -44,7 +44,7 @@ Proof General." nil nil " Please report problems at http://proofgeneral.inf.ed.ac.uk/trac - Visit the Proof General wiki at http://proofgeneral.inf.ed.ac.uk/wiki" + Visit the Proof General wiki at http://proofgeneral.inf.ed.ac.uk/wiki" nil (unless (or proof-running-on-XEmacs proof-running-on-Emacs21) "For a better Proof General experience, please use GNU Emacs 21 or XEmacs")) @@ -82,7 +82,6 @@ If it is nil, a new line is inserted." (and (listp img) (eq (car img) 'image)))) -;; could be in proof-utils (defun proof-get-image (name &optional nojpeg default) "Construct an image instantiator for an image, or string failing that. Different formats are chosen from according to what can be displayed. @@ -92,45 +91,30 @@ DEFAULT gives return value in case image not valid." (let ((jpg (vector 'jpeg :file (concat proof-images-directory name ".jpg"))) (gif (vector 'gif :file - (concat proof-images-directory - name - (or (and - (fboundp 'device-pixel-depth) - (not (null (device-pixel-depth))) - (> (device-pixel-depth) 8) - ".gif") - ;; Low colour gif for poor displays - ".8bit.gif")))) - (xpm (vector 'xpm :file - (concat proof-images-directory name ".xpm"))) + (concat proof-images-directory ".gif"))) (validfn (lambda (inst) (and (valid-instantiator-p inst 'image) (file-readable-p (aref inst 2))))) img) (cond - ((and proof-running-on-XEmacs (pg-window-system) + ((and proof-running-on-XEmacs + (pg-window-system) (featurep 'jpeg) (not nojpeg) (funcall validfn jpg)) jpg) ((and proof-running-on-XEmacs (pg-window-system) (featurep 'gif) (funcall validfn gif)) gif) - ((and proof-running-on-XEmacs (pg-window-system) - (featurep 'xpm) (funcall validfn xpm)) - xpm) - ;; Support GNU Emacs 21 ((and proof-running-on-Emacs21 (pg-window-system) - (setq img + (setq img (find-image (list (list :type 'jpeg :file (concat proof-images-directory name ".jpg")) (list :type 'gif - :file (concat proof-images-directory name ".gif")) - (list :type 'xpm - :file (concat proof-images-directory name ".xpm")))))) + :file (concat proof-images-directory name ".gif")))))) img) (t (or default (concat "[ image " name " ]")))))) diff --git a/generic/proof-toolbar.el b/generic/proof-toolbar.el index 9fd9a867..36333bce 100644 --- a/generic/proof-toolbar.el +++ b/generic/proof-toolbar.el @@ -174,36 +174,29 @@ to the default toolbar." (defun proof-toolbar-build () "Build proof-toolbar." (let - ((icontype (if (and (boundp 'device-pixel-depth) - (< (device-pixel-depth) 16)) - ;; Select 8bit xpm's if we've got a - ;; limited colour depth. - ".8bit.xpm" ".xpm")) + ((icontype ".xpm") - (proof-toolbar-icon-list ;; List of icon variable names and their associated image ;; files. A list of lists of the form (VAR IMAGE). IMAGE is - ;; the root name for ;an image file in proof-images-directory. - ;; The toolbar code expects to find files IMAGE.xpm or - ;; IMAGE.8bit.xpm and chooses the best one for the display - ;; properites. + ;; the root name for a file in proof-images-directory. The + ;; toolbar code expects to find files IMAGE.xpm + (proof-toolbar-icon-list (apply 'append (mapcar 'proof-toolbar-make-icon (proof-ass toolbar-entries)))) - (proof-toolbar-button-list ;; A toolbar descriptor evaluated in proof-toolbar-setup. ;; Specifically, a list of sexps which evaluate to entries in ;; a toolbar descriptor. The default - ;; `proof-toolbar-default-button-list' works for prover. + ;; `proof-toolbar-default-button-list' works for any prover. + (proof-toolbar-button-list (append (apply 'append (mapcar 'proof-toolbar-make-toolbar-item (proof-ass toolbar-entries))) (if proof-running-on-XEmacs (list [:style 3d]))))) - ;; First set the button variables to glyphs. - ;; (NB: this is a bit long-winded). + ;; First set the button variables to glyphs (bit long-windedly). (mapcar (lambda (buttons) (let ((var (car buttons)) @@ -218,8 +211,8 @@ to the default toolbar." (toolbar-make-button-list iconfiles) ;; On GNU Emacs, it holds a filename for the icon, ;; without path or extension. Watch for clashes with - ;; other packages! - (concat "pg-" (eval (cadr buttons))))))) + ;; icons from other packages! + (concat "epg-" (eval (cadr buttons))))))) proof-toolbar-icon-list) (if proof-running-on-XEmacs |