status-notifier-item 0.3.2.0 → 0.3.2.1
raw patch · 3 files changed
+35/−5 lines, 3 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- StatusNotifier.Host.Service: instance GHC.Show.Show StatusNotifier.Host.Service.ItemInfo
- StatusNotifier.Host.Service: instance GHC.Show.Show StatusNotifier.Host.Service.UpdateType
- StatusNotifier.Item.Service: instance GHC.Read.Read StatusNotifier.Item.Service.ItemParams
- StatusNotifier.Item.Service: instance GHC.Show.Show StatusNotifier.Item.Service.ItemParams
- StatusNotifier.Watcher.Constants: instance GHC.Show.Show StatusNotifier.Watcher.Constants.ItemEntry
+ StatusNotifier.Host.Service: instance GHC.Internal.Show.Show StatusNotifier.Host.Service.ItemInfo
+ StatusNotifier.Host.Service: instance GHC.Internal.Show.Show StatusNotifier.Host.Service.UpdateType
+ StatusNotifier.Item.Service: instance GHC.Internal.Read.Read StatusNotifier.Item.Service.ItemParams
+ StatusNotifier.Item.Service: instance GHC.Internal.Show.Show StatusNotifier.Item.Service.ItemParams
+ StatusNotifier.Watcher.Constants: instance GHC.Internal.Show.Show StatusNotifier.Watcher.Constants.ItemEntry
Files
- ChangeLog.md +8/−0
- src/StatusNotifier/Host/Service.hs +25/−3
- status-notifier-item.cabal +2/−2
ChangeLog.md view
@@ -1,5 +1,13 @@ # Changelog for status-notifier-item +## 0.3.2.1 - 2026-02-09+- Add name-owner resolution fallback for signal sender identification, fixing+ noisy errors when items register under well-known bus names.+- Downgrade "Failed to identify sender" log from ERROR to DEBUG when the item+ simply does not implement the getId method.+- Downgrade "Property update failures" log from ERROR to DEBUG when the failures+ are InvalidArgs (item does not support optional properties like OverlayIcon).+ ## 0.3.2.0 - 2026-02-05 - Report full `bus/path` identifiers for non-default SNI object paths so hosts can resolve Ayatana items reliably.
src/StatusNotifier/Host/Service.hs view
@@ -262,8 +262,25 @@ } = do infoMap <- readMVar itemInfoMapVar let identifySenderBySender = return (Map.lookup sender infoMap)+ identifySenderByNameOwner =+ let matchByOwner info = do+ ownerResult <- DTH.getNameOwner client+ (coerce $ itemServiceName info)+ return $ case ownerResult of+ Right owner -> owner == coerce sender+ Left _ -> False+ in findM matchByOwner (Map.elems infoMap) identifySenderById = fmap join $- identifySenderById_ >>= logEitherError hostLogger "Failed to identify sender"+ identifySenderById_ >>= logIdentifyByIdResult+ logIdentifyByIdResult+ (Left M.MethodError { M.methodErrorName = errName })+ | errName == errorUnknownMethod =+ hostLogger DEBUG+ (printf "Item does not support getId: %s"+ (show errName)) >>+ return Nothing+ logIdentifyByIdResult result =+ logEitherError hostLogger "Failed to identify sender" result identifySenderById_ = runExceptT $ do senderId <- ExceptT $ I.getId client sender senderPath let matchesSender info =@@ -283,7 +300,7 @@ return doMatchUnmatchedSender else return False lift $ findM matchesSender (Map.elems infoMap)- identifySenderBySender <||> identifySenderById+ identifySenderBySender <||> identifySenderByNameOwner <||> identifySenderById where a <||> b = runMaybeT $ MaybeT a <|> MaybeT b identifySender _ = return Nothing @@ -304,7 +321,12 @@ runUpdatersForService updaters updateType serviceName = do updateResults <- mapM ($ serviceName) updaters let (failures, updates) = partitionEithers updateResults- logLevel = if null updates then ERROR else DEBUG+ isInvalidArgs M.MethodError { M.methodErrorName = errName } =+ errName == errorName_ "org.freedesktop.DBus.Error.InvalidArgs"+ logLevel+ | not (null updates) = DEBUG+ | all isInvalidArgs failures = DEBUG+ | otherwise = ERROR mapM_ (doUpdate updateType) updates when (not $ null failures) $ hostLogger logLevel $ printf "Property update failures %s" $
status-notifier-item.cabal view
@@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.4.+-- This file has been generated from package.yaml by hpack version 0.38.3. -- -- see: https://github.com/sol/hpack name: status-notifier-item-version: 0.3.2.0+version: 0.3.2.1 synopsis: A wrapper over the StatusNotifierItem/libappindicator dbus specification description: Please see the README on Github at <https://github.com/IvanMalison/status-notifier-item#readme> category: Desktop