Commit a24c119d authored by John van Groningen's avatar John van Groningen
Browse files

call defaultPrintSetup the first time the printer is used, and not when the IDE

starts
parent 960b2eb0
......@@ -110,10 +110,10 @@ setCompilerProcessIds :: !CompilerProcessIds !*(PSt *General) -> *(PSt *General)
//---
iniGeneral :: Prefs .Pathname
iniGeneral :: !Prefs !.Pathname
Bool *File
Id Id .(ExtListBoxId *(PSt *General)) EditorState .FindInfo
.(FindBoxInfo *(PSt *General)) Id Id TypeWinInfo ConsWinInfo .[.Target] Id Id (R2Id PLMMessage PLMReply) !*World//*env
!Id !Id !.(ExtListBoxId *(PSt *General)) !EditorState !.FindInfo
!.(FindBoxInfo *(PSt *General)) !Id !Id !TypeWinInfo !ConsWinInfo !.[.Target] !Id !Id !(R2Id PLMMessage PLMReply) !*World//*env
-> *(!ClipInfo,!*General,!*World)
//---
......
......@@ -6,6 +6,7 @@ import PmPath, PmProject, PmPrefs, PmFileInfo
import clipboard, typewin, fbi, PmAbcMagic, errwin
import flextextcontrol, ioutil, UtilStrictLists
from PmCleanSystem import ::CompilerProcessIds,NoCompilerProcessIds
from StdPStClass import instance FileEnv (PSt .l)
:: InfoDialogInfo =
{pr_info :: !Id // id for info dialog
......@@ -46,7 +47,7 @@ from PmCleanSystem import ::CompilerProcessIds,NoCompilerProcessIds
,abc_cache :: !*(Maybe ABCCache)
,fi_cache :: !(Maybe FileInfoCache)
,print_setup :: !PrintSetup
,print_setup :: !MaybePrintSetup
,project :: !Project
,g_compiler_process_ids :: !CompilerProcessIds
......@@ -58,6 +59,8 @@ from PmCleanSystem import ::CompilerProcessIds,NoCompilerProcessIds
, fstate :: ![(!Bool,!String)]
}
:: MaybePrintSetup = NoPrintSetup | PrintSetup !PrintSetup;
getFstate :: !*(PSt *General) -> ([(!Bool,!String)],*(PSt *General))
getFstate ps = accPLoc (\l=:{fstate}->(fstate,l)) ps
......@@ -166,10 +169,10 @@ setCompilerProcessIds compiler_project_ids ps = appPLoc (\l -> {l & g_compiler_p
//---
iniGeneral :: Prefs .Pathname
iniGeneral :: !Prefs !.Pathname
Bool *File
Id Id .(ExtListBoxId *(PSt *General)) EditorState .FindInfo
.(FindBoxInfo *(PSt *General)) Id Id TypeWinInfo ConsWinInfo .[.Target] Id Id (R2Id PLMMessage PLMReply) !*World//*env
!Id !Id !.(ExtListBoxId *(PSt *General)) !EditorState !.FindInfo
!.(FindBoxInfo *(PSt *General)) !Id !Id !TypeWinInfo !ConsWinInfo !.[.Target] !Id !Id !(R2Id PLMMessage PLMReply) !*World//*env
-> *(!ClipInfo,!*General,!*World)
iniGeneral
prefs stup interact logfile mTargetId eTargetId lbId initEditorState emptyFindInfo ffind
......@@ -204,7 +207,6 @@ iniGeneral
(mdCstId,env) = openId env
(edmrecid,env) = openR2Id env
# (errinfo,env) = err_init prefs.err_prefs env
(default_setup,env) = defaultPrintSetup env
# (srchIds,env) = openIds 3 env
# (findIds,env) = openIds 4 env
# (gotoIds,env) = openIds 3 env
......@@ -277,7 +279,7 @@ iniGeneral
, callback = (\_ ps -> ps)
, abc_cache = Just AC_Init
, fi_cache = Just FI_EmptyCache
, print_setup = default_setup
, print_setup = NoPrintSetup
, project = PR_InitProject
, g_compiler_process_ids=NoCompilerProcessIds
, prefix = ["//\t"]
......@@ -489,10 +491,14 @@ where
//--
getPrintSetup :: !*(PSt *General) -> (!PrintSetup,!*PSt *General)
getPrintSetup ps = accPLoc (\p=:{print_setup}->(print_setup,p)) ps
getPrintSetup ps=:{ls={print_setup=PrintSetup print_setup}}
= (print_setup,ps);
getPrintSetup ps=:{ls={print_setup=NoPrintSetup}}
# (default_setup,ps) = defaultPrintSetup ps
= (default_setup,{ps & ls.print_setup = PrintSetup default_setup});
setPrintSetup :: !PrintSetup !*(PSt *General) -> *PSt *General
setPrintSetup s ps = appPLoc (\p->{p & print_setup = s}) ps
setPrintSetup s ps = {ps & ls.print_setup = PrintSetup s};
getPrefix :: !*(PSt *General) -> (![String],!*PSt *General)
getPrefix ps = accPLoc (\p=:{prefix}->(prefix,p)) 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