[client] Add --disable-update-settings flag to the service (#4335)

[client] Add --disable-update-settings flag to the service (#4335)
This commit is contained in:
hakansa
2025-08-13 21:05:12 +03:00
committed by GitHub
parent 86a00ab4af
commit 70db8751d7
12 changed files with 354 additions and 74 deletions

View File

@@ -654,6 +654,19 @@ func (p *profileMenu) clear(profiles []Profile) {
}
}
// setEnabled enables or disables the profile menu based on the provided state
func (p *profileMenu) setEnabled(enabled bool) {
if p.profileMenuItem != nil {
if enabled {
p.profileMenuItem.Enable()
p.profileMenuItem.SetTooltip("")
} else {
p.profileMenuItem.Hide()
p.profileMenuItem.SetTooltip("Profiles are disabled by daemon")
}
}
}
func (p *profileMenu) updateMenu() {
// check every second
ticker := time.NewTicker(time.Second)
@@ -662,7 +675,6 @@ func (p *profileMenu) updateMenu() {
for {
select {
case <-ticker.C:
// get profilesList
profiles, err := p.getProfiles()
if err != nil {