GTK: fix row activation callback

This commit is contained in:
Julian Ospald 2015-12-27 19:27:13 +01:00
parent 54af33f3a7
commit 7986ce0d4e
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020

View File

@ -83,6 +83,11 @@ import System.Glib.UTFString
-- * 'settings mygui' modifies
setCallbacks :: MyGUI -> MyView -> IO ()
setCallbacks mygui myview = do
-- GUI events
_ <- urlBar mygui `on` entryActivated $ urlGoTo mygui myview
_ <- treeView mygui `on` rowActivated $ (\_ _ -> withRows mygui myview open)
-- key events
_ <- rootWin mygui `on` keyPressEvent $ tryEvent $ do
[Control] <- eventModifier
"q" <- fmap glibToString eventKeyName
@ -105,7 +110,6 @@ setCallbacks mygui myview = do
[] <- eventModifier
"Return" <- fmap glibToString eventKeyName
liftIO $ withRows mygui myview open
_ <- urlBar mygui `on` entryActivated $ urlGoTo mygui myview
_ <- treeView mygui `on` keyPressEvent $ tryEvent $ do
[Control] <- eventModifier
"c" <- fmap glibToString eventKeyName