[gnus git] branch master updated: n0-15-17-gacee3b9 =2= * gnus.el (gnus-splash-svg-color-symbols): Removed superfluous `and'. ; * gnus.el (gnus-group-startup-message): Prefer svg file and replace colors. (gnus-splash-svg-color-symbols): New function.

Lars Magne Ingebrigtsen <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  acee3b932f0416750d44f4d4a56c1a79b5953896 (commit)
       via  1f06ddbf8f7db8b9a5a339acd2a195084abbf3c7 (commit)
      from  f8fe0c5eb8fe98b5cce79ee9f2cf6e2cc510026f (commit)


- Log -----------------------------------------------------------------
commit acee3b932f0416750d44f4d4a56c1a79b5953896
Author: Lars Magne Ingebrigtsen <[email protected]>
Date:   Tue Mar 29 19:57:23 2011 +0200

    * gnus.el (gnus-splash-svg-color-symbols): Removed superfluous `and'.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8355e6c..dfacf5e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2011-03-29  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* gnus.el (gnus-splash-svg-color-symbols): Removed superfluous `and'.
+
 2011-03-29  Adam Sjøgren  <[email protected]>
 
 	* gnus.el (gnus-group-startup-message): Prefer svg file and replace
diff --git a/lisp/gnus.el b/lisp/gnus.el
index b63741d..71d86cc 100644
--- a/lisp/gnus.el
+++ b/lisp/gnus.el
@@ -1110,7 +1110,7 @@ be set in `.emacs' instead."
   (let ((type (plist-get (cdr list) :type))
         (file (plist-get (cdr list) :file))
         (color-symbols (plist-get (cdr list) :color-symbols)))
-    (if (and (string= type "svg"))
+    (if (string= type "svg")
         (let ((data (with-temp-buffer (insert-file file) (buffer-string))))
           (mapc (lambda (rule)
                   (setq data (replace-regexp-in-string

commit 1f06ddbf8f7db8b9a5a339acd2a195084abbf3c7
Author: Adam Sjøgren <[email protected]>
Date:   Tue Mar 29 19:56:06 2011 +0200

    * gnus.el (gnus-group-startup-message): Prefer svg file and replace
    colors.
    (gnus-splash-svg-color-symbols): New function.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ccc0eb0..8355e6c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2011-03-29  Adam Sjøgren  <[email protected]>
+
+	* gnus.el (gnus-group-startup-message): Prefer svg file and replace
+	colors.
+	(gnus-splash-svg-color-symbols): New function.
+
 2011-03-29  Lars Magne Ingebrigtsen  <[email protected]>
 
 	* gnus-sum.el (gnus-simplify-buffer-fuzzy): Take the regexp explicitly
diff --git a/lisp/gnus.el b/lisp/gnus.el
index 83a8cf7..b63741d 100644
--- a/lisp/gnus.el
+++ b/lisp/gnus.el
@@ -1042,12 +1042,15 @@ be set in `.emacs' instead."
                                          ((boundp 'image-load-path)
                                           (symbol-value 'image-load-path))
                                          (t load-path)))
-                  (image (find-image
-                          `((:type xpm :file "gnus.xpm"
+                  (image (gnus-splash-svg-color-symbols (find-image
+                          `((:type svg :file "gnus.svg"
+                                   :color-symbols
+                                   (("#bf9900" . ,(car gnus-logo-colors))
+                                    ("#ffcc00" . ,(cadr gnus-logo-colors))))
+                            (:type xpm :file "gnus.xpm"
                                    :color-symbols
                                    (("thing" . ,(car gnus-logo-colors))
                                     ("shadow" . ,(cadr gnus-logo-colors))))
-                            (:type svg :file "gnus.svg")
                             (:type png :file "gnus.png")
                             (:type pbm :file "gnus.pbm"
                                    ;; Account for the pbm's background.
@@ -1056,7 +1059,7 @@ be set in `.emacs' instead."
                             (:type xbm :file "gnus.xbm"
                                    ;; Account for the xbm's background.
                                    :background ,(face-foreground 'gnus-splash)
-                                   :foreground ,(face-background 'default))))))
+                                   :foreground ,(face-background 'default)))))))
              (when image
                (let ((size (image-size image)))
                  (insert-char ?\n (max 0 (round (- (window-height)
@@ -1102,6 +1105,20 @@ be set in `.emacs' instead."
     (setq mode-line-buffer-identification (concat " " gnus-version))
     (set-buffer-modified-p t)))
 
+(defun gnus-splash-svg-color-symbols (list)
+  "Do color-symbol search-and-replace in svg file"
+  (let ((type (plist-get (cdr list) :type))
+        (file (plist-get (cdr list) :file))
+        (color-symbols (plist-get (cdr list) :color-symbols)))
+    (if (and (string= type "svg"))
+        (let ((data (with-temp-buffer (insert-file file) (buffer-string))))
+          (mapc (lambda (rule)
+                  (setq data (replace-regexp-in-string
+                              (concat "fill:" (car rule))
+                              (concat "fill:" (cdr rule)) data))) color-symbols)
+          (cons (car list) (list :type type :data data)))
+       list)))
+
 (eval-when (load)
   (let ((command (format "%s" this-command)))
     (when (string-match "gnus" command)

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog |   10 ++++++++++
 lisp/gnus.el   |   25 +++++++++++++++++++++----
 2 files changed, 31 insertions(+), 4 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.