[Fencommits] fenfire-hs: fix: Shift-P in the text view now enters a P rather than adding the focused node as a property

Benja Fallenstein benja.fallenstein at gmail.com
Mon Feb 19 16:59:32 EET 2007


Mon Feb 19 16:58:48 EET 2007  Benja Fallenstein <benja.fallenstein at gmail.com>
  * fix: Shift-P in the text view now enters a P rather than adding the focused node as a property
diff -rN -u old-fenfire-hs/Fenfire.fhs new-fenfire-hs/Fenfire.fhs
--- old-fenfire-hs/Fenfire.fhs	2007-02-19 16:59:32.000000000 +0200
+++ new-fenfire-hs/Fenfire.fhs	2007-02-19 16:59:32.000000000 +0200
@@ -788,9 +788,9 @@
     makeBindings actionGroup fake
 
     actions <- actionGroupListActions actionGroup
-    bindingActions <- actionGroupListActions bindingGroup
+    bindingActions0 <- actionGroupListActions bindingGroup
 
-    forM_ (actions ++ bindingActions) $ \action -> do
+    forM_ (actions ++ bindingActions0) $ \action -> do
         name <- actionGetName action
         onActionActivate action $ canvasAction name >> return ()
         
@@ -805,19 +805,22 @@
                 updateCanvas True
         return action
         
-    flip mapM (tail viewActs) $ \x -> radioActionSetGroup x (head viewActs)
+    forM_ (tail viewActs) $ \x -> radioActionSetGroup x (head viewActs)
     toggleActionSetActive (toToggleAction $ head viewActs) True
 
-    addProp <- actionNew "addprop" (Just "Make _focused node a property")
-                         Nothing (Just stockAdd)
-    actionGroupAddActionWithAccel actionGroup addProp (Just "<Shift>P")
-    actionSetAccelGroup addProp bindings
-    onActionActivate addProp $ do
-        modifyIORef stateRef $ \s -> 
-            let Rotation n _ = fsRotation s
-             in s { fsProperty = n, fsPropertyList = fsPropertyList s ++ [n] }
-        updatePropMenu propmenu actionGroup stateRef updateCanvas
-        updateCanvas False
+    forM_ [(bindingGroup, bindings), (actionGroup, fake)] $ \(grp, bds) -> do
+        addProp <- actionNew "addprop" (Just "Make _focused node a property")
+                             Nothing (Just stockAdd)
+        actionGroupAddActionWithAccel grp addProp (Just "<Shift>P")
+        actionSetAccelGroup addProp bds
+        onActionActivate addProp $ do
+            modifyIORef stateRef $ \s -> 
+                let Rotation n _ = fsRotation s
+                 in s { fsProperty=n, fsPropertyList=fsPropertyList s ++ [n] }
+            updatePropMenu propmenu actionGroup stateRef updateCanvas
+            updateCanvas False
+
+    bindingActions <- actionGroupListActions bindingGroup
 
     -- user interface widgets:
 




More information about the Fencommits mailing list