diff --git a/HSFM-GUI-Gtk-Plugins.html b/HSFM-GUI-Gtk-Plugins.html index 32279d3..ddbb729 100644 --- a/HSFM-GUI-Gtk-Plugins.html +++ b/HSFM-GUI-Gtk-Plugins.html @@ -2,7 +2,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_HSFM-GUI-Gtk-Plugins.html");}; //]]>

hsfm-gtk

Safe HaskellNone
LanguageHaskell2010

HSFM.GUI.Gtk.Plugins

Synopsis

Documentation

insertPos :: Int Source #

Where to start inserting plugins.

myplugins :: [(IO MenuItem, [Item] -> MyGUI -> MyView -> IO Bool, [Item] -> MyGUI -> MyView -> IO ())] Source #

A list of plugins to add to the right-click menu at position - insertPos.

The left part of the triple is the menuitem. + insertPos.

The left part of the triple is a function that returns the menuitem. The middle part of the triple is a filter function that decides whether the item is shown. The right part of the triple is the callback, which is invoked diff --git a/Paths_hsfm.html b/Paths_hsfm.html index 9edbce3..0bd468a 100644 --- a/Paths_hsfm.html +++ b/Paths_hsfm.html @@ -1,4 +1,4 @@ Paths_hsfm

\ No newline at end of file + \ No newline at end of file diff --git a/hsfm.haddock b/hsfm.haddock index a2c04a5..e63e061 100644 Binary files a/hsfm.haddock and b/hsfm.haddock differ diff --git a/src/HSFM-GUI-Gtk-Plugins.html b/src/HSFM-GUI-Gtk-Plugins.html index 4e32def..288d1f0 100644 --- a/src/HSFM-GUI-Gtk-Plugins.html +++ b/src/HSFM-GUI-Gtk-Plugins.html @@ -79,7 +79,7 @@ -- |A list of plugins to add to the right-click menu at position -- `insertPos`. -- --- The left part of the triple is the menuitem. +-- The left part of the triple is a function that returns the menuitem. -- The middle part of the triple is a filter function that -- decides whether the item is shown. -- The right part of the triple is the callback, which is invoked @@ -88,34 +88,35 @@ -- Plugins are added in order of this list. myplugins :: [(IO MenuItem ,[Item] -> MyGUI -> MyView -> IO Bool - ,[Item] -> MyGUI -> MyView -> IO ())] -myplugins = [(diffItem, diffFilter, diffCallback) - ] - + ,[Item] -> MyGUI -> MyView -> IO ()) + ] +myplugins = [(diffItem, diffFilter, diffCallback) + ] ----- The plugins ---- - + +---- The plugins ---- -diffItem :: IO MenuItem -diffItem = menuItemNewWithLabel "diff" - -diffFilter :: [Item] -> MyGUI -> MyView -> IO Bool -diffFilter items _ _ - | length items > 1 = return $ and $ fmap isFileC items - | otherwise = return False - -diffCallback :: [Item] -> MyGUI -> MyView -> IO () -diffCallback items _ _ = void $ - forkProcess $ - executeFile - (fromString "meld") - True - ([fromString "--diff"] ++ fmap (fromAbs . path) items) - Nothing - + +diffItem :: IO MenuItem +diffItem = menuItemNewWithLabel "diff" + +diffFilter :: [Item] -> MyGUI -> MyView -> IO Bool +diffFilter items _ _ + | length items > 1 = return $ and $ fmap isFileC items + | otherwise = return False + +diffCallback :: [Item] -> MyGUI -> MyView -> IO () +diffCallback items _ _ = void $ + forkProcess $ + executeFile + (fromString "meld") + True + ([fromString "--diff"] ++ fmap (fromAbs . path) items) + Nothing +