diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2016-07-05 19:18:54 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2016-07-05 19:18:54 +0300 |
commit | f8bee58ade73437c9e9e176b85eb29fe290f39fb (patch) | |
tree | 9157472c6c3dd58701aba7bc6678dc2aec665f44 /include/functions | |
parent | 2b2051dca7cf64cbb3caf4664eb6233426ae963e (diff) |
Implement tooltips
Diffstat (limited to 'include/functions')
-rw-r--r-- | include/functions | 25 |
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 } |