1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-06-28 05:25:11 +00:00

Moved text input dialog to frontend

This commit is contained in:
2023-06-18 21:40:39 +02:00
parent a1456b3987
commit 0a3f99fa32
7 changed files with 61 additions and 24 deletions

View File

@ -15,16 +15,3 @@ func (u *UI) OpenDirectory(title string) string {
return dir
}
func (u *UI) EnterText(title, info, defaultEntry string) string {
input, err := zenity.Entry(info, zenity.Title(title), zenity.EntryText(defaultEntry), zenity.Modal())
if err == zenity.ErrCanceled {
return ""
} else if err != nil {
zenity.Error(err.Error(), zenity.Title("Encountered an error!"), zenity.ErrorIcon)
return ""
} else {
return input
}
}