packages feed

leksah 0.6.0 → 0.6.1

raw patch · 3 files changed

+50/−14 lines, 3 filesdep ~base

Dependency ranges changed: base

Files

leksah.cabal view
@@ -1,5 +1,5 @@ name: leksah-version: 0.6.0+version: 0.6.1 cabal-version: >=1.4 build-type: Simple license: GPL@@ -40,7 +40,7 @@         build-depends: unix >=2.3.1.0     if os(osx)         extra-libraries: igemacintegration-    build-depends: Cabal >=1.6.0.1, base >=4.0.0.0 && <= 5.0, binary >=0.4.4,+    build-depends: Cabal >=1.6.0.1, base >=4.0.0.0 && <= 5, binary >=0.4.4,                    bytestring >=0.9.0.1, containers >=0.2.0.0, directory >=1.0.0.2,                    filepath >=1.1.0.1, ghc >=6.10.1, glib >=0.10, gtk >=0.10,                    gtksourceview2 >=0.10.0, mtl >=1.1.0.2, old-time >=1.0.0.1,
src/IDE/Group/Debugger.hs view
@@ -1,3 +1,4 @@+{-# OPTIONS_GHC -XScopedTypeVariables #-} ----------------------------------------------------------------------------- -- -- Module      :  IDE.Group.Debugger@@ -13,30 +14,59 @@ -----------------------------------------------------------------------------  module IDE.Group.Debugger (-showDebugger+    showDebugger,+    setSensitivityDebugger ) where  import IDE.Core.State-    (getNotebook, viewSplit', newGroupOrBringToFront, IDEAction(..))+    (getPane,+     getBestPanePath,+     frameState,+     readIDE,+     getNotebook,+     viewSplit',+     newGroupOrBringToFront,+     IDEAction(..)) import Graphics.UI.Frame.Panes-    (PaneDirection(..),+    (getTopWidget,+     layout,+     PaneDirection(..),      PanePathElement(..),      panePathForGroup) import IDE.Pane.SourceBuffer     (newTextBuffer, bufferName, allBuffers) import Graphics.UI.Editor.Parameters (Direction(..)) import Control.Monad.Trans (liftIO)-import Graphics.UI.Gtk (notebookSetShowTabs, notebookSetTabPos)+import Graphics.UI.Gtk+    (widgetSetSensitive, notebookSetShowTabs, notebookSetTabPos) import Graphics.UI.Gtk.General.Enums (PositionType(..))-import IDE.Pane.Variables (showVariables')-import IDE.Pane.Breakpoints (showBreakpointList')-import IDE.Pane.Trace(showTrace')-import Control.Monad (when)+import IDE.Pane.Variables (IDEVariables, showVariables')+import IDE.Pane.Breakpoints+    (IDEBreakpoints, showBreakpointList')+import IDE.Pane.Trace (IDETrace,showTrace')+import Control.Monad (liftM, when) +setSensitivityDebugger :: Bool -> IDEAction+setSensitivityDebugger sens = do+    mbBreakpoints :: Maybe IDEBreakpoints <- getPane+    mbVariables   :: Maybe IDEVariables   <- getPane+    mbTrace       :: Maybe IDETrace       <- getPane+    liftIO $ do+        case mbBreakpoints of+            Nothing -> return ()+            Just idePane -> widgetSetSensitive (getTopWidget idePane) sens+        case mbVariables of+            Nothing -> return ()+            Just idePane -> widgetSetSensitive (getTopWidget idePane) sens+        case mbTrace of+            Nothing -> return ()+            Just idePane -> widgetSetSensitive (getTopWidget idePane) sens+ showDebugger :: IDEAction showDebugger = do     pp   <- panePathForGroup "*Debug"     ret  <- newGroupOrBringToFront "Debug" pp+    layout' <- liftM layout (readIDE frameState)     bufs <- allBuffers     case ret of         (Just rpp, True) -> do@@ -60,9 +90,9 @@                 newTextBuffer upperP "_Eval.hs" Nothing >> return ()             return ()         (Just rpp, False) -> do-            let lowerP =  rpp ++ [SplitP BottomP]-            let middleP =  rpp ++ [SplitP TopP,SplitP BottomP]-            let upperP =  rpp ++ [SplitP TopP,SplitP TopP]+            let lowerP  =  getBestPanePath (rpp ++ [SplitP BottomP]) layout'+            let middleP =  getBestPanePath (rpp ++ [SplitP TopP,SplitP BottomP]) layout'+            let upperP  =  getBestPanePath (rpp ++ [SplitP TopP,SplitP TopP]) layout'             showBreakpointList' middleP             showVariables' middleP             showTrace' lowerP
src/IDE/Menu.hs view
@@ -80,7 +80,7 @@ import Debug.Trace (trace) import IDE.Pane.Variables (showVariables, fillVariablesList) import IDE.Pane.Trace (showTrace,fillTraceList)-import IDE.Group.Debugger(showDebugger)+import IDE.Group.Debugger (setSensitivityDebugger, showDebugger) -- -- | The Actions known to the system (they can be activated by keystrokes or menus) --@@ -631,6 +631,8 @@     where   setSensitivitySingle (sens,bool) = do                 actions <- getActionsFor sens                 liftIO $ mapM_ (\a -> actionSetSensitive a bool) actions+                let additionalActions = getAdditionalActionsFor sens+                mapM_ (\a -> a bool) additionalActions  getActionsFor :: SensitivityMask -> IDEM [Action] getActionsFor SensitivityForwardHist = getActionsFor' ["ViewHistoryForth"]@@ -661,6 +663,10 @@             res <- liftIO $ actionGroupGetAction (head actionGroups) string             when (isNothing res) $ ideMessage Normal $ "Can't find UI Action " ++ string             return res++getAdditionalActionsFor :: SensitivityMask -> [Bool -> IDEAction]+getAdditionalActionsFor SensitivityInterpreting = [setSensitivityDebugger]+getAdditionalActionsFor _ = []  viewDetachInstrumented :: IDEAction viewDetachInstrumented = do