unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Darren Hoo <darren.hoo@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 16574@debbugs.gnu.org
Subject: bug#16574: 24.3.50; icon not shown on the splash screen (mac osx)
Date: Wed, 29 Jan 2014 07:52:11 +0800	[thread overview]
Message-ID: <CAJ+QY_GH7qrz4ex9dea6q1E88XFCwy7uJh1m4Rdrk3vy+ads1w@mail.gmail.com> (raw)
In-Reply-To: <83ppnc85rc.fsf@gnu.org>

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

On Tue, Jan 28, 2014 at 11:50 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Tue, 28 Jan 2014 12:54:46 +0800
> > From: Darren Hoo <darren.hoo@gmail.com>
> > Cc: 16574@debbugs.gnu.org
> >
> > > I don't think this is a bug, and AFAIK it has been like this for some
> time.
> > > The image is not shown if the frame seems to be too small.
> > > See use-fancy-splash-screens-p.
> > >
> >
> > OK, I see.
> > Though use-fancy-splash-screens-p is not strictly correct on this.
> > If  I force it to use splash screen:
> >
> > (defun use-fancy-splash-screens-p () t)
> >
> > And examine these values of the splash screen on the initial startup
> > frame:
> >
> > (window-pixel-height)
> >  => 476
> >
> > (cdr (window-text-pixel-size
> >       (selected-window) nil nil nil nil t)) ; include mode-line
> >  => 462
> >
> > it has plenty room for display.
>
> How do you deduce that this is enough?


I can see that on my system the splash screen fits the frame quite well
in one page.

window-text-pixel-size (462) above returns the height of the text
displayed,
that counts the height of the splash image and the window-pixel-height
is 476 > 462, both inludes the height of the modeline.


> splash.xpm needs 217 pixels on
> my system, and use-fancy-splash-screens-p reserves 19 more lines for
> text, which on my system need 19 x 16 = 304 more pixels.  The sum is
> greater than either 462 or 476, so it sounds to me like


Which  splash file on your system is actually used for display?

The problem is that use-fancy-splash-screens-p uses splash.xpm to
determine the image height which  is 217 pixel high, while on my system
splash.png (188 pixel high) is actually  used (since it's more fancier
than the xpm one).

I think it's better for  use-fancy-splash-screens-p and fancy-splash-head
to use  the same file:

=== modified file 'lisp/startup.el'

--- lisp/startup.el 2014-01-01 07:43:34 +0000

+++ lisp/startup.el 2014-01-28 23:09:37 +0000

@@ -1590,24 +1590,28 @@



 (declare-function image-size "image.c" (spec &optional pixels frame))



+

+(defun fancy-splash-file ()

+  (cond ((stringp fancy-splash-image)

+ fancy-splash-image)

+ ((display-color-p)

+ (cond ((<= (display-planes) 8)

+ (if (image-type-available-p 'xpm)

+     "splash.xpm"

+   "splash.pbm"))

+       ((or (image-type-available-p 'svg)

+     (image-type-available-p 'imagemagick))

+ "splash.svg")

+       ((image-type-available-p 'png)

+ "splash.png")

+       ((image-type-available-p 'xpm)

+ "splash.xpm")

+       (t "splash.pbm")))

+ (t "splash.pbm")))

+

 (defun fancy-splash-head ()

   "Insert the head part of the splash screen into the current buffer."

-  (let* ((image-file (cond ((stringp fancy-splash-image)

-     fancy-splash-image)

-   ((display-color-p)

-     (cond ((<= (display-planes) 8)

-   (if (image-type-available-p 'xpm)

-       "splash.xpm"

-     "splash.pbm"))

-   ((or (image-type-available-p 'svg)

-       (image-type-available-p 'imagemagick))

-   "splash.svg")

-   ((image-type-available-p 'png)

-   "splash.png")

-   ((image-type-available-p 'xpm)

-   "splash.xpm")

-   (t "splash.pbm")))

-   (t "splash.pbm")))

+  (let* ((image-file (fancy-splash-file))

  (img (create-image image-file))

  (image-width (and img (car (image-size img))))

  (window-width (window-width)))

@@ -1805,22 +1809,16 @@



 (defun use-fancy-splash-screens-p ()

   "Return t if fancy splash screens should be used."

-  (when (and (display-graphic-p)

-             (or (and (display-color-p)

-       (image-type-available-p 'xpm))

-                 (image-type-available-p 'pbm)))

-    (let ((frame (fancy-splash-frame)))

-      (when frame

- (let* ((img (create-image (or fancy-splash-image

-       (if (and (display-color-p)

-       (image-type-available-p 'xpm))

-   "splash.xpm" "splash.pbm"))))

-       (image-height (and img (cdr (image-size img nil frame))))

-       ;; We test frame-height so that, if the frame is split

-       ;; by displaying a warning, that doesn't cause the normal

-       ;; splash screen to be used.

-       (frame-height (1- (frame-height frame))))

-   (> frame-height (+ image-height 19)))))))

+  (and (display-graphic-p)

+       (let ((frame (fancy-splash-frame)))

+ (when frame

+   (let* ((img (create-image (fancy-splash-file)))

+   (image-height (and img (cdr (image-size img nil frame))))

+   ;; We test frame-height so that, if the frame is split

+   ;; by displaying a warning, that doesn't cause the normal

+   ;; splash screen to be used.

+   (frame-height (1- (frame-height frame))))

+     (> frame-height (+ image-height 19)))))))





 (defun normal-splash-screen (&optional startup concise)

[-- Attachment #2: Type: text/html, Size: 13545 bytes --]

  reply	other threads:[~2014-01-28 23:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-28  2:49 bug#16574: 24.3.50; icon not shown on the splash screen (mac osx) Darren Hoo
2014-01-28  2:54 ` Glenn Morris
2014-01-28  4:54   ` Darren Hoo
2014-01-28 15:50     ` Eli Zaretskii
2014-01-28 23:52       ` Darren Hoo [this message]
2014-01-29  3:45         ` Eli Zaretskii
2014-01-31  2:01         ` Glenn Morris
2014-01-31  3:25           ` Darren Hoo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJ+QY_GH7qrz4ex9dea6q1E88XFCwy7uJh1m4Rdrk3vy+ads1w@mail.gmail.com \
    --to=darren.hoo@gmail.com \
    --cc=16574@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).