* message.el: Autoload gmm-image-load-path.
authorReiner Steib <Reiner.Steib@gmx.de>
Wed, 22 Feb 2006 14:45:52 +0000 (14:45 +0000)
committerReiner Steib <Reiner.Steib@gmx.de>
Wed, 22 Feb 2006 14:45:52 +0000 (14:45 +0000)
(message-tool-bar-retro): Prepend "gnus/" subdirectory to some
icon file names.  Use old Emacs 21 "mail_send.xpm" icon for
consitency.

* gmm-utils.el (gmm-image-load-path): Also search in
"../etc/images".  Don't set gmm-image-load-path if we don't find
the image.

lisp/ChangeLog
lisp/gmm-utils.el
lisp/message.el

index 731ed6d..62edd0b 100644 (file)
@@ -1,3 +1,14 @@
+2006-02-22  Reiner Steib  <Reiner.Steib@gmx.de>
+
+       * message.el: Autoload gmm-image-load-path.
+       (message-tool-bar-retro): Prepend "gnus/" subdirectory to some
+       icon file names.  Use old Emacs 21 "mail_send.xpm" icon for
+       consitency.
+
+       * gmm-utils.el (gmm-image-load-path): Also search in
+       "../etc/images".  Don't set gmm-image-load-path if we don't find
+       the image.
+
 2006-02-22  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gmm-utils.el (gmm-image-load-path): Don't make
index be65e2b..2962597 100644 (file)
@@ -271,17 +271,26 @@ path to IMAGE.  If PATH is given, it is used instead of
   (unless library (error "No library specified."))
   (unless image   (error "No image specified."))
   (cond (gmm-image-load-path) ;; User setting exists.
-       ((let (gmm-library-name) ;; Try relative setting
+       ((let (gmm-library-name d1ei d2ei)
+          ;; Try relative setting
           ;; First, find library in the load-path.
           (setq gmm-library-name (locate-library library))
           (if (not gmm-library-name)
               (error "Cannot find library `%s' in load-path" library))
           ;; And then set gmm-image-load-path relative to that.
+          (setq
+           ;; Go down 2 levels...
+           d2ei (expand-file-name
+                 (concat (file-name-directory gmm-library-name)
+                         "../../etc/images"))
+           ;; Go down 1 level...
+           d1ei (expand-file-name
+                 (concat (file-name-directory gmm-library-name)
+                         "../etc/images")))
           (setq gmm-image-load-path
-                (expand-file-name (concat
-                                   (file-name-directory gmm-library-name)
-                                   "../../etc/images")))
-          (file-exists-p (expand-file-name image gmm-image-load-path))))
+                ;; Set it to nil if image is not found...
+                (cond ((file-exists-p (expand-file-name image d2ei)) d2ei)
+                      ((file-exists-p (expand-file-name image d1ei)) d1ei)))))
        ((let ((img image)
               (dir (or
                     ;; Images in image-load-path.
index 829b968..4dbfaa0 100644 (file)
@@ -1664,6 +1664,7 @@ You must have the \"hashcash\" binary installed, see `hashcash-path'."
   (autoload 'gnus-server-string "gnus")
   (autoload 'idna-to-ascii "idna")
   (autoload 'gmm-tool-bar-from-list "gmm-utils")
+  (autoload 'gmm-image-load-path "gmm-utils")
   (autoload 'message-setup-toolbar "messagexmas")
   (autoload 'mh-new-draft-name "mh-comp")
   (autoload 'mh-send-letter "mh-comp")
@@ -6735,8 +6736,6 @@ Pre-defined symbols include `message-tool-bar-gnome' and
   :set 'message-tool-bar-update
   :group 'message)
 
-;; The new icons are not yet committed, see
-;; http://thread.gmane.org/gmane.emacs.gnus.general/61719
 (defcustom message-tool-bar-gnome
   '((gmm-ignore "separator")
     (message-send-and-exit "mail/send")
@@ -6764,15 +6763,16 @@ See `gmm-tool-bar-from-list' for details on the format of the list."
   :group 'message)
 
 (defcustom message-tool-bar-retro
-  '((message-send-and-exit "mail/send")
+  '(;; Old Emacs 21 icon for consitency.
+    (message-send-and-exit "gnus/mail_send")
     (message-kill-buffer "close")
     (message-dont-send "cancel")
     (mml-attach-file "attach" mml-mode-map)
     (ispell-message "spell")
     (mml-preview "preview" mml-mode-map)
-    (message-insert-importance-high "important")
-    (message-insert-importance-low "unimportant")
-    (message-insert-disposition-notification-to "receipt"))
+    (message-insert-importance-high "gnus/important")
+    (message-insert-importance-low "gnus/unimportant")
+    (message-insert-disposition-notification-to "gnus/receipt"))
   "List of items for the message tool bar (retro style).
 
 See `gmm-tool-bar-from-list' for details on the format of the list."