From eddb54e50387b03b4e4837bd7a0261610105b099 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sat, 3 Aug 2019 00:06:46 -0400 Subject: [PATCH] Edit moved to more menu. New note moved to button. Exit option removed from menu, now controled by button. --- notestorm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/notestorm b/notestorm index b15e729..b84b786 100755 --- a/notestorm +++ b/notestorm @@ -77,7 +77,7 @@ menulist() { dialog --backtitle "$(gettext "Use the up and down arrow keys to find the option you want, then press enter to select it.")" \ --cancel-label "$(gettext "Exit")" \ --extra-button \ - --extra-label "$(gettext "Edit")" \ + --extra-label "$(gettext "New")" \ --help-button \ --help-label "$(gettext "More")" \ --ok-label "$(gettext "View")" \ @@ -94,6 +94,7 @@ more_menu() { options=("encrypt" "$(gettext "Encrypt")") fi options+=( + "edit" "$(gettext "Edit")" "delete" "$(gettext "Delete")") local action="$(dialog --backtitle "$(gettext "Use the up and down arrow keys to find the option you want, then press enter to select it.")" \ --no-tags \ @@ -102,6 +103,7 @@ more_menu() { case "$action" in "decrypt") decrypt_note "$1";; "delete") delete_note "$1";; + "edit") edit_note "$1";; "encrypt") encrypt_note "$1";; *) return;; esac @@ -271,10 +273,7 @@ while [ "$action" != "exit" ]; do # Create menu of actions and notes. ifs="$IFS" IFS=$'\n' - action="$(menulist \ - "add_note" "$(gettext "New note")" \ - "${noteMenu[@]}" \ - "exit" "$(gettext "Exit")")" + action="$(menulist "${noteMenu[@]}")" dialogCode=$? IFS="$ifs" @@ -290,7 +289,7 @@ while [ "$action" != "exit" ]; do case $dialogCode in 0) display_note "${action}";; 2) more_menu "${action#HELP }";; - 3) edit_note "${action}";; + 3) add_note;; esac;; esac done