emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/toolbar/tool-bar.el [lexbind]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/toolbar/tool-bar.el [lexbind]
Date: Tue, 06 Jul 2004 07:08:00 -0400

Index: emacs/lisp/toolbar/tool-bar.el
diff -c emacs/lisp/toolbar/tool-bar.el:1.30.2.3 
emacs/lisp/toolbar/tool-bar.el:1.30.2.4
*** emacs/lisp/toolbar/tool-bar.el:1.30.2.3     Tue May 11 02:21:09 2004
--- emacs/lisp/toolbar/tool-bar.el      Tue Jul  6 10:00:19 2004
***************
*** 96,102 ****
  Info node `(elisp)Tool Bar'.  Items are added from left to right.
  
  ICON is the base name of a file containing the image to use.  The
! function will first try to use ICON.xpm, then ICON.pbm, and finally
  ICON.xbm, using `find-image'.
  
  Use this function only to make bindings in the global value of `tool-bar-map'.
--- 96,103 ----
  Info node `(elisp)Tool Bar'.  Items are added from left to right.
  
  ICON is the base name of a file containing the image to use.  The
! function will first try to use lc-ICON.xpm if display-color-cells
! is less or equal to 256, then ICON.xpm, then ICON.pbm, and finally
  ICON.xbm, using `find-image'.
  
  Use this function only to make bindings in the global value of `tool-bar-map'.
***************
*** 112,135 ****
  Info node `(elisp)Tool Bar'.  Items are added from left to right.
  
  ICON is the base name of a file containing the image to use.  The
! function will first try to use ICON.xpm, then ICON.pbm, and finally
  ICON.xbm, using `find-image'."
    (let* ((fg (face-attribute 'tool-bar :foreground))
         (bg (face-attribute 'tool-bar :background))
         (colors (nconc (if (eq fg 'unspecified) nil (list :foreground fg))
                        (if (eq bg 'unspecified) nil (list :background bg))))
         (image (find-image
                (if (display-color-p)
!                   (list (list :type 'xpm :file (concat icon ".xpm"))
!                         (append (list :type 'pbm :file (concat icon ".pbm"))
!                                 colors)
!                         (append (list :type 'xbm :file (concat icon ".xbm"))
!                                 colors))
!                 (list (append (list :type 'pbm :file (concat icon ".pbm"))
!                               colors)
!                       (append (list :type 'xbm :file (concat icon ".xbm"))
!                               colors)
!                       (list :type 'xpm :file (concat icon ".xpm")))))))
      (when (and (display-images-p) image)
        (unless (image-mask-p image)
        (setq image (append image '(:mask heuristic))))
--- 113,136 ----
  Info node `(elisp)Tool Bar'.  Items are added from left to right.
  
  ICON is the base name of a file containing the image to use.  The
! function will first try to use lc-ICON.xpm if display-color-cells
! is less or equal to 256, then ICON.xpm, then ICON.pbm, and finally
  ICON.xbm, using `find-image'."
    (let* ((fg (face-attribute 'tool-bar :foreground))
         (bg (face-attribute 'tool-bar :background))
         (colors (nconc (if (eq fg 'unspecified) nil (list :foreground fg))
                        (if (eq bg 'unspecified) nil (list :background bg))))
+        (xpm-spec (list :type 'xpm :file (concat icon ".xpm")))
+        (xpm-lo-spec (if (> (display-color-cells) 256)
+                         nil
+                       (list :type 'xpm :file (concat "lc-" icon ".xpm"))))
+        (pbm-spec (append (list :type 'pbm :file (concat icon ".pbm")) colors))
+        (xbm-spec (append (list :type 'xbm :file (concat icon ".xbm")) colors))
         (image (find-image
                (if (display-color-p)
!                   (list xpm-lo-spec xpm-spec pbm-spec xbm-spec)
!                 (list pbm-spec xbm-spec xpm-lo-spec xpm-spec)))))
! 
      (when (and (display-images-p) image)
        (unless (image-mask-p image)
        (setq image (append image '(:mask heuristic))))
***************
*** 170,186 ****
         (bg (face-attribute 'tool-bar :background))
         (colors (nconc (if (eq fg 'unspecified) nil (list :foreground fg))
                        (if (eq bg 'unspecified) nil (list :background bg))))
         (spec (if (display-color-p)
!                  (list (list :type 'xpm :file (concat icon ".xpm"))
!                        (append (list :type 'pbm :file (concat icon ".pbm"))
!                                      colors)
!                        (append (list :type 'xbm :file (concat icon ".xbm"))
!                                      colors))
!                (list (append (list :type 'pbm :file (concat icon ".pbm"))
!                                    colors)
!                      (append (list :type 'xbm :file (concat icon ".xbm"))
!                                    colors)
!                      (list :type 'xpm :file (concat icon ".xpm")))))
         (image (find-image spec))
         submap key)
      (when (and (display-images-p) image)
--- 171,185 ----
         (bg (face-attribute 'tool-bar :background))
         (colors (nconc (if (eq fg 'unspecified) nil (list :foreground fg))
                        (if (eq bg 'unspecified) nil (list :background bg))))
+        (xpm-spec (list :type 'xpm :file (concat icon ".xpm")))
+        (xpm-lo-spec (if (> (display-color-cells) 256)
+                         nil
+                       (list :type 'xpm :file (concat "lc-" icon ".xpm"))))
+        (pbm-spec (append (list :type 'pbm :file (concat icon ".pbm")) colors))
+        (xbm-spec (append (list :type 'xbm :file (concat icon ".xbm")) colors))
         (spec (if (display-color-p)
!                  (list xpm-lo-spec xpm-spec pbm-spec xbm-spec)
!                (list pbm-spec xbm-spec xpm-lo-spec xpm-spec)))
         (image (find-image spec))
         submap key)
      (when (and (display-images-p) image)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]