Skip to content

Commit

Permalink
v6.27 (#3240)
Browse files Browse the repository at this point in the history
+ DietPi-Globals | G_WHIP_SCROLLBOX() has been merged into G_WHIP_MSG(), which adds scroll functionality automatically when exceeding screen height
+ DietPi-Globals | G_WHIP_VIEWFILE(): Show title "File viewer" as well if no G_PROGRAM_NAME was assigned
+ DietPi-Globals | G_ERROR_HANDLER(): Check if it's our program via case-insensitive "dietpi-" prefix of $G_PROGRAM_NAME, since we assign ${##*/0} now to G_PROGRAM_NAME within G_INIT() if now name has been assigned before
  • Loading branch information
MichaIng authored Nov 22, 2019
1 parent b9238f6 commit f126f9d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dietpi/dietpi-bugreport
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ Would you like to send a bug report archive or remove an already uploaded one?';

elif (( $G_WHIP_RETURNED_VALUE == 3 )); then

G_WHIP_SCROLLBOX "The upload will contain the following command outputs:\n
G_WHIP_MSG "The upload will contain the following command outputs:\n
$(printf "\t- %s\n" "${aCOMMAND_LIST[@]}")\n
It will contain as well the following files and directories:\n
$(printf "\t- %s\n" "${aFILE_LIST[@]}")"
Expand Down
2 changes: 1 addition & 1 deletion dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -15911,7 +15911,7 @@ List of installed software and their URL links for online docs:
done

G_WHIP_SIZE_X_MAX=70
G_WHIP_SCROLLBOX "$string"
G_WHIP_MSG "$string"
unset string

;;
Expand Down
4 changes: 2 additions & 2 deletions dietpi/func/dietpi-globals
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then
if (( ! $result )); then

G_WHIP_INIT
whiptail ${G_PROGRAM_NAME+--title "$G_PROGRAM_NAME | File viewer"} --backtitle "$WHIP_BACKTITLE" --textbox $fp_file --ok-button "$G_WHIP_BUTTON_OK_TEXT" $WHIP_SCROLLTEXT $WHIP_SIZE_Y $WHIP_SIZE_X
whiptail --title "${G_PROGRAM_NAME+$G_PROGRAM_NAME | }File viewer" --backtitle "$WHIP_BACKTITLE" --textbox $fp_file --ok-button "$G_WHIP_BUTTON_OK_TEXT" $WHIP_SCROLLTEXT $WHIP_SIZE_Y $WHIP_SIZE_X

fi

Expand Down Expand Up @@ -999,7 +999,7 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')"; then
G_DIETPI-NOTIFY 1 "$G_ERROR_HANDLER_COMMAND"

# Ask to report if it's one of our programs
[[ $G_PROGRAM_NAME && $G_ERROR_HANDLER_INFO_ONLY != 1 ]] && G_DIETPI-NOTIFY 2 "$print_report_to_dietpi_info"
[[ ${G_PROGRAM_NAME,,} == 'dietpi-'* && $G_ERROR_HANDLER_INFO_ONLY != 1 ]] && G_DIETPI-NOTIFY 2 "$print_report_to_dietpi_info"

# If interactive, prompt whip message
if (( $G_INTERACTIVE )); then
Expand Down

0 comments on commit f126f9d

Please sign in to comment.