Skip to content

Setting for only one service being AlwaysConnected#37

Merged
Timac merged 6 commits intoTimac:masterfrom
halo:single-auto-connect
Oct 2, 2024
Merged

Setting for only one service being AlwaysConnected#37
Timac merged 6 commits intoTimac:masterfrom
halo:single-auto-connect

Conversation

@halo
Copy link
Contributor

@halo halo commented Oct 2, 2024

Currently, when I choose "Always auto connect" for one service, it toggles auto-connect for that service.

I would like to have an option, so that when I activate auto-connect for one service, it deactivates auto-connect for all other services. In other words, only one service should be in use at a time.

The reason behind this, is an attempt to simplify usage of VPNStatus for people who want to simply choose between two options:

  • Permanently connect to one service
  • Turn it off

Instead of maintaining a fork of my own, I'm trying to support this upstream, in the hopes that it is useful for others.

I could add the setting to the preference pane and it successfully updates the preference file on disk. Even though it made a mess of the xib file and a constraint didn't quite work out:

372810320-262b6b05-d2af-46ff-804e-46aca2a47c72

I wasn't sure, however, where to add the logic for deactivating AlwaysConnected of all other services. I've put it in the preference persistence logic now and unfortunately it doesn't seem to do anything. When I toggle the services in the menu bar, nothing happens in the preferences file.

Do you have any thoughts on this? I'll keep on digging, but I thought I'd share it for now.

(PS: I'm planning on generally simplifying the menu bar entries later on with another pull request. I have so many VPN services in my menu, so that I actually have to scroll through the menu bar entries to see them all. I could imagine making the list of services a little more concise)

Thank you for your time. Since your last major code update, this app really improved a lot!

@Timac Timac merged commit ba3ccf8 into Timac:master Oct 2, 2024
@Timac
Copy link
Owner

Timac commented Oct 2, 2024

Thanks a lot for the great feature! I only needed to make a few minor tweaks to get it working. Layout constraints can indeed be tricky.

@halo halo deleted the single-auto-connect branch October 2, 2024 19:32
@halo
Copy link
Contributor Author

halo commented Oct 2, 2024

awesome

Awesome!! Thank you!

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

Successfully merging this pull request may close these issues.

2 participants