1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-07-22 15:18:02 +00:00

Correct use of zenity methods

This commit is contained in:
2023-02-21 17:27:44 +01:00
parent 1f76b16e75
commit 5b1f410a50
15 changed files with 64 additions and 64 deletions

View File

@ -47,7 +47,7 @@ func (a *App) Settings() Settings {
if err != nil {
runtime.LogWarning(a.ctx, "Cannot unmarshal settings.json:")
runtime.LogWarning(a.ctx, err.Error())
zenity.Info("Could not retrieve application settings, using defaults!", zenity.Title("Information"), zenity.WarningIcon)
zenity.Warning("Could not retrieve application settings, using defaults!", zenity.WarningIcon)
}
return s
}
@ -59,7 +59,7 @@ func (a *App) UpdateSettings(jsonData string) Settings {
if err != nil {
runtime.LogError(a.ctx, "Malformed JSON for settings file:")
runtime.LogError(a.ctx, err.Error())
zenity.Info(err.Error(), zenity.Title("Malformed JSON"), zenity.ErrorIcon)
zenity.Error(err.Error(), zenity.Title("Malformed JSON"), zenity.ErrorIcon)
return s
}
@ -67,7 +67,7 @@ func (a *App) UpdateSettings(jsonData string) Settings {
if err != nil {
runtime.LogError(a.ctx, "Could not marshal settings into JSON:")
runtime.LogError(a.ctx, err.Error())
zenity.Info(err.Error(), zenity.Title("Malformed JSON"), zenity.ErrorIcon)
zenity.Error(err.Error(), zenity.Title("Malformed JSON"), zenity.ErrorIcon)
return s
}
@ -76,7 +76,7 @@ func (a *App) UpdateSettings(jsonData string) Settings {
if err != nil {
runtime.LogError(a.ctx, "Could not update host list:")
runtime.LogError(a.ctx, err.Error())
zenity.Info(err.Error(), zenity.Title("Could not update host list"), zenity.ErrorIcon)
zenity.Error(err.Error(), zenity.Title("Could not update host list"), zenity.ErrorIcon)
}
return s