Skip to content

Commit

Permalink
Fixed KS to allow for multiple lines in dialog popup
Browse files Browse the repository at this point in the history
  • Loading branch information
moggieuk committed Feb 15, 2024
1 parent 0f81adb commit aec79af
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
10 changes: 10 additions & 0 deletions happy_hare/install_ks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ self_update() {
export UPDATE_GUARD=YES
clear

set +e
(set -e
cd "$SCRIPTPATH"
BRANCH=$(timeout 3s git branch --show-current)
[ -z "${BRANCH}" ] && {
Expand All @@ -59,6 +61,7 @@ self_update() {
}

echo -e "${B_GREEN}Running on '${BRANCH}' branch"
echo -e "${B_GREEN}Checking for updates..."
git fetch --quiet
git diff --quiet --exit-code "origin/$BRANCH"
[ $? -eq 1 ] && {
Expand All @@ -78,6 +81,13 @@ self_update() {
}
GIT_VER=$(git describe --tags)
echo -e "${B_GREEN}Already at the latest version: ${GIT_VER}"
)
if [ $? -ne 0 ]; then
echo -e "${ERROR}Error updating from github"
echo -e "${ERROR}Looks like you might have an old version of git"
echo -e "${ERROR}Skipping automatic update..."
fi
set -e
}

function nextsuffix {
Expand Down
6 changes: 4 additions & 2 deletions ks_includes/widgets/prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ def decode(self, data):
self.text = ""
self.buttons = []
return
elif data.startswith('prompt_text'):
self.text = data.replace('prompt_text ', '')
elif data.startswith('prompt_text'): # Happy Hare modified to allow multiple text lines (per spec)
if not self.text == "":
self.text += "\n\n"
self.text += data.replace('prompt_text ', '')
return
elif data.startswith('prompt_button ') or data.startswith('prompt_footer_button'):
data = data.replace('prompt_button ', '')
Expand Down

0 comments on commit aec79af

Please sign in to comment.