qzind / qz-print

Archive for legacy qz-print versions (1.8, 1.9). See https://github.com/qzind/tray for modern versions.
Other
141 stars 101 forks source link

Issues with desktop icon creation on Mac #65

Closed klabarge closed 9 years ago

klabarge commented 9 years ago

Tested on QZ Tray version 1.9.3 on Mac OSX Yosemite.

Clicking the tray icon and going to Advanced > Open file location in Mac does not work to open the file location of QZ Tray. When clicked, it appears that nothing happens.

Additionally, creating a desktop icon from the tray icon does not provide the proper image.

All other functions seem to work normally.

image

image

tresf commented 9 years ago

Terrific, thanks. These are two separate issues, so we should track them separately.

The "Open File Location" is a duplicate of #35, which I'm hoping @Vzor- can help with. Remind me of this and I'll shoot this over to him once he's done w/ the Fedora bugs. :+1:

The icon will be a bit trickier... I'm not sure if the URL format we use for Windows is supported on Apple, or if we'll have to use AppleScript to simulate a macro from the user.

@klabarge can you investigate the AppleScript route? If you get a script working, post it here and I'll integrate it into our menu item. .

tresf commented 9 years ago

@klabarge is the AppleScript something you're interested in tackling? The Lion VM in Splashtop is a good place to start if you'd like.

tell application "TextEdit"
    activate
    make new document
    set text of front document to "hello world"
end tell

should be executable via osascript -e in a terminal:

osascript -e "tell application \"TextEdit\" activate make new document set text \
of front document to \"hello world\" end tell"

Once you figure out which commands are needed to fix the icon, I can incorporate them into our Java codebase. Apple refers to the dialog containing the icon as the Get Info window. Normally, the icon is replaced with a copy/paste action after the existing icon is selected.

klabarge commented 9 years ago

@tresf sure, I will look into this and let you know if I have any success.

tresf commented 9 years ago

screen shot 2015-09-21 at 12 15 58 am

Looks like a better approach than AppleScript is to simply link to the parent directory, which will fix the icon automatically and still launch the application properly, since Mac app bundles are launched by QZ Tray.app directory in Finder.