Skip to content

Commit

Permalink
Fix up deprecated functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuuzetsu committed Dec 24, 2013
1 parent 9b38bf4 commit 0e85094
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions yi/src/library/Yi/UI/Pango/Utils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

module Yi.UI.Pango.Utils where

import Control.Exception (catch, throw)

import Paths_yi
import System.FilePath
import Graphics.UI.Gtk
Expand All @@ -14,7 +16,10 @@ import System.Glib.GError
loadIcon :: FilePath -> IO Pixbuf
loadIcon fpath = do
iconfile <- getDataFileName $ "art" </> fpath
icoProject <- catchGError (pixbufNewFromFile iconfile)
(\(GError dom code msg) -> throwGError $ GError dom code $
msg ++ " -- use the yi_datadir environment variable to specify an alternate location")
icoProject <-
catch (pixbufNewFromFile iconfile)
(\(GError dom code msg) ->
throw $ GError dom code $
msg ++ " -- use the yi_datadir environment variable to"
++ " specify an alternate location")
pixbufAddAlpha icoProject (Just (0,255,0))

0 comments on commit 0e85094

Please sign in to comment.