Edit moved to more menu. New note moved to button. Exit option removed from menu, now controled by button.
This commit is contained in:
11
notestorm
11
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.")" \
|
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")" \
|
--cancel-label "$(gettext "Exit")" \
|
||||||
--extra-button \
|
--extra-button \
|
||||||
--extra-label "$(gettext "Edit")" \
|
--extra-label "$(gettext "New")" \
|
||||||
--help-button \
|
--help-button \
|
||||||
--help-label "$(gettext "More")" \
|
--help-label "$(gettext "More")" \
|
||||||
--ok-label "$(gettext "View")" \
|
--ok-label "$(gettext "View")" \
|
||||||
@@ -94,6 +94,7 @@ more_menu() {
|
|||||||
options=("encrypt" "$(gettext "Encrypt")")
|
options=("encrypt" "$(gettext "Encrypt")")
|
||||||
fi
|
fi
|
||||||
options+=(
|
options+=(
|
||||||
|
"edit" "$(gettext "Edit")"
|
||||||
"delete" "$(gettext "Delete")")
|
"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.")" \
|
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 \
|
--no-tags \
|
||||||
@@ -102,6 +103,7 @@ more_menu() {
|
|||||||
case "$action" in
|
case "$action" in
|
||||||
"decrypt") decrypt_note "$1";;
|
"decrypt") decrypt_note "$1";;
|
||||||
"delete") delete_note "$1";;
|
"delete") delete_note "$1";;
|
||||||
|
"edit") edit_note "$1";;
|
||||||
"encrypt") encrypt_note "$1";;
|
"encrypt") encrypt_note "$1";;
|
||||||
*) return;;
|
*) return;;
|
||||||
esac
|
esac
|
||||||
@@ -271,10 +273,7 @@ while [ "$action" != "exit" ]; do
|
|||||||
# Create menu of actions and notes.
|
# Create menu of actions and notes.
|
||||||
ifs="$IFS"
|
ifs="$IFS"
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
action="$(menulist \
|
action="$(menulist "${noteMenu[@]}")"
|
||||||
"add_note" "$(gettext "New note")" \
|
|
||||||
"${noteMenu[@]}" \
|
|
||||||
"exit" "$(gettext "Exit")")"
|
|
||||||
dialogCode=$?
|
dialogCode=$?
|
||||||
IFS="$ifs"
|
IFS="$ifs"
|
||||||
|
|
||||||
@@ -290,7 +289,7 @@ while [ "$action" != "exit" ]; do
|
|||||||
case $dialogCode in
|
case $dialogCode in
|
||||||
0) display_note "${action}";;
|
0) display_note "${action}";;
|
||||||
2) more_menu "${action#HELP }";;
|
2) more_menu "${action#HELP }";;
|
||||||
3) edit_note "${action}";;
|
3) add_note;;
|
||||||
esac;;
|
esac;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user