Posted on 08-05-2016 07:05 AM
I'm working on implementing Patchoo for our company as we are in great need for a good software updating method. So far thanks to all of the work that @loceee has done it seems to be working. I'd love to be able to add our logo to the cocoa dialog boxes and to change the coloring of the bubbles, but I can't find where in the code I can do this.
I think the bubble comes from this function:
secho()
{
# superecho - writes to log and will display a dialog to gui with timeout
message="$1"
timeout="$2"
title="$3"
icon="$4"
if [ "$timeout" != "" ]
then
echo "$name: USERNOTIFY: $title, $message"
echo "$(date "+%a %b %d %H:%M:%S") $computername $name-$version $mode: USERNOTIFY: $title, $message" >> "$logto/$log"
if [ "$(checkConsoleStatus)" == "userloggedin" ]
then
[ "$title" == "" ] && title="Message"
[ "$icon" == "" ] && icon="notice"
"$cdialogbin" bubble --title "$title" --text "$message" --icon "$icon" --timeout "$timeout" &
fi
else
echo "$name: $message"
echo "$(date "+%a %b %d %H:%M:%S") $computername $name-$version $mode: $message" >> "$logto/$log"
fi
}
And then the dialog box I am trying to add the logo to is here:
displayDialog()
{
text="$1" # core message
title="$2" # menubar title
title2="$3" # bold title
icon="$4" # http://mstratman.github.io/cocoadialog/#documentation3.0/icons
button1="$5"
button2="$6"
button3="$7"
# show the dialog...
"$cdialogbin" msgbox --title "$title" --icon "$icon" --text "$title2" --informative-text "$text" --timeout "$dialogtimeout" --button1 "$button1" --button2 "$button2" --button3 "$button3" --icon-height "$iconsize" --icon-width "$iconsize" --width "500" --string-output
}
And then called here:
answer=$(displayDialog "$message" "$msgtitlenewsoft" "$msgnewsoftware" "package" "Later ($deferremain remaining)" "Logout and Install...")
Solved! Go to Solution.
Posted on 08-05-2016 12:09 PM
I already did that work. You can find it here: https://github.com/franton/patchoo
Posted on 08-05-2016 12:09 PM
I already did that work. You can find it here: https://github.com/franton/patchoo