diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2008-11-09 17:24:12 +0000 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2008-11-09 17:24:12 +0000 |
commit | 155bed160fd627d5deecd259441f1813c87222c7 (patch) | |
tree | 376e2db8659c89fadcaf945a9534dfc8de32fa37 | |
parent | 6752b57c545e2135c22afe599ee1610b27695d54 (diff) |
Add a window icon
-rw-r--r-- | Bustle.hs | 12 | ||||
-rw-r--r-- | bustle.cabal | 2 | ||||
-rw-r--r-- | bustle.png | bin | 0 -> 1282 bytes |
3 files changed, 14 insertions, 0 deletions
@@ -18,6 +18,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -} module Main where +import Prelude hiding (catch) +import Control.Exception (catch) + +import Paths_bustle import Bustle.Parser import Bustle.Renderer @@ -41,6 +45,14 @@ run filename act = do window <- windowNew windowSetTitle window $ filename ++ " - D-Bus Activity Visualizer" + iconName <- getDataFileName "bustle.png" + let load x = pixbufNewFromFile x >>= windowSetIcon window + foldl1 (\m n -> m `catch` const n) + [ load iconName + , load "bustle.png" + , putStrLn "Couldn't find window icon. Oh well." + ] + layout <- layoutNew Nothing Nothing layout `onExpose` updateLayout layout act scrolledWindow <- scrolledWindowNew Nothing Nothing diff --git a/bustle.cabal b/bustle.cabal index c1261b9..1477ac6 100644 --- a/bustle.cabal +++ b/bustle.cabal @@ -7,6 +7,8 @@ License-file: LICENSE Author: Will Thompson <will.thompson@collabora.co.uk> Maintainer: Will Thompson <will.thompson@collabora.co.uk> Build-Depends: mtl, cairo, gtk, base, containers, parsec +Data-files: bustle.png +Build-type: Simple Executable: bustle Main-is: Bustle.hs diff --git a/bustle.png b/bustle.png Binary files differnew file mode 100644 index 0000000..779cefa --- /dev/null +++ b/bustle.png |