Skip to content

Commit

Permalink
Merge pull request #25 from gordolio/bugfix/2021-12-07_add_none_status
Browse files Browse the repository at this point in the history
Add none status to potential statuses
  • Loading branch information
andrewn authored Jan 31, 2022
2 parents 65fd1dd + 6642d5d commit e65c067
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ Thumbs.db
xcshareddata
xcuserdata
DerivedData
.idea/
4 changes: 2 additions & 2 deletions BrewServicesMenubar/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let brewExecutableKey = "brewExecutable"

struct Service {
var name = ""
var state = "unknown" // "started", "stopped", "error", "unknown"
var state = "unknown" // "started", "stopped", "none", "error", "unknown"
var user = ""
}

Expand Down Expand Up @@ -114,7 +114,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {

if service.state == "started" {
item.state = NSControl.StateValue.on
} else if service.state == "stopped" {
} else if service.state == "stopped" || service.state == "none" {
item.state = NSControl.StateValue.off
} else {
item.state = NSControl.StateValue.mixed
Expand Down

0 comments on commit e65c067

Please sign in to comment.