Example #1
0
func setTrayIcon(icon *gtk.StatusIcon, status string, percent float64) {
	iconName := getGtkIcon(percent, status)

	if icon.GetIconName() != iconName {
		icon.SetFromIconName(iconName)
	}
	setToolTip(icon, status, percent, getAverageTime())
}
Example #2
0
func setToolTip(icon *gtk.StatusIcon, status string, percent float64, time int) {
	icon.SetTooltipMarkup(getTooltipString(percent, status, time))
}