FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Remove Helper Apps (Menu Helper, Login Helper) · Issue #844 · PostgresApp/PostgresApp · GitHub

Remove Helper Apps (Menu Helper, Login Helper) #844

Description

Currently, Postgres.app has two helper apps:

  • Login Helper (starts PostgreSQL servers on login, and the menu helper)
  • Menu Helper (shows the menu bar icon)

The main reason for the helpers is that we don't want to show any user interface on login (dock icon, app window) but still launch servers.

However, I've realised that we could maybe do away with the helpers alltogether by dynamically changing the "activation policy" using NSApp.setActivationPolicy(.regular) and NSApp.setActivationPolicy(.accessory) to show/hide the dock icon.

Then instead of a helper app, we could just launch the main app on login.

  • if the app is opened as a login item, we call .setActivationPolicy(.accessory)
  • if the app is opened normally (eg. double clicking in Finder) we call .setActivationPolicy(.regular)
  • if the main window is closed we call .setActivationPolicy(.accessory)
  • when the app is terminated (eg. using the "quit" command or when the user logs out) we stop all servers and quit the app

Behavior would be similar to how it is now, but we would only have a single app and no helpers.

Advantages:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL