1114 |
;; |
;; |
1115 |
;; If there's some API in XEmacs to find the images, we should use it |
;; If there's some API in XEmacs to find the images, we should use it |
1116 |
;; instead of locate-library. |
;; instead of locate-library. |
1117 |
(or (when (fboundp 'find-image) |
;; |
1118 |
(let ((load-path toolbarx-image-path)) |
;; Emacs 22 has locate-file, but the other Emacsen don't. The |
1119 |
;; We promised to consider toolbarx-image-path. |
;; following should hopefully get us to all images ultimately. |
1120 |
(find-image `((:type xpm :file ,(concat name ".xpm")) |
|
1121 |
(:type xbm :file ,(concat name ".xbm")) |
(let ((file)) |
1122 |
(:type pbm :file ,(concat name ".pbm")))))) |
(dolist (i '("" ".xpm" ".xbm" ".pbm")) |
1123 |
;; The following is for XEmacs and "name" _with_ extension. I doubt |
(unless file |
1124 |
;; that the latter is useful, but the doc string says so. |
(setq file (locate-library (concat filename i) t toolbarx-image-path)))) |
1125 |
(let ((file)) |
(if (featurep 'xemacs) |
1126 |
(dolist (i '("" ".xpm" ".xbm" ".pbm")) |
(and file (make-glyph file)) |
1127 |
(unless file |
(if file |
1128 |
(setq file |
(create-image file) |
1129 |
(locate-library (concat name i) |
(find-image `((:type xpm :file ,(concat name ".xpm")) |
1130 |
t toolbarx-image-path)))) |
(:type xbm :file ,(concat name ".xbm")) |
1131 |
(when file (if (featurep 'xemacs) |
(:type pbm :file ,(concat name ".pbm")))))))) |
|
(make-glyph file) |
|
|
;; Only used if "name" _with_ extension was given as this |
|
|
;; is not covered by `find-image': |
|
|
(create-image file)))))) |
|
1132 |
|
|
1133 |
;; next variable interfaces between parsing and display engines |
;; next variable interfaces between parsing and display engines |
1134 |
(defvar toolbarx-internal-button-switches nil |
(defvar toolbarx-internal-button-switches nil |