Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Act as a menu bar application on macOS #183

Open
jakepetroules opened this issue Jul 18, 2017 · 5 comments
Open

Act as a menu bar application on macOS #183

jakepetroules opened this issue Jul 18, 2017 · 5 comments

Comments

@jakepetroules
Copy link
Contributor

Although OpenConnect behaves as a menu bar application on macOS, it still shows an icon in the Dock. This is undesired.

To properly mark the app as a menu bar app, add the LSUIElement key with a bool value of YES, to the Info.plist.

@horar
Copy link
Member

horar commented Jul 31, 2017

I don't treat this app as menu bar only application.

You are right about the icon in dock - it's redundant.
But enabling this flag we will lose menubar with settings etc.

@jakepetroules
Copy link
Contributor Author

But enabling this flag we will lose menubar with settings etc.

No you won't. I have LSUIElement=YES in my copy and it shows in the menubar with the settings menu etc. just fine. You can also still click restore and get the main window back.

@horar
Copy link
Member

horar commented Aug 6, 2017

With enabled flag, you can reach only systray icon popup menu. But You don't see about and these settings etc. and you can switch between oc-gui and other app windows (e.g. we can shot log window) - the only way to show main & logging windows is to raise them with some new action menu item in pop-up systray menu.

Or, I do something wrong? Thanks.

@jakepetroules
Copy link
Contributor Author

Well, as a menu bar app, the "Restore" menu item from the menu bar icon works just fine to show the main window with the main / VPN info tabs.

It's true that About and Settings would need duplicated menu items in the system tray menu, and this is the recommended and typical approach for these types of apps on macOS.

You could also make the menu bar status configurable by using the -[NSApplication setActivationPolicy:] method.

@horar
Copy link
Member

horar commented Aug 8, 2017

Indeed, I don't like the 'agent' mode of this application. Interaction with present main window, settings and log window will be much worse.
Moreover, the present design need much more design changes to look good in agent and application modes. May be later, after 1.6 release.

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

No branches or pull requests

2 participants