Skip to content

Commit

Permalink
fix for multiline echo
Browse files Browse the repository at this point in the history
  • Loading branch information
lunarcloud committed Jun 9, 2024
1 parent b8313a6 commit 0087b98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions script-dialog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,6 @@ function calculateTextDialogSize() {
updateDialogMaxSize
CHARS=${#TEST_STRING}
RECMD_SCROLL=false
#ORIG_RECMD_HEIGHT=$((CHARS / MIN_WIDTH))
#ORIG_RECMD_WIDTH=$((CHARS / MIN_HEIGHT))
RECMD_HEIGHT=$((CHARS / MIN_WIDTH))
RECMD_WIDTH=$((CHARS / MIN_HEIGHT))

Expand Down Expand Up @@ -275,7 +273,7 @@ function messagebox() {
elif [ "$INTERFACE" == "kdialog" ]; then
kdialog --title "$GUI_TITLE" --icon "$WINDOW_ICON" --msgbox "$1"
else
echo "$1"
echo -e "$1"
fi
}

Expand Down
4 changes: 2 additions & 2 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ relaunchIfNotVisible

APP_NAME="Test Script"
#WINDOW_ICON="$SCRIPT_DIR/icon.png" # if not set, it'll use standard ones
INTERFACE="zenity" #force an interface, but only do this for testing
#INTERFACE="unknown" #force an interface, but only do this for testing

if [ "$NO_SUDO" == true ]; then
messagebox "No SUDO is available on this system."
Expand Down Expand Up @@ -67,7 +67,7 @@ ACTIVITY="Pretend Login"
userandpassword USER PASS "$SUGGESTED_USERNAME"

WINDOW_ICON=$(standardIconInfo)
messagebox "So, that was:\n user: $USER\n password: $PASS"
messagebox $'So, that was:\n user: $USER\n password: $PASS'

WINDOW_ICON=$(standardIconDocument)
ACTIVITY="Test Script"
Expand Down

0 comments on commit 0087b98

Please sign in to comment.