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

@ -22,7 +22,7 @@ func (a *App) GetIndexes(hostKey, dbKey, collKey string) []bson.M {
if err != nil {
runtime.LogWarning(a.ctx, "Encountered an error while creating index cursor:")
runtime.LogWarning(a.ctx, err.Error())
zenity.Info(err.Error(), zenity.Title("Error while creating cursor"), zenity.ErrorIcon)
zenity.Error(err.Error(), zenity.Title("Error while creating cursor"), zenity.ErrorIcon)
return nil
}
@ -31,7 +31,7 @@ func (a *App) GetIndexes(hostKey, dbKey, collKey string) []bson.M {
if err != nil {
runtime.LogWarning(a.ctx, "Encountered an error while executing index cursor:")
runtime.LogWarning(a.ctx, err.Error())
zenity.Info(err.Error(), zenity.Title("Error while running cursor"), zenity.ErrorIcon)
zenity.Error(err.Error(), zenity.Title("Error while running cursor"), zenity.ErrorIcon)
return nil
}
@ -63,7 +63,7 @@ func (a *App) CreateIndex(hostKey, dbKey, collKey, jsonData string) string {
if err != nil {
runtime.LogError(a.ctx, "Could not parse index JSON:")
runtime.LogError(a.ctx, err.Error())
zenity.Info(err.Error(), zenity.Title("Could not parse JSON"), zenity.ErrorIcon)
zenity.Error(err.Error(), zenity.Title("Could not parse JSON"), zenity.ErrorIcon)
return ""
}
@ -93,7 +93,7 @@ func (a *App) CreateIndex(hostKey, dbKey, collKey, jsonData string) string {
if err != nil {
runtime.LogWarning(a.ctx, "Encountered an error while creating index:")
runtime.LogWarning(a.ctx, err.Error())
zenity.Info(err.Error(), zenity.Title("Error while creating index"), zenity.ErrorIcon)
zenity.Error(err.Error(), zenity.Title("Error while creating index"), zenity.ErrorIcon)
return ""
}
@ -111,7 +111,7 @@ func (a *App) DropIndex(hostKey, dbKey, collKey, indexName string) bool {
if err != nil {
runtime.LogError(a.ctx, "Encountered an error while creating index drop cursor:")
runtime.LogError(a.ctx, err.Error())
zenity.Info(err.Error(), zenity.Title("Error while creating drop cursor"), zenity.ErrorIcon)
zenity.Error(err.Error(), zenity.Title("Error while creating drop cursor"), zenity.ErrorIcon)
return false
}