gtk-sni-tray 0.1.2.0 → 0.1.2.1
raw patch · 2 files changed
+10/−6 lines, 2 filesdep +dbus-hsloggerdep ~status-notifier-item
Dependencies added: dbus-hslogger
Dependency ranges changed: status-notifier-item
Files
- gtk-sni-tray.cabal +4/−3
- src/StatusNotifier/Tray.hs +6/−3
gtk-sni-tray.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 915ea56e175e3c6e8042c5e3ca861798e4d4729a1ef716fac80a24fb79f558d4+-- hash: adb49a931647385ff48660ebc0445691dbbdb7a9f13d6bbe6bc65c939dbf1bcf name: gtk-sni-tray-version: 0.1.2.0+version: 0.1.2.1 synopsis: A standalone StatusNotifierItem/AppIndicator tray description: Please see the README on Github at <https://github.com/IvanMalison/gtk-sni-tray#readme> category: System@@ -51,7 +51,7 @@ , haskell-gi >=0.21.2 , haskell-gi-base >=0.21.1 , hslogger- , status-notifier-item >=0.2.0.0 && <0.3.0.0+ , status-notifier-item >=0.2.2.0 && <0.3.0.0 , text , transformers , unix@@ -69,6 +69,7 @@ build-depends: base >=4.7 && <5 , dbus >=1.0.0 && <2.0.0+ , dbus-hslogger >=0.1.0.1 && <0.2.0.0 , gi-gdk , gi-gtk >=3.0.21 , gtk-sni-tray
src/StatusNotifier/Tray.hs view
@@ -141,6 +141,7 @@ contextMap <- MV.newMVar Map.empty let getContext name = Map.lookup name <$> MV.readMVar contextMap+ showInfo info = (show info { iconPixmaps = [] }) getSize rectangle = case orientation of@@ -162,7 +163,9 @@ let handlePixbuf mpbuf = if isJust mpbuf then Gtk.imageSetFromPixbuf image mpbuf- else updateHandler ItemRemoved info+ else trayLogger WARNING $+ printf "Failed to get pixbuf for %s" $+ showInfo info in handlePixbuf updateHandler ItemAdded@@ -218,8 +221,8 @@ pixBuf <- getInfo info serviceName >>= getScaledPixBufFromInfo size when (isNothing pixBuf) $ trayLogger WARNING $- printf "Got null pixbuf for info %s"- (show info { iconPixmaps = [] })+ printf "Got null pixbuf for info %s" $+ showInfo info Gtk.imageSetFromPixbuf image pixBuf _ <- Gtk.onWidgetSizeAllocate image setPixbuf