Gnus development mailing list
 help / color / mirror / Atom feed
* Gnus' gnu is running backward
@ 2007-12-24 17:19 Ivan Kanis
  2010-08-30 22:06 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Ivan Kanis @ 2007-12-24 17:19 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 3565 bytes --]

Hello Gnus Tower,

Everytime I start gnus I feel that the splash screen is facing the
wrong way round. Since I read from left to right, a proper running gnu
should be facing right. It gives a reader the feeling that it's moving
forward.

Since I have plenty of spare time I wrote a feature to flip the splash
screen vertically. I have also attached a screenshot. All you need to
do is set gnus-flip-splash-logo to t.

The patch depends on ImageMagick wich will do the flipping.

The patch is against emacs 22.1, if there is any interest in including
it I'll make a CVS patch.

Merry Xmas!

--- gnus.el	(révision 2098)
+++ gnus.el	(copie de travail)
@@ -44,6 +44,7 @@
 (defvar gnus-spam-newsgroup-contents)
 (defvar gnus-spam-process-destinations)
 (defvar gnus-spam-process-newsgroups)
+(defvar gnus-flip-splash-text)
 
 
 (defgroup gnus nil
@@ -307,6 +308,14 @@
   :group 'gnus-start
   :type 'boolean)
 
+(defcustom gnus-flip-splash-logo nil
+  "If non-nil the startup logo will be flipped vertically.
+For people who read from left to right it will appear that the gnu
+running. Ironically it will slow down start up time. This feature
+depends on ImageMagick being installed."
+  :group 'gnus-start
+  :type 'boolean)
+
 (unless (fboundp 'gnus-group-remove-excess-properties)
   (defalias 'gnus-group-remove-excess-properties 'ignore))
 
@@ -1023,6 +1032,7 @@
 			     :background ,(face-foreground 'gnus-splash)
 			     :foreground ,(face-background 'default))))))
        (when image
+         (gnus-flip-splash-image image)
 	 (let ((size (image-size image)))
 	   (insert-char ?\n (max 0 (round (- (window-height)
 					     (or y (cdr size)) 1) 2)))
@@ -1033,7 +1043,7 @@
 	 t))))
    (t
     (insert
-     (format "              %s
+     (gnus-flip-splash-text (format "              %s
           _    ___ _             _
           _ ___ __ ___  __    _ ___
           __   _     ___    __  ___
@@ -1053,7 +1063,7 @@
           __
 
 "
-	     ""))
+	     "")))
     ;; And then hack it.
     (gnus-indent-rigidly (point-min) (point-max)
 			 (/ (max (- (window-width) (or x 46)) 0) 2))
@@ -1070,6 +1080,39 @@
   (setq mode-line-buffer-identification (concat " " gnus-version))
   (set-buffer-modified-p t))
 
+(defun gnus-flip-splash-image (image)
+  "Flip vertically an image, it depends on ImageMagick"
+  (when gnus-flip-splash-logo
+    (let ((temp-file (make-temp-file "gnus")))
+      (when (eq 0 (call-process "convert" nil nil nil "-flop"
+                                (plist-get (cdr image) :file)
+                                temp-file))
+        (message temp-file)
+        (plist-put (cdr image) :file temp-file)))))
+
+(defun gnus-flip-splash-text (text)
+  "Flip text vertically"
+  (if gnus-flip-splash-logo
+      (format "              %s
+           _             _ ___    _
+          ___ _    __  ___ __ ___ _
+          ___  __    ___     _   __
+          _     ___           _
+           _             __ _  _
+           _            __   ___
+            _           __
+             _   _      _
+             _    _      _
+              _    _  _
+                    ___  __
+               _     _ _   _
+                        _   _
+                         _    _
+                          _    _
+                                _
+                                 __ " "")
+    text))
+
 (eval-when (load)
   (let ((command (format "%s" this-command)))
     (when (string-match "gnus" command)


[-- Attachment #2: gnus.jpg --]
[-- Type: image/jpeg, Size: 35784 bytes --]

[-- Attachment #3: Type: text/plain, Size: 186 bytes --]


-- 
Ivan
http://kanis.fr

  "There are two types of people in this world, good and bad. The good
sleep better, but the bad seem to enjoy the waking hours much more."
    -- Woody Allen

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Gnus' gnu is running backward
  2007-12-24 17:19 Gnus' gnu is running backward Ivan Kanis
@ 2010-08-30 22:06 ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-08-30 22:06 UTC (permalink / raw)
  To: ding

Ivan Kanis <gnus@kanis.fr> writes:

> Since I have plenty of spare time I wrote a feature to flip the splash
> screen vertically. I have also attached a screenshot. All you need to
> do is set gnus-flip-splash-logo to t.

Heh heh heh.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-30 22:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-24 17:19 Gnus' gnu is running backward Ivan Kanis
2010-08-30 22:06 ` Lars Magne Ingebrigtsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).