packages feed

taffybar 0.4.1 → 0.4.2

raw patch · 3 files changed

+26/−4 lines, 3 filesdep +network-uridep −networkdep ~time

Dependencies added: network-uri

Dependencies removed: network

Dependency ranges changed: time

Files

CHANGELOG.md view
@@ -1,3 +1,8 @@+# 0.4.2++ * Expand the version range for time+ * Depend on network-uri instead of network+ # 0.4.1   * Make the clock react to time zone changes
src/System/Taffybar/SimpleClock.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE CPP #-}+{-# LANGUAGE ForeignFunctionInterface #-} -- | This module implements a very simple text-based clock widget. -- The widget also toggles a calendar widget when clicked.  This -- calendar is not fancy at all and has no data backend.@@ -70,13 +72,28 @@                          , getLocale :: IO TimeLocale                          } +systemGetTZ :: IO TimeZone+systemGetTZ = setTZ >> getCurrentTimeZone++-- | Old versions of time do not call localtime_r properly.  We set+-- the time zone manually, if required.+setTZ :: IO ()+#if MIN_VERSION_time(1, 4, 2)+setTZ = return ()+#else+setTZ = c_tzset++foreign import ccall unsafe "time.h tzset"+  c_tzset :: IO ()+#endif+ -- | A configurable text-based clock widget.  It currently allows for -- a configurable time zone through the 'ClockConfig'. -- -- See also 'textClockNew'. textClockNewWith :: ClockConfig -> String -> Double -> IO Widget textClockNewWith cfg fmt updateSeconds = do-  let ti = TimeInfo { getTZ = maybe getCurrentTimeZone return userZone+  let ti = TimeInfo { getTZ = maybe systemGetTZ return userZone                     , getLocale = maybe (return defaultTimeLocale) return userLocale                     }   l    <- pollingLabelNew "" updateSeconds (getCurrentTime' ti fmt)
taffybar.cabal view
@@ -1,5 +1,5 @@ name: taffybar-version: 0.4.1+version: 0.4.2 synopsis: A desktop bar similar to xmobar, but with more GUI license: BSD3 license-file: LICENSE@@ -22,14 +22,14 @@ library   default-language: Haskell2010   build-depends: base > 3 && < 5,-                 time >= 1.4.2 && < 1.5,+                 time >= 1.4 && < 1.5,                  old-locale,                  containers,                  text,                  HTTP,                  parsec >= 3.1,                  mtl >= 2,-                 network,+                 network-uri >= 2.6 && < 3,                  cairo,                  dbus >= 0.10.1 && < 1.0,                  gtk >= 0.12.1 && < 0.14,