* gnus-nocem.el (gnus-nocem-scan-groups): Add autoload cookie; scan latest
[gnus] / lisp / gnus-sum.el
index d8a1b54..00d524a 100644 (file)
@@ -2650,8 +2650,9 @@ Setter function for custom variables."
     (with-current-buffer gnus-summary-buffer
       (gnus-summary-make-tool-bar))))
 
-;; The default will be changed when the new icons have been checked in:
-(defcustom gnus-summary-tool-bar 'gnus-summary-tool-bar-retro
+(defcustom gnus-summary-tool-bar (if (eq gmm-tool-bar-style 'gnome)
+                                    'gnus-summary-tool-bar-gnome
+                                  'gnus-summary-tool-bar-retro)
   "Specifies the Gnus summary tool bar.
 
 It can be either a list or a symbol refering to a list.  See
@@ -2671,15 +2672,16 @@ Pre-defined symbols include `gnus-summary-tool-bar-gnome' and
 
 (defcustom gnus-summary-tool-bar-gnome
   '((gnus-summary-post-news "mail/compose" nil)
-    (gnus-summary-insert-new-articles "mail/inbox")
-    ;;
+    (gnus-summary-insert-new-articles "mail/inbox" nil
+                                     :visible (or (not gnus-agent)
+                                                  gnus-plugged))
     (gnus-summary-reply-with-original "mail/reply")
     (gnus-summary-reply "mail/reply" nil :visible nil)
     (gnus-summary-followup-with-original "mail/reply-all")
     (gnus-summary-followup "mail/reply-all" nil :visible nil)
     (gnus-summary-mail-forward "mail/forward")
     (gnus-summary-save-article "mail/save")
-    (gnus-summary-search-article-forward "search")
+    (gnus-summary-search-article-forward "search" nil :visible nil)
     (gnus-summary-print-article "print")
     (gnus-summary-tick-article-forward "flag-followup" nil :visible nil)
     ;; Some new commands that may need more suitable icons:
@@ -2698,13 +2700,17 @@ Pre-defined symbols include `gnus-summary-tool-bar-gnome' and
      :visible (gnus-check-backend-function 'request-expire-articles
                                           gnus-newsgroup-name))
     (gnus-summary-mark-as-spam
-     "mail/spam" t :visible (spam-group-ham-contents-p gnus-newsgroup-name)
+     "mail/spam" t
+     :visible (and (fboundp 'spam-group-ham-contents-p)
+                  (spam-group-ham-contents-p gnus-newsgroup-name))
      :help "Mark as spam")
     (gnus-summary-mark-as-read-forward
-     "mail/not-spam" nil :visible (spam-group-spam-contents-p gnus-newsgroup-name))
+     "mail/not-spam" nil
+     :visible (and (fboundp 'spam-group-spam-contents-p)
+                  (spam-group-spam-contents-p gnus-newsgroup-name)))
     ;;
     (gnus-summary-exit "exit")
-    ;; (customize-group 'gnus-summary) "preferences"
+    (gmm-customize-mode "preferences" t :help "Edit mode preferences")
     (gnus-info-find-node "help"))
   "List of functions for the summary tool bar (GNOME style).
 
@@ -2769,9 +2775,13 @@ When FORCE, rebuild the tool bar."
             tool-bar-mode
             (or (not gnus-summary-tool-bar-map) force))
     (let* ((load-path
-           (gmm-image-load-path "gnus" "mail/save.xpm" 'load-path))
+           (gmm-image-load-path-for-library "gnus"
+                                            "mail/save.xpm"
+                                            nil t))
           (image-load-path
-           (gmm-image-load-path "gnus" "mail/save.xpm" 'image-load-path))
+           (gmm-image-load-path-for-library "gnus"
+                                            "mail/save.xpm"
+                                            'image-load-path t))
           (map (gmm-tool-bar-from-list gnus-summary-tool-bar
                                        gnus-summary-tool-bar-zap-list
                                        'gnus-summary-mode-map)))
@@ -3291,8 +3301,11 @@ display only a single character."
     (aset table ?\r nil)
     ;; We keep TAB as well.
     (aset table ?\t nil)
-    ;; We nix out any glyphs over 126 that are not set already.
-    (let ((i 256))
+    ;; We nix out any glyphs 127 through 255, or 127 through 159 in
+    ;; Emacs 23 (unicode), that are not set already.
+    (let ((i (if (ignore-errors (= (make-char 'latin-iso8859-1 160) 160))
+                160
+              256)))
       (while (>= (setq i (1- i)) 127)
        ;; Only modify if the entry is nil.
        (unless (aref table i)