Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System tray icon for application #25

Open
GoogleCodeExporter opened this issue Aug 28, 2015 · 10 comments
Open

System tray icon for application #25

GoogleCodeExporter opened this issue Aug 28, 2015 · 10 comments
Milestone

Comments

@GoogleCodeExporter
Copy link

Would it be possible to add an option to let the user minimize the app to the system tray?

Original issue reported on code.google.com by linds...@gmail.com on 3 Apr 2013 at 9:09

@GoogleCodeExporter
Copy link
Author

I also would like this feature. I want to build desktop widgets based on your project.

Original comment by speedy1...@gmail.com on 17 May 2013 at 8:17

@GoogleCodeExporter
Copy link
Author

Two points of reference for anyone attempting this feat:

http://www.codeproject.com/Articles/74/Adding-Icons-to-the-System-Tray

http://bobobobo.wordpress.com/2009/03/30/adding-an-icon-system-tray-win32-c/

Original comment by ga...@approachfoundation.org on 23 Oct 2013 at 7:17

@GoogleCodeExporter
Copy link
Author

It is still open for discussion what system tray functionality should be implemented. For what I see that would be needed is:

  1. A dictionary option in settings.json like "tray_menu", that would define elements in the tray menu and their corresponding command identifiers. For example:

    tray_menu = {
    "Action 1": "command1",
    "Action 2": "command2"
    }

  2. Javascript bindings need to be created for communication between system tray and application. When "Action 1" is clicked, a javascript code would be executed in main browser window, something like "SystemTray_CommandCallback("command1")". You would need to define that js function on your webpage to intercept executed commands from system tray.

  3. From javascript, you can communicate with PHP scripts by using XMLHttpRequest. This is already possible.

  4. Probably some javascript API would be needed. A "PhpDesktop" object would be available in javascript that would have functions like: MaximizeWindow(), MinimizeWindow(), RestoreWindow(), MinimizeToTray(). I don't know what exactly is needed, haven't though too much about it.

Please share with us your use cases for the system tray, so we can decide what API would need to be added to PHP Desktop.

Original comment by czarek.t...@gmail.com on 20 Jan 2014 at 1:47

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

See Tray API in Node-Webkit: https://github.com/rogerwang/node-webkit/wiki/Tray
See also "Minimize to tray" example: https://github.com/rogerwang/node-webkit/wiki/Minimize-to-tray

Original comment by czarek.t...@gmail.com on 16 Feb 2014 at 3:48

@Macwilcy
Copy link

Macwilcy commented Dec 2, 2015

Hello,

How can we change the 'Elephant task bar Icon' to a custom icon ?

Thank you

@gabizz
Copy link

gabizz commented Dec 2, 2015

Macwilcy: I think this question has been answered before... anyway... just use Resource Hacker to change the icon. ;)

cztomczak added a commit that referenced this issue Jan 25, 2016
Added "minimize_to_tray" and "minimize_to_tray_message" options.
@cztomczak
Copy link
Owner

Release Candidate 31.10 added option to minimize to system tray, see the above commit for the new options.

@codelarky
Copy link

A tool tip showing the application title when the mouse hovers over the icon in the tray will be a small, but useful feature.
Thanks.
screenshot 2016-03-19 06 07 11

@cztomczak
Copy link
Owner

Now with the "minimize_to_tray" option available it would be useful to be able to start php desktop minimized. For example when app needs to run in background and auto start on Windows boot. This could be accomplished by introducing a command-line flag to start app minimized eg phpdesktop-chrome.exe --start-minimized. With this flag and "minimize_to_tray" set to True app would start and show only in system tray.

@cztomczak cztomczak added this to the Chrome 57 milestone Mar 22, 2017
@Eduqii
Copy link

Eduqii commented Oct 17, 2021

replace icon with resource hacker keeps showing 'out of memory'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants