Skip to content

Commit

Permalink
Merge pull request #25 from rvl/gi-gdkpixbuf
Browse files Browse the repository at this point in the history
gi-gdkpixbuf-2.0.26 fix
  • Loading branch information
colonelpanic8 committed May 13, 2021
2 parents 4df092f + 4afd846 commit c8e2766
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/StatusNotifier/Tray.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE OverloadedLabels #-}
{-# LANGUAGE CPP #-}
module StatusNotifier.Tray where

import Control.Concurrent.MVar as MV
Expand Down Expand Up @@ -123,7 +124,12 @@ getIconPixbufByName size name themePath = do
maybeFile <- if fileExists
then return $ Just nameString
else fmap join $ sequenceA $ getIconPathFromThemePath nameString <$> themePath
sequenceA $ pixbufNewFromFile <$> maybeFile
#if MIN_VERSION_gi_gdkpixbuf(2,0,26)
let handleResult = fmap join . sequenceA
#else
let handleResult = sequenceA
#endif
handleResult $ pixbufNewFromFile <$> maybeFile

getIconPathFromThemePath :: String -> String -> IO (Maybe String)
getIconPathFromThemePath name themePath = if name == "" then return Nothing else do
Expand Down Expand Up @@ -257,8 +263,9 @@ buildTray TrayParams { trayHost = Host
in return (thisTime, thisTime /= previous)

trayLogger DEBUG $
printf "Allocating image size %s, width %s, \
\ height %s, resize %s"
printf
("Allocating image size %s, width %s," <>
" height %s, resize %s")
(show size)
(show actualWidth)
(show actualHeight)
Expand Down

0 comments on commit c8e2766

Please sign in to comment.