Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2016-07-05 19:18:54 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2016-07-05 19:18:54 +0300
commitf8bee58ade73437c9e9e176b85eb29fe290f39fb (patch)
tree9157472c6c3dd58701aba7bc6678dc2aec665f44 /include/functions
parent2b2051dca7cf64cbb3caf4664eb6233426ae963e (diff)
Implement tooltips
Diffstat (limited to 'include/functions')
-rw-r--r--include/functions25
1 files changed, 4 insertions, 21 deletions
diff --git a/include/functions b/include/functions
index 66b20715..29104c0e 100644
--- a/include/functions
+++ b/include/functions
@@ -444,25 +444,6 @@
}
- ################################################################################
- # Name : DisplayToolTip()
- # Description : Show tooltip on screen
- #
- # Input : $1 = text
- # Returns : <nothing>
- ################################################################################
-
- DisplayToolTip() {
- if [ ${SHOW_TOOL_TIPS} -eq 1 ]; then
- if [ ${CRONJOB} -eq 0 ]; then
- # Check if we already have already discovered a proper echo command tool. It not, set it default to 'echo'.
- if [ "${ECHOCMD}" = "" ]; then ECHOCMD="echo"; fi
- ${ECHOCMD} "${WHITE}[${BLUE}Tool Tip${NORMAL}${WHITE}]${NORMAL}: $1"
- else
- echo "${TEXT}${RESULTPART}"
- fi
- fi
- }
################################################################################
@@ -567,14 +548,16 @@
################################################################################
DisplayToolTip() {
- if [ ${SHOW_TOOL_TIPS} -eq 1 ]; then
+ # Display tooltip when enabled and no tip has been displayed yet
+ if [ ${SHOW_TOOL_TIPS} -eq 1 -a ${TOOLTIP_SHOWED} -eq 0 ]; then
if [ ${CRONJOB} -eq 0 ]; then
# Check if we already have already discovered a proper echo command tool. It not, set it default to 'echo'.
if [ "${ECHOCMD}" = "" ]; then ECHOCMD="echo"; fi
- ${ECHOCMD} "${WHITE}[${BLUE}TOOLTIP${NORMAL}${WHITE}]${NORMAL} ${WHITE}$1${NORMAL}"
+ ${ECHOCMD} "${WHITE}[${BLUE}TIP${NORMAL}${WHITE}]${NORMAL}: $1"
else
echo "${TEXT}${RESULTPART}"
fi
+ TOOLTIP_SHOWED=1
fi
}