status-notifier-item 0.3.0.3 → 0.3.0.4
raw patch · 2 files changed
+12/−12 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
src/StatusNotifier/Host/Service.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-}-+{-# LANGUAGE RecordWildCards #-} module StatusNotifier.Host.Service where import Control.Applicative@@ -208,10 +208,13 @@ handleItemAdded serviceName = modifyMVar_ itemInfoMapVar $ \itemInfoMap -> buildItemInfo serviceName >>=- either (logErrorAndThen $ return itemInfoMap)- (addItemInfo itemInfoMap)- where addItemInfo map itemInfo = doUpdate ItemAdded itemInfo >>- return (Map.insert (itemServiceName itemInfo) itemInfo map)+ either (logErrorAndThen $ return itemInfoMap)+ (addItemInfo itemInfoMap)+ where addItemInfo map itemInfo@ItemInfo{..} =+ if Map.member itemServiceName map+ then return map+ else doUpdate ItemAdded itemInfo >>+ return (Map.insert itemServiceName itemInfo map) getObjectPathForItemName name = maybe I.defaultPath itemServicePath . Map.lookup name <$>@@ -359,7 +362,7 @@ ] initializeItemInfoMap = modifyMVar itemInfoMapVar $ \itemInfoMap -> do- -- All initialization is done inside this modifyMvar to avoid race+ -- All initialization is done inside this modifyMVar to avoid race -- conditions with the itemInfoMapVar. clientSignalHandlers <- registerWithPairs clientRegistrationPairs watcherSignalHandlers <- registerWithPairs watcherRegistrationPairs@@ -376,10 +379,7 @@ finishInitialization serviceNames = do itemInfos <- createAll serviceNames let newMap = Map.fromList $ map (itemServiceName &&& id) itemInfos- -- Extra paranoia about the map- resultMap = if Map.null itemInfoMap- then newMap- else Map.union itemInfoMap newMap+ resultMap = Map.union itemInfoMap newMap W.registerStatusNotifierHost client busName >>= either logErrorAndShutdown (const $ return (resultMap, True)) W.getRegisteredStatusNotifierItems client >>=
status-notifier-item.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 814b1d921c93e89b7f480848b6847b1d9c8bd1368e8a12370e302219b9959f87+-- hash: 344c16f1d7d5b92177917e03471f2ee3844623f1a4127becd92cbc23effc40a2 name: status-notifier-item-version: 0.3.0.3+version: 0.3.0.4 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