Skip to content
This repository has been archived by the owner on Sep 12, 2021. It is now read-only.

Commit

Permalink
Fix old reference of activities and remove some useless icons
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacalz committed Jun 28, 2020
1 parent 2c517f4 commit 695b509
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions internal/gui/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ func (u *user) settingsView(w fyne.Window, a fyne.App) fyne.CanvasObject {
// An entry for typing the new username.
usernameEntry := widgets.NewAdvancedEntry("New Username", false)

// The function to run on changing username
changeUsername := func() {
// Create the button used for changing the username.
usernameButton := widget.NewButton("Change Username", func() {
// Check that the username is valid.
if validate.Input(usernameEntry.Text, u.password, w) {
// Ask the user to confirm what we are about to do.
Expand All @@ -62,16 +62,13 @@ func (u *user) settingsView(w fyne.Window, a fyne.App) fyne.CanvasObject {
}, w)
}

}

// Create the button used for changing the username.
usernameButton := widget.NewButtonWithIcon("Change Username", theme.ConfirmIcon(), changeUsername)
})

// Create the entry for updating the password.
passwordEntry := widgets.NewAdvancedEntry("New Password", true)

// Create the button used for changing the password.
passwordButton := widget.NewButtonWithIcon("Change Password", theme.ConfirmIcon(), func() {
passwordButton := widget.NewButton("Change Password", func() {
// Check that the password is valid.
if validate.Input(u.username, passwordEntry.Text, w) {
// Ask the user to confirm what we are about to do.
Expand Down Expand Up @@ -118,7 +115,7 @@ func (u *user) settingsView(w fyne.Window, a fyne.App) fyne.CanvasObject {
}
})
// Create a button for clearing the data of a given profile.
deleteButton := widget.NewButtonWithIcon("Delete all saved activities", theme.DeleteIcon(), func() {
deleteButton := widget.NewButtonWithIcon("Delete all saved exercises", theme.DeleteIcon(), func() {

// Ask the user to confirm what we are about to do.
dialog.ShowConfirm("Are you sure that you want to continue?", "Deleting your data will remove all of your exercises and activities.", func(remove bool) {
Expand Down

0 comments on commit 695b509

Please sign in to comment.