cfmlprojects / runwar

Other
11 stars 16 forks source link

Use AppIndicator for Linux desktop environments when available #25

Closed DominicWatson closed 8 years ago

DominicWatson commented 8 years ago

Addresses #24.

I don't think this is ready to be merged yet. A couple of issues:

  1. The tray library being used does not appear to support messaging so I've commented out the two message points for now (message when opening browser and message when problem stopping server)
  2. Have pretty much duplicated the getIconImage() method to make setIconImage() due to the new library not taking an Image object to set the icon while the code that sets the Apple Dock icon does need the image. Was using just a text editor and offline so couldn't explore what methods were available on the Image object to turn it into an InputStream or somesuch.

Has not yet been tested on Windows, OSX or any other desktop environment other than Cinnamon.

denuno commented 8 years ago

This is looking pretty good!

It adds like 1.2 megs to the download (mostly for JNA), which is a little rough, but I think worth it.

Especially if we can get the "Notify" library from dorkbox to work as well, which uses the same JNA dependency and is itself tiny-- as it will do some nice message stuff which is better than the old message stuff, and can be used for tooltip-ish things too, if we need/want them back. (I tried Notify but got a noClassDef error, so filed a ticket.)

DominicWatson commented 8 years ago

Ah shame, yes - I just gave it a whirl and saw that it compiled but then broke at runtime. Having that working would be great.

DominicWatson commented 8 years ago

https://github.com/dorkbox/Notify/issues/2 For reference (no response on that ticket as yet).

@denuno would lack of notifications be a showstopper for you? I personally wouldn't miss them but understand that others may not feel the same way.

denuno commented 8 years ago

Nope, I see tooltips as a nice-to-have. The notifications make the meg of added dependencies easier to swallow, but I could see us doing a bit more native stuff in the future-- plus hopefully that ticket will get closed, so I say we go for it, and see about notifications and whatnot later on.

DominicWatson commented 8 years ago

:+1: (I previously commented here that I could not reproduce and had a different error - but actually fixing that error then gave me the same error you found). fwiw, the error I had was missing "/resources/dialog-warning.png" so I added the pngs to the build).

denuno commented 8 years ago

I went ahead and merged this in, with a couple tweaks (theoretically the Notify stuff will work as soon as that class is found, plus it looks like input streams need a cache attribute or else new images are always created) to develop. I'm going to run a couple more tests, and verify I've fixed a couple other issues, and then push develop out to master. So this will be in the next stable-- I'm already digging the transparent background. :-)

DominicWatson commented 8 years ago

Sweet. Yeah, its so much better and for me, doesn't crash sporadically so completely transforms my experience.

tray icon