[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Picture missing in About dialog on cocoa ui

From: Programmingkid
Subject: Re: Picture missing in About dialog on cocoa ui
Date: Fri, 9 Jul 2021 22:43:37 -0400

> On Jul 8, 2021, at 8:15 PM, Akihiko Odaki <akihiko.odaki@gmail.com> wrote:
> I tried [NSApp applicationIconImage] but had no luck. I suspect it is
> because Rez is for Carbon development and deprecated while NSApp is
> from AppKit. Loading from the filesystem is inevitable.

Totally disagree. I'm on a new MacBook Air and the rez command is available. I 
will agree that Apple likes removing features but the rez command is not one of 

I did not try [NSApp applicationIconImage], but I did try using [[NSWorkspace 
sharedWorkspace] iconForFile: program_path] and it worked.

> By the way, I knew Rez is from Carbon but didn't know it is
> deprecated, which I have figured out just now by reading man. Reading
> the icon file and assigning it to [NSApp applicationIconImage] is a
> possible solution, but it requires modifications for all graphical
> backends (cocoa, gtk, and sdl) and of course an external icon file. Do
> you think removing the dependency on Rez is worth it?

I do not think we should remove any code that depends on rez. I honestly think 
the easiest and best thing to do is to go back to using my original patch for 
displaying a picture in the About dialog.

> See "[PATCH 1/4] cutils: Introduce bundle mechanism" for a general fix
> of the problem when loading a "bundled" file.
> Regards,
> Akihiko Odaki
> On Fri, Jul 9, 2021 at 2:51 AM Peter Maydell <peter.maydell@linaro.org> wrote:
>> On Thu, 8 Jul 2021 at 17:28, Programmingkid <programmingkidx@gmail.com> 
>> wrote:
>>> The problem with e31746ecf8dd2f25f687c94ac14016a3ba5debfc is it requires a
>>> picture file to be found in a certain path. My original code used QEMU's
>>> icon to obtain a picture. The reason why the picture in the About dialog
>>> stopped appearing was because of the move to the meson build system.
>>> A new patch has just been committed that fixes the missing icon issue.
>>> Using 'git revert e31746ecf8dd2f25f687c94ac14016a3ba5debfc' fixes the
>>> missing picture issue in the About dialog.
>> If the icon is the same (same resolution, etc) then just using it
>> does seem better than loading it off the filesystem. But we should
>> also sort out why get_relocated_path() isn't working, because if QEMU.
>> can't load files that way then other things will also be broken I think.
>> -- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]