From 0497dfb79211aa1e64304fa446d230c41ca73daa Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Fri, 1 Nov 2019 18:41:10 +0100 Subject: Cleanup and add documentation --- src/Gtk/Widgets/Sheet/Signal.icl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Gtk/Widgets/Sheet/Signal.icl') diff --git a/src/Gtk/Widgets/Sheet/Signal.icl b/src/Gtk/Widgets/Sheet/Signal.icl index 6de4209..d08f4dd 100644 --- a/src/Gtk/Widgets/Sheet/Signal.icl +++ b/src/Gtk/Widgets/Sheet/Signal.icl @@ -18,7 +18,7 @@ where TraverseHandler _ -> "traverse" signalHandler handler = case handler of DeactivateHandler f -> SHI_Int_Int_Bool f - EnterPressedHandler f -> SHI_Pointer_Bool \_ -> not <$> f + EnterPressedHandler f -> SHI_Pointer_Bool \_ -> (\p -> p=:StopPropagation) <$> f SheetActivateHandler f -> SHI_Int_Int_Bool \r c -> f r c >>| pure True TraverseHandler f -> SHI_Int_Int_Pointer_Pointer_Bool \oldrow oldcol newrowp newcolp -> let newrow = readInt4S newrowp 0; newcol = readInt4S newcolp 0 in @@ -35,3 +35,7 @@ where appWorld (forceEval (writeInt4 newrowp 0 row)) >>| appWorld (forceEval (writeInt4 newcolp 0 col)) >>| pure True) + +instance tune w GtkSheetSignalHandler | gtkWidget w +where + tune handler widget = installSignalHandler handler widget -- cgit v1.2.3