/** Package for the Scol settings This is a part of the 'Scol voyager' ================================= License : This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, or go to http://www.gnu.org/copyleft/lesser.txt Author : Bastien Bourineau Update : - November 29, 2012 - Stephane Bisaro - Add the help button - Add the libraries check'up in support options - Fix the console setting in the support options */ // SUPPORT Setup interface structure struct SUPPORTSETUPstr = [ SUPPORTSETUP_WIN : ObjWin, SUPPORTSETUP_INFO : ObjText, SUPPORTSETUP_LABEL : ObjText, SUPPORTSETUP_CACHEBTN : ObjButton, SUPPORTSETUP_LOGBTN : ObjButton, SUPPORTSETUP_DEBUGLABEL : ObjText, SUPPORTSETUP_LOGCOMBO : ObjBox, SUPPORTSETUP_CONCHK : ObjCheck, SUPPORTSETUP_DEVCHK : ObjCheck, SUPPORTSETUP_STATCHK : ObjCheck, SUPPORTSETUP_UPDCHK : ObjCheck, SUPPORTSETUP_LIBCHECK : ObjCheck ] mkSUPPORTSETUPstr;; typeof SETUP_SUPPORT = SUPPORTSETUPstr;; /* ********************************************************************************************* / Setup Support Interface / ********************************************************************************************* */ fun cbSetupClearCacheBtn(btn, p)= _cacheClear; _DLGMessageBox _channel SETUP_SUPPORT.SUPPORTSETUP_WIN loc "ALERT" loc "CONFSUPCACHEDLG" 0; 0;; fun cbSetupClearLogsBtn(btn, p)= _logClear; _DLGMessageBox _channel SETUP_SUPPORT.SUPPORTSETUP_WIN loc "ALERT" loc "CONFSUPLOGSDLG" 0; 0;; fun cbSetupSupLog(box, p, pos, name)= let if pos == 0 then "no" else "yes" -> mode in let strbuild ("log"::mode::nil)::nil -> logmode in chgusm "log" nil substr logmode 0 (strlen logmode)-1; let if pos == 0 then itoh 0 else if pos == 1 then itoh 1 else if pos == 2 then itoh 2 else if pos == 3 then itoh 4 else if pos == 4 then itoh 8 else if pos == 5 then itoh 16 else itoh (1|2|4|8|16) -> mode in let strbuild ("echo"::mode::nil)::nil -> echomode in chgusm "echo" nil substr echomode 0 (strlen echomode)-1; 0;; fun cbSetupSupCon(chk, p, state)= let if state == 1 then "yes" else "no" -> mode in let strbuild ("logwin"::mode::nil)::nil -> conmode in chgusm "logwin" nil substr conmode 0 (strlen conmode)-1; 0;; fun cbSetupSupLibChk (obj, p, state)= let if state == 1 then "1" else "0" -> mode in let strbuild ("checkLibrary" :: mode :: nil) :: nil -> libmode in chgusm "checkLibrary" nil substr libmode 0 (strlen libmode)-1; let strbuild ("checkLibraryNumber" :: "3" :: nil) :: nil -> libnummode in chgusm "checkLibraryNumber" nil substr libnummode 0 (strlen libnummode)-1; if state == 0 then let strbuild ("fullLoading" :: "1" :: nil) :: nil -> libmode in chgusm "fullLoading" nil substr libmode 0 (strlen libmode)-1 else nil; 0;; fun cbSetupSupDev(chk, p, state)= set voyagerDebugMode = state; chgress "voyagerDevMode" (itoa state); 0;; fun cbSetupSupStat(chk, p, state)= chgress "voyagerStatistics" (itoa state); 0;; fun cbSetupSupUpd(chk, p, state)= chgress "voyagerUpdate" (itoa state); 0;; fun cbSetupCrSupport(strSetup)= set SETUP_SUPPORT = mkSUPPORTSETUPstr [nil nil nil nil nil nil nil nil nil nil nil nil]; set SETUP_SUPPORT.SUPPORTSETUP_WIN = _CRwindow _channel strSetup.SETUP_WIN 210 10 iSetupChildW iSetupChildH WN_CHILDINSIDE|WN_NOCAPTION ""; set SETUP_SUPPORT.SUPPORTSETUP_INFO = _CRtext _channel SETUP_SUPPORT.SUPPORTSETUP_WIN 10 10 (iSetupChildW - 20) 50 ET_ALIGN_LEFT loc "CONFSUPMESS"; set SETUP_SUPPORT.SUPPORTSETUP_LABEL = _CRtext _channel SETUP_SUPPORT.SUPPORTSETUP_WIN 10 70 (iSetupChildW - 20) 20 ET_ALIGN_LEFT|ET_BORDER loc "CONFSUPLABEL"; set SETUP_SUPPORT.SUPPORTSETUP_DEBUGLABEL = _CRtext _channel SETUP_SUPPORT.SUPPORTSETUP_WIN 10 95 (iSetupChildW - 20) 20 ET_ALIGN_LEFT loc "CONFSUPLOGCHK"; set SETUP_SUPPORT.SUPPORTSETUP_LOGCOMBO = _CBcombo _CRcombo _channel SETUP_SUPPORT.SUPPORTSETUP_WIN 10 115 (iSetupChildW - 20 - iSetupChildW / 2) 200 CB_NOEDIT "" @cbSetupSupLog nil; set SETUP_SUPPORT.SUPPORTSETUP_CONCHK = _CBcheck _CRcheck _channel SETUP_SUPPORT.SUPPORTSETUP_WIN 10 145 (iSetupChildW - 20) 20 CH_TABFOCUS loc "CONFSUPCONCHK" @cbSetupSupCon nil; set SETUP_SUPPORT.SUPPORTSETUP_DEVCHK = _CBcheck _CRcheck _channel SETUP_SUPPORT.SUPPORTSETUP_WIN 10 175 (iSetupChildW - 20) 20 CH_TABFOCUS loc "CONFSUPDEVCHK" @cbSetupSupDev nil; set SETUP_SUPPORT.SUPPORTSETUP_STATCHK = _CBcheck _CRcheck _channel SETUP_SUPPORT.SUPPORTSETUP_WIN 10 205 (iSetupChildW - 20) 20 CH_TABFOCUS loc "CONFSUPSTATCHK" @cbSetupSupStat nil; set SETUP_SUPPORT.SUPPORTSETUP_UPDCHK = _CBcheck _CRcheck _channel SETUP_SUPPORT.SUPPORTSETUP_WIN 10 235 (iSetupChildW - 20) 20 CH_TABFOCUS loc "CONFSUPUPDCHK" @cbSetupSupUpd nil; set SETUP_SUPPORT.SUPPORTSETUP_LIBCHECK = _CBcheck _CRcheck _channel SETUP_SUPPORT.SUPPORTSETUP_WIN 10 265 (iSetupChildW - 20) 20 CH_TABFOCUS loc "CONFSUPLIBCHK" @cbSetupSupLibChk nil; set SETUP_SUPPORT.SUPPORTSETUP_CACHEBTN = _CBbutton _CRbutton _channel SETUP_SUPPORT.SUPPORTSETUP_WIN 40 295 90 20 nil loc "CONFSUPCACHEBTN" @cbSetupClearCacheBtn nil; set SETUP_SUPPORT.SUPPORTSETUP_LOGBTN = _CBbutton _CRbutton _channel SETUP_SUPPORT.SUPPORTSETUP_WIN (iSetupChildW - 130) 295 90 20 nil loc "CONFSUPLOGBTN" @cbSetupClearLogsBtn nil; _ADDcombo SETUP_SUPPORT.SUPPORTSETUP_LOGCOMBO 0 "None"; _ADDcombo SETUP_SUPPORT.SUPPORTSETUP_LOGCOMBO 1 "Foo"; _ADDcombo SETUP_SUPPORT.SUPPORTSETUP_LOGCOMBO 2 "Runtime"; _ADDcombo SETUP_SUPPORT.SUPPORTSETUP_LOGCOMBO 3 "Warning"; _ADDcombo SETUP_SUPPORT.SUPPORTSETUP_LOGCOMBO 4 "Trace"; _ADDcombo SETUP_SUPPORT.SUPPORTSETUP_LOGCOMBO 5 "Debug"; _ADDcombo SETUP_SUPPORT.SUPPORTSETUP_LOGCOMBO 6 "All"; let (getInfo (strextr _loadusmini nil) "log") -> logmode in let htoi (getInfo (strextr _loadusmini nil) "echo") -> echomode in let if echomode ==0 || (strcmpi logmode "yes") then 0 else if echomode ==1 then 1 else if echomode ==2 then 2 else if echomode ==4 then 3 else if echomode ==8 then 4 else if echomode ==16 then 5 else 6 -> mode in _SELcombo SETUP_SUPPORT.SUPPORTSETUP_LOGCOMBO mode; let getInfo (strextr _loadusmini nil) "logwin" -> conmode in let if !strcmpi conmode "yes" then 1 else 0 -> mode in _SETcheck SETUP_SUPPORT.SUPPORTSETUP_CONCHK mode; let getInfo (strextr _loadusmini nil) "checkLibrary" -> libmode in let if !strcmpi libmode "1" then 1 else 0 -> mode in _SETcheck SETUP_SUPPORT.SUPPORTSETUP_LIBCHECK mode; //$Arkeon disable the time iri make the changes in master.pkg _ENcheck SETUP_SUPPORT.SUPPORTSETUP_LIBCHECK 0; let atoi (_getress "voyagerDevMode") -> mode in _SETcheck SETUP_SUPPORT.SUPPORTSETUP_DEVCHK mode; let atoi (_getress "voyagerStatistics") -> mode in _SETcheck SETUP_SUPPORT.SUPPORTSETUP_STATCHK mode; let atoi (_getress "voyagerUpdate") -> mode in _SETcheck SETUP_SUPPORT.SUPPORTSETUP_UPDCHK mode; 0;; fun dsSetupSupport()= _DSwindow SETUP_SUPPORT.SUPPORTSETUP_WIN; set SETUP_SUPPORT = nil; 0;; fun loadSetupSupport(strSetup)= addSetupMenu loc "CONFSUP" (mkfun1 @cbSetupCrSupport strSetup) @dsSetupSupport; 0;;