packages feed

status-notifier-item 0.3.0.5 → 0.3.1.0

raw patch · 5 files changed

+81/−24 lines, 5 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ StatusNotifier.Host.Service: [itemIsMenu] :: ItemInfo -> Bool
+ StatusNotifier.Host.Service: itemIsMenuL :: Lens' ItemInfo Bool
+ StatusNotifier.Item.Client: contextMenu :: Client -> BusName -> ObjectPath -> Int32 -> Int32 -> IO (Either MethodError ())
+ StatusNotifier.Item.Client: contextMenuMethodCall :: MethodCall
+ StatusNotifier.Item.Client: emitNewMenu :: Client -> ObjectPath -> IO ()
+ StatusNotifier.Item.Client: getAttentionMovieName :: Client -> BusName -> ObjectPath -> IO (Either MethodError String)
+ StatusNotifier.Item.Client: getItemIsMenu :: Client -> BusName -> ObjectPath -> IO (Either MethodError Bool)
+ StatusNotifier.Item.Client: makeHandlerForNewMenu :: (Signal -> IO ()) -> (Signal -> IO ()) -> Signal -> IO ()
+ StatusNotifier.Item.Client: methodCallForAttentionMovieName :: MethodCall
+ StatusNotifier.Item.Client: methodCallForItemIsMenu :: MethodCall
+ StatusNotifier.Item.Client: registerForNewMenu :: Client -> MatchRule -> (Signal -> IO ()) -> (Signal -> IO ()) -> IO SignalHandler
+ StatusNotifier.Item.Client: signalForNewMenu :: Signal
- StatusNotifier.Host.Service: ItemInfo :: BusName -> ObjectPath -> Maybe String -> Maybe String -> Maybe String -> Maybe (String, ImageInfo, String, String) -> String -> String -> Maybe String -> Maybe String -> ImageInfo -> ImageInfo -> Maybe ObjectPath -> ItemInfo
+ StatusNotifier.Host.Service: ItemInfo :: BusName -> ObjectPath -> Maybe String -> Maybe String -> Maybe String -> Maybe (String, ImageInfo, String, String) -> String -> String -> Maybe String -> Maybe String -> ImageInfo -> ImageInfo -> Maybe ObjectPath -> Bool -> ItemInfo
- StatusNotifier.Host.Service: callFromInfo :: () => (BusName -> ObjectPath -> t) -> ItemInfo -> t
+ StatusNotifier.Host.Service: callFromInfo :: (BusName -> ObjectPath -> t) -> ItemInfo -> t

Files

item/Main.hs view
@@ -44,5 +44,5 @@                 <> progDesc "Run a static StatusNotifierItem"                 )   buildItem itemParams-  void getChar+  void $ getChar 
src/StatusNotifier/Host/Service.hs view
@@ -92,6 +92,7 @@   , iconPixmaps :: ImageInfo   , overlayIconPixmaps :: ImageInfo   , menuPath :: Maybe ObjectPath+  , itemIsMenu :: Bool   } deriving (Eq, Show)  supressPixelData info =@@ -175,6 +176,7 @@         idString <- doGetDef Nothing $ getMaybe I.getId         status <- doGetDef Nothing $ getMaybe I.getStatus         category <- doGetDef Nothing $ getMaybe I.getCategory+        itemIsMenu <- doGetDef False I.getItemIsMenu         return ItemInfo                  { itemServiceName = busName_ name                  , itemId = idString@@ -189,6 +191,7 @@                  , menuPath = menu                  , overlayIconName = overlayIName                  , overlayIconPixmaps = overlayPixmap+                 , itemIsMenu = itemIsMenu                  }        createAll serviceNames = do
src/StatusNotifier/Watcher/Service.hs view
@@ -111,7 +111,7 @@        isStatusNotifierHostRegistered = not . null <$> readMVar notifierHosts -      protocolVersion = return 1 :: IO Int32+      protocolVersion = return 0 :: IO Int32        filterDeadService :: String -> MVar [ItemEntry] -> IO [ItemEntry]       filterDeadService deadService mvar = modifyMVar mvar $
status-notifier-item.cabal view
@@ -1,13 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.33.0.+-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack------ hash: 873456e7569825628558a592c99b8325a613aaceda502b15b5bfd3b89ebbc4a3  name:           status-notifier-item-version:        0.3.0.5+version:        0.3.1.0 synopsis:       A wrapper over the StatusNotifierItem/libappindicator dbus specification description:    Please see the README on Github at <https://github.com/IvanMalison/status-notifier-item#readme> category:       Desktop
xml/StatusNotifierItem.xml view
@@ -1,56 +1,111 @@+<!-- Based on:+     https://invent.kde.org/frameworks/knotifications/-/blob/master/src/org.kde.StatusNotifierItem.xml+     https://github.com/ubuntu/gnome-shell-extension-appindicator/blob/master/interfaces-xml/StatusNotifierItem.xml+-->+ <node name="/StatusNotifierItem">   <interface name="org.kde.StatusNotifierItem">+     <property name="Category" type="s" access="read"/>     <property name="Id" type="s" access="read"/>     <property name="Title" type="s" access="read"/>     <property name="Status" type="s" access="read"/>     <property name="WindowId" type="i" access="read"/>-    <property name="Menu" type="o" access="read" /> +    <!-- An additional path to add to the theme search path to find the icons specified above. -->+    <property name="IconThemePath" type="s" access="read"/>+    <property name="Menu" type="o" access="read"/>+    <property name="ItemIsMenu" type="b" access="read"/>++     <!-- main icon -->     <!-- names are preferred over pixmaps -->-    <property name="IconName" type="s" access="read" />-    <property name="IconThemePath" type="s" access="read" />+    <property name="IconName" type="s" access="read"/> -    <!-- struct containing width, height and image data-->-    <!-- implementation has been dropped as of now -->-    <property name="IconPixmap" type="a(iiay)" access="read" />+    <!--struct containing width, height and image data-->+    <property name="IconPixmap" type="a(iiay)" access="read">+      <annotation name="org.qtproject.QtDBus.QtTypeName" value="KDbusImageVector"/>+    </property> -    <!-- not used in ayatana code, no test case so far -->     <property name="OverlayIconName" type="s" access="read"/>-    <property name="OverlayIconPixmap" type="a(iiay)" access="read" /> +    <property name="OverlayIconPixmap" type="a(iiay)" access="read">+      <annotation name="org.qtproject.QtDBus.QtTypeName" value="KDbusImageVector"/>+    </property>++     <!-- Requesting attention icon -->     <property name="AttentionIconName" type="s" access="read"/>      <!--same definition as image-->-    <property name="AttentionIconPixmap" type="a(iiay)" access="read" />+    <property name="AttentionIconPixmap" type="a(iiay)" access="read">+      <annotation name="org.qtproject.QtDBus.QtTypeName" value="KDbusImageVector"/>+    </property> +    <property name="AttentionMovieName" type="s" access="read"/>+++     <!-- tooltip data -->+     <!--(iiay) is an image-->-    <property name="ToolTip" type="(sa(iiay)ss)" access="read" />+    <property name="ToolTip" type="(sa(iiay)ss)" access="read">+      <annotation name="org.qtproject.QtDBus.QtTypeName" value="KDbusToolTipStruct"/>+    </property> ++    <!-- interaction: the systemtray wants the application to do something -->+    <method name="ContextMenu">+      <!-- we're passing the coordinates of the icon, so the app knows where to put the popup window -->+      <arg name="x" type="i" direction="in"/>+      <arg name="y" type="i" direction="in"/>+    </method>+     <method name="Activate">       <arg name="x" type="i" direction="in"/>       <arg name="y" type="i" direction="in"/>     </method>+     <method name="SecondaryActivate">       <arg name="x" type="i" direction="in"/>       <arg name="y" type="i" direction="in"/>     </method>+     <method name="Scroll">       <arg name="delta" type="i" direction="in"/>-      <arg name="dir"   type="s" direction="in"/>+      <arg name="orientation" type="s" direction="in"/>     </method> -    <signal name="NewTitle"></signal>-    <signal name="NewIcon"></signal>-    <signal name="NewIconThemePath"></signal>-    <signal name="NewAttentionIcon"></signal>-    <signal name="NewOverlayIcon"></signal>-    <signal name="NewToolTip"></signal>-    <signal name="NewStatus"></signal>+    <!-- Signals: the client wants to change something in the status-->+    <signal name="NewTitle">+    </signal> +    <signal name="NewIcon">+    </signal>++    <signal name="NewAttentionIcon">+    </signal>++    <signal name="NewOverlayIcon">+    </signal>++    <signal name="NewToolTip">+    </signal>++    <signal name="NewStatus">+      <!-- TODO: handle arg properly -->+      <!-- <arg name="status" type="s"/> -->+    </signal>++    <!-- The following items are not supported by specs, but widely used -->+    <signal name="NewIconThemePath">+      <!-- TODO: handle arg properly -->+      <!-- <arg type="s" name="icon_theme_path" direction="out" /> -->+    </signal>++    <signal name="NewMenu">+    </signal>+     <!-- ayatana labels -->     <signal name="XAyatanaNewLabel">       <arg type="s" name="label" direction="out" />@@ -58,5 +113,6 @@     </signal>     <property name="XAyatanaLabel" type="s" access="read" />     <property name="XAyatanaLabelGuide" type="s" access="read" />+   </interface> </node>