imp: ui: mouse-clicking below the list no longer navigates back
I and mail list think it's too obtrusive, eg sometimes it navigates when you just want to focus the window.
This commit is contained in:
parent
975522e759
commit
6737bb3d38
@ -267,9 +267,6 @@ asHandle ev = do
|
|||||||
VtyEvent e | e `elem` moveLeftEvents -> put' $ popScreen ui
|
VtyEvent e | e `elem` moveLeftEvents -> put' $ popScreen ui
|
||||||
-- or on a click in the app's left margin. This is a VtyEvent since not in a clickable widget.
|
-- or on a click in the app's left margin. This is a VtyEvent since not in a clickable widget.
|
||||||
VtyEvent (EvMouseUp x _y (Just BLeft)) | x==0 -> put' $ popScreen ui
|
VtyEvent (EvMouseUp x _y (Just BLeft)) | x==0 -> put' $ popScreen ui
|
||||||
-- or on clicking a blank list item.
|
|
||||||
MouseUp _ (Just BLeft) Location{loc=(_,y)} | clickedacct == "" -> put' $ popScreen ui
|
|
||||||
where clickedacct = maybe "" asItemAccountName $ listElements (_assList sst) !? y
|
|
||||||
|
|
||||||
-- RIGHT enters register screen for selected account (if there is one),
|
-- RIGHT enters register screen for selected account (if there is one),
|
||||||
-- centering its selected transaction if possible
|
-- centering its selected transaction if possible
|
||||||
|
|||||||
@ -267,9 +267,6 @@ bsHandle ev = do
|
|||||||
VtyEvent e | e `elem` moveLeftEvents -> put' $ popScreen ui
|
VtyEvent e | e `elem` moveLeftEvents -> put' $ popScreen ui
|
||||||
-- or on a click in the app's left margin. This is a VtyEvent since not in a clickable widget.
|
-- or on a click in the app's left margin. This is a VtyEvent since not in a clickable widget.
|
||||||
VtyEvent (EvMouseUp x _y (Just BLeft)) | x==0 -> put' $ popScreen ui
|
VtyEvent (EvMouseUp x _y (Just BLeft)) | x==0 -> put' $ popScreen ui
|
||||||
-- or on clicking a blank list item.
|
|
||||||
MouseUp _ (Just BLeft) Location{loc=(_,y)} | clickedacct == "" -> put' $ popScreen ui
|
|
||||||
where clickedacct = maybe "" asItemAccountName $ listElements (_bssList sst) !? y
|
|
||||||
|
|
||||||
-- enter register screen for selected account (if there is one),
|
-- enter register screen for selected account (if there is one),
|
||||||
-- centering its selected transaction if possible
|
-- centering its selected transaction if possible
|
||||||
|
|||||||
@ -276,9 +276,6 @@ rsHandle ev = do
|
|||||||
VtyEvent e | e `elem` moveLeftEvents -> put' $ popScreen ui
|
VtyEvent e | e `elem` moveLeftEvents -> put' $ popScreen ui
|
||||||
-- or on a click in the app's left margin. This is a VtyEvent since not in a clickable widget.
|
-- or on a click in the app's left margin. This is a VtyEvent since not in a clickable widget.
|
||||||
VtyEvent (EvMouseUp x _y (Just BLeft)) | x==0 -> put' $ popScreen ui
|
VtyEvent (EvMouseUp x _y (Just BLeft)) | x==0 -> put' $ popScreen ui
|
||||||
-- or on clicking a blank list item.
|
|
||||||
MouseUp _ (Just BLeft) Location{loc=(_,y)} | clickeddate == "" -> put' $ popScreen ui
|
|
||||||
where clickeddate = maybe "" rsItemDate $ listElements _rssList !? y
|
|
||||||
|
|
||||||
-- enter transaction screen on RIGHT
|
-- enter transaction screen on RIGHT
|
||||||
VtyEvent e | e `elem` moveRightEvents ->
|
VtyEvent e | e `elem` moveRightEvents ->
|
||||||
|
|||||||
@ -170,9 +170,6 @@ tsHandle ev = do
|
|||||||
VtyEvent e | e `elem` moveLeftEvents -> put' . popScreen $ tsSelect i t ui -- Probably not necessary to tsSelect here, but it's safe.
|
VtyEvent e | e `elem` moveLeftEvents -> put' . popScreen $ tsSelect i t ui -- Probably not necessary to tsSelect here, but it's safe.
|
||||||
-- or on a click in the app's left margin.
|
-- or on a click in the app's left margin.
|
||||||
VtyEvent (EvMouseUp x _y (Just BLeft)) | x==0 -> put' . popScreen $ tsSelect i t ui
|
VtyEvent (EvMouseUp x _y (Just BLeft)) | x==0 -> put' . popScreen $ tsSelect i t ui
|
||||||
-- or on clicking the blank area below the transaction.
|
|
||||||
MouseUp _ (Just BLeft) Location{loc=(_,y)} | y+1 > numentrylines -> put' . popScreen $ tsSelect i t ui
|
|
||||||
where numentrylines = length (T.lines $ showTxn ropts rspec j t) - 1
|
|
||||||
|
|
||||||
VtyEvent (EvKey (KChar 'l') [MCtrl]) -> redraw
|
VtyEvent (EvKey (KChar 'l') [MCtrl]) -> redraw
|
||||||
VtyEvent (EvKey (KChar 'z') [MCtrl]) -> suspend ui
|
VtyEvent (EvKey (KChar 'z') [MCtrl]) -> suspend ui
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user