diff --git a/go.mod b/go.mod index c3ddeb2c3f..a08249c6bd 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module fyne.io/fyne/v2 go 1.14 require ( - fyne.io/systray v1.10.1-0.20230403195833-7dc3c09283d6 + fyne.io/systray v1.10.1-0.20230602210930-b6a2d6ca2a7b github.com/BurntSushi/toml v1.1.0 github.com/fredbi/uri v0.1.0 github.com/fsnotify/fsnotify v1.5.4 diff --git a/go.sum b/go.sum index 98a6c0a22d..13f533a899 100644 --- a/go.sum +++ b/go.sum @@ -37,8 +37,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -fyne.io/systray v1.10.1-0.20230403195833-7dc3c09283d6 h1:lHt8dm97Uy9ggtnt9N6XOlsp76wXmRAh3SjReWm1e2Q= -fyne.io/systray v1.10.1-0.20230403195833-7dc3c09283d6/go.mod h1:oM2AQqGJ1AMo4nNqZFYU8xYygSBZkW2hmdJ7n4yjedE= +fyne.io/systray v1.10.1-0.20230602210930-b6a2d6ca2a7b h1:MP1cUnIdF1cxrMhK9iw9H0JP3zopyD1zi84BqU6WTsE= +fyne.io/systray v1.10.1-0.20230602210930-b6a2d6ca2a7b/go.mod h1:oM2AQqGJ1AMo4nNqZFYU8xYygSBZkW2hmdJ7n4yjedE= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I= github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= diff --git a/vendor/fyne.io/systray/systray_menu_unix.go b/vendor/fyne.io/systray/systray_menu_unix.go index 1c23a1ab7f..2d6ed207dc 100644 --- a/vendor/fyne.io/systray/systray_menu_unix.go +++ b/vendor/fyne.io/systray/systray_menu_unix.go @@ -319,7 +319,7 @@ func refresh() { dbusErr := instance.menuProps.Set("com.canonical.dbusmenu", "Version", dbus.MakeVariant(instance.menuVersion)) if dbusErr != nil { - log.Printf("systray error: failed to update menu version: %s\n", dbusErr) + log.Printf("systray error: failed to update menu version: %v\n", dbusErr) return } err := menu.Emit(instance.conn, &menu.Dbusmenu_LayoutUpdatedSignal{ @@ -329,7 +329,7 @@ func refresh() { }, }) if err != nil { - log.Printf("systray error: failed to emit layout updated signal: %s\n", err) + log.Printf("systray error: failed to emit layout updated signal: %v\n", err) } } diff --git a/vendor/fyne.io/systray/systray_unix.go b/vendor/fyne.io/systray/systray_unix.go index cd6ecb9bc2..842633ce3e 100644 --- a/vendor/fyne.io/systray/systray_unix.go +++ b/vendor/fyne.io/systray/systray_unix.go @@ -60,12 +60,8 @@ func SetIcon(iconBytes []byte) { return } - dbusErr := props.Set("org.kde.StatusNotifierItem", "IconPixmap", - dbus.MakeVariant([]PX{convertToPixels(iconBytes)})) - if dbusErr != nil { - log.Printf("systray error: failed to set IconPixmap prop: %s\n", dbusErr) - return - } + props.SetMust("org.kde.StatusNotifierItem", "IconPixmap", + []PX{convertToPixels(iconBytes)}) if conn == nil { return } @@ -164,18 +160,18 @@ func quit() { func nativeStart() { systrayReady() - conn, _ := dbus.ConnectSessionBus() - if conn == nil { - log.Printf("systray error: failed to connect to DBus") + conn, err := dbus.SessionBus() + if err != nil { + log.Printf("systray error: failed to connect to DBus: %v\n", err) return } - err := notifier.ExportStatusNotifierItem(conn, path, ¬ifier.UnimplementedStatusNotifierItem{}) + err = notifier.ExportStatusNotifierItem(conn, path, ¬ifier.UnimplementedStatusNotifierItem{}) if err != nil { - log.Printf("systray error: failed to export status notifier item: %s\n", err) + log.Printf("systray error: failed to export status notifier item: %v\n", err) } err = menu.ExportDbusmenu(conn, menuPath, instance) if err != nil { - log.Printf("systray error: failed to export status notifier item: %s\n", err) + log.Printf("systray error: failed to export status notifier menu: %v\n", err) return } diff --git a/vendor/modules.txt b/vendor/modules.txt index b2dab53c50..6bd50e7309 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,4 +1,4 @@ -# fyne.io/systray v1.10.1-0.20230403195833-7dc3c09283d6 +# fyne.io/systray v1.10.1-0.20230602210930-b6a2d6ca2a7b ## explicit fyne.io/systray fyne.io/systray/internal/generated/menu