Commit e8c575d3 authored by John van Groningen's avatar John van Groningen

adjust window title if previous or next profile is shown

parent 02b92c13
......@@ -32,7 +32,7 @@ where
# hasPrev = fst (determine_previous_page application_name)
# hasNext = fst (determine_next_page application_name)
# hasPage = hasPrev || hasNext
# (_,ps) = openMenu Void (page_menu hasPage hasNext hasPrev recId pageId nextId prevId) ps
# (_,ps) = openMenu Void (page_menu hasPage hasNext hasPrev recId pageId winId nextId prevId) ps
# (_,ps) = openMenu Void (help_menu) ps
ps = if (info`.node_size_sum>=0) (appPIO (enableMenuElements [closeId,printId]) ps) ps
= installPlatformEventHandlers ps
......@@ -83,17 +83,17 @@ sort_menu recId =
]
) []
page_menu hasPage hasNext hasPrev recId pageId nextId prevId =
page_menu hasPage hasNext hasPrev recId pageId winId nextId prevId =
Menu "&Page"
( MenuItem "&Next page"
[ MenuShortKey 'N'
, MenuFunction (noLS (nextfun recId pageId nextId prevId))
, MenuFunction (noLS (nextfun recId pageId winId nextId prevId))
, MenuId nextId
, MenuSelectState (if hasNext Able Unable)
]
:+: MenuItem "&Previous page"
[ MenuShortKey 'B'
, MenuFunction (noLS (prevfun recId pageId nextId prevId))
, MenuFunction (noLS (prevfun recId pageId winId nextId prevId))
, MenuId prevId
, MenuSelectState (if hasPrev Able Unable)
]
......@@ -187,7 +187,7 @@ printfun recId ps
# (_,ps) = syncSend2 recId (FW_SetContent fw) ps
-> ps
nextfun recId pageId nextId prevId ps
nextfun recId pageId winId nextId prevId ps
# ((err,reply),ps) = syncSend2 recId FW_GetContent ps
| err <> SendOk = ps
| isNothing reply = ps
......@@ -200,9 +200,10 @@ nextfun recId pageId nextId prevId ps
# ((err,_),ps) = syncSend2 recId (FW_SetContent fw) ps
| err <> SendOk
-> ps
# ps = appPIO (setWindowTitle winId application_name) ps
-> enable_disable nextId prevId pageId application_name ps
prevfun recId pageId nextId prevId ps
prevfun recId pageId winId nextId prevId ps
# ((err,reply),ps) = syncSend2 recId FW_GetContent ps
| err <> SendOk = ps
| isNothing reply = ps
......@@ -214,6 +215,7 @@ prevfun recId pageId nextId prevId ps
# ((err,_),ps) = syncSend2 recId (FW_SetContent fw) ps
| err <> SendOk
-> ps
# ps = appPIO (setWindowTitle winId application_name) ps
-> enable_disable nextId prevId pageId application_name ps
enable_disable nextId prevId pageId application_name ps
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment