mirror of
https://github.com/passepartoutvpn/passepartout-apple.git
synced 2025-01-31 13:02:11 +00:00
Add some Mac tooltips
- Refresh infrastructure - Favorite/Unfavorite
This commit is contained in:
parent
3ce6678f51
commit
3e438b2695
@ -100,6 +100,7 @@ class ProviderServiceView: NSView {
|
||||
checkOnlyShowsFavorites.title = L10n.Service.Cells.OnlyShowsFavorites.caption
|
||||
checkOnlyShowsFavorites.state = .off
|
||||
buttonRefreshInfrastructure.image = NSImage(named: NSImage.refreshTemplateName)
|
||||
buttonRefreshInfrastructure.toolTip = L10n.Service.Cells.Provider.Refresh.caption
|
||||
buttonFavorite.image = NSImage(named: NSImage.bookmarksTemplateName)
|
||||
|
||||
updateFavoriteState()
|
||||
@ -138,8 +139,10 @@ class ProviderServiceView: NSView {
|
||||
if isFavorite {
|
||||
profile?.favoriteGroupIds = profile?.favoriteGroupIds ?? []
|
||||
profile?.favoriteGroupIds?.append(groupId)
|
||||
buttonFavorite.toolTip = L10n.Provider.Pool.Actions.unfavorite
|
||||
} else {
|
||||
profile?.favoriteGroupIds?.removeAll { $0 == groupId }
|
||||
buttonFavorite.toolTip = L10n.Provider.Pool.Actions.favorite
|
||||
}
|
||||
|
||||
// disable favorite while filtering favorites
|
||||
@ -294,6 +297,7 @@ class ProviderServiceView: NSView {
|
||||
let groupId = group.uniqueId(in: category)
|
||||
let isFavorite = profile?.favoriteGroupIds?.contains(groupId) ?? false
|
||||
buttonFavorite.state = isFavorite ? .on : .off
|
||||
buttonFavorite.toolTip = (isFavorite ? L10n.Provider.Pool.Actions.unfavorite : L10n.Provider.Pool.Actions.favorite)
|
||||
}
|
||||
|
||||
private func delegateSelectedPool() {
|
||||
|
Loading…
Reference in New Issue
Block a user