diff --git a/src/systray/systray_windows.go b/src/systray/systray_windows.go index 1f3204b..c2c6f1d 100644 --- a/src/systray/systray_windows.go +++ b/src/systray/systray_windows.go @@ -763,12 +763,12 @@ func (t *winTray) iconToBitmap(hIcon windows.Handle) (windows.Handle, error) { func registerSystray() { if err := wt.initInstance(); err != nil { - log.Errorf("Unable to init instance: %v", err) + log.Printf("Unable to init instance: %v", err) return } if err := wt.createMenu(); err != nil { - log.Errorf("Unable to create menu: %v", err) + log.Printf("Unable to create menu: %v", err) return } @@ -793,7 +793,7 @@ func nativeLoop() { // https://msdn.microsoft.com/en-us/library/windows/desktop/ms644936(v=vs.85).aspx switch int32(ret) { case -1: - log.Errorf("Error at message loop: %v", err) + log.Printf("Error at message loop: %v", err) return case 0: return @@ -834,11 +834,11 @@ func iconBytesToFilePath(iconBytes []byte) (string, error) { func SetIcon(iconBytes []byte) { iconFilePath, err := iconBytesToFilePath(iconBytes) if err != nil { - log.Errorf("Unable to write icon data to temp file: %v", err) + log.Printf("Unable to write icon data to temp file: %v", err) return } if err := wt.setIcon(iconFilePath); err != nil { - log.Errorf("Unable to set icon: %v", err) + log.Printf("Unable to set icon: %v", err) return } } @@ -868,19 +868,19 @@ func (item *MenuItem) parentId() uint32 { func (item *MenuItem) SetIcon(iconBytes []byte) { iconFilePath, err := iconBytesToFilePath(iconBytes) if err != nil { - log.Errorf("Unable to write icon data to temp file: %v", err) + log.Printf("Unable to write icon data to temp file: %v", err) return } h, err := wt.loadIconFrom(iconFilePath) if err != nil { - log.Errorf("Unable to load icon from temp file: %v", err) + log.Printf("Unable to load icon from temp file: %v", err) return } h, err = wt.iconToBitmap(h) if err != nil { - log.Errorf("Unable to convert icon to bitmap: %v", err) + log.Printf("Unable to convert icon to bitmap: %v", err) return } wt.muMenuItemIcons.Lock() @@ -889,7 +889,7 @@ func (item *MenuItem) SetIcon(iconBytes []byte) { err = wt.addOrUpdateMenuItem(uint32(item.id), item.parentId(), item.title, item.disabled, item.checked) if err != nil { - log.Errorf("Unable to addOrUpdateMenuItem: %v", err) + log.Printf("Unable to addOrUpdateMenuItem: %v", err) return } } @@ -898,7 +898,7 @@ func (item *MenuItem) SetIcon(iconBytes []byte) { // only available on Mac and Windows. func SetTooltip(tooltip string) { if err := wt.setTooltip(tooltip); err != nil { - log.Errorf("Unable to set tooltip: %v", err) + log.Printf("Unable to set tooltip: %v", err) return } } @@ -906,7 +906,7 @@ func SetTooltip(tooltip string) { func addOrUpdateMenuItem(item *MenuItem) { err := wt.addOrUpdateMenuItem(uint32(item.id), item.parentId(), item.title, item.disabled, item.checked) if err != nil { - log.Errorf("Unable to addOrUpdateMenuItem: %v", err) + log.Printf("Unable to addOrUpdateMenuItem: %v", err) return } } @@ -922,7 +922,7 @@ func (item *MenuItem) SetTemplateIcon(templateIconBytes []byte, regularIconBytes func addSeparator(id uint32) { err := wt.addSeparatorMenuItem(id, 0) if err != nil { - log.Errorf("Unable to addSeparator: %v", err) + log.Printf("Unable to addSeparator: %v", err) return } } @@ -930,7 +930,7 @@ func addSeparator(id uint32) { func hideMenuItem(item *MenuItem) { err := wt.hideMenuItem(uint32(item.id), item.parentId()) if err != nil { - log.Errorf("Unable to hideMenuItem: %v", err) + log.Printf("Unable to hideMenuItem: %v", err) return } }