Changeset 361
- Timestamp:
- Jan 6, 2010, 3:01:57 PM (16 years ago)
- Location:
- branches/guitools-2.0
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/guitools-2.0/evfsgui/changes
r350 r361 3 3 - Debug on/off option is badly implemented (rework required) 4 4 - Create Icon. stem in order to ease maintainance of icons 5 6 Version 2.0.0 (Refresh) 7 - Changed: Rewrite routines to find .msg and .hlp files 8 - Fixed: Set size of throbber object according to screen dimensions 5 9 6 10 Version 2.0 GA -
branches/guitools-2.0/evfsgui/evfsgui.VRP
r350 r361 8 8 VRXWindow: __VREMainWindow,1,1072,1783,891,3951 9 9 VRXWindow: __VRESectionListWindow,1,602,11033,11033,3975 10 VRXWindow: __VREToolsWindow,1,1963,819,6992,166 110 VRXWindow: __VREToolsWindow,1,1963,819,6992,1665 11 11 VRXWindow: __VREWindListWindow,1,470,8528,2650,3150 12 12 UserFile: 1 -
branches/guitools-2.0/evfsgui/evfsgui.VRX
r350 r361 284 284 285 285 ok = VRSet("Main","Width", 8200) 286 ok = VRseT("Pict_Throbber","Width", VRMethod( "Screen", "PixelsToTwips", 32 )) 287 ok = VRseT("Pict_Throbber","Height", VRMethod( "Screen", "PixelsToTwips", 32 )) 286 288 287 289 /* Setup SmbTree View */ … … 386 388 END 387 389 else iterate 390 end 391 return 392 393 /*:VRX _PrinterInfo 394 */ 395 _PrinterInfo: 396 /* rh = currently selected record handle */ 397 capt = VRMethod("CN_SMBTREE", "GetRecordAttr", rh, "Caption") 398 parse var Capt p_printer '0D0A'x . 399 parRH = VRMethod("CN_SMBTREE", "GetRecordAttr", rh, "Parent") 400 capt = VRMethod("CN_SMBTREE", "GetRecordAttr", Parrh, "Caption") 401 parse var Capt p_prtsrv '0D0A'x . 402 p_prtsrv = strip(p_prtsrv) 403 GparRH = VRMethod("CN_SMBTREE", "GetRecordAttr", Parrh, "Parent") 404 capt = VRMethod("CN_SMBTREE", "GetRecordAttr", GParrh, "Caption") 405 parse var Capt p_workgroup '0D0A'x . 406 DescStr = translate(p_prtsrv'#'p_printer'#'p_workgroup'#') 407 say '"'DescStr'"' 408 LDescStr = length(DescStr) 409 ok = SysIni('SYSTEM','PM_SPOOLER_PORT',"All:",'ports') 410 411 FoundPort = 0 412 do I = 1 to ports.0 413 if left(ports.i,3) = 'SMB' then do 414 say ports.I 415 say translate(left(SysIni('SYSTEM','PM_'ports.I,'INITIALIZATION'),LDescStr)) 416 say DescStr 417 if translate(left(SysIni('SYSTEM','PM_'ports.I,'INITIALIZATION'),LDescStr)) = DescStr then do 418 OurPort = ports.I 419 FoundPort = 1 420 leave 421 end 422 end 423 end 424 425 if Foundport then do 426 ok = SysIni('SYSTEM','PM_SPOOLER_PRINTER',"All:",'printer') 427 428 do I = 1 to printer.0 429 say printer.I 430 prtsummary = SysINi('SYSTEM','PM_SPOOLER_PRINTER',printer.i) 431 parse var prtsummary port ';'PrinterDriver';'PrinterQueue';' . 432 if port = ourPort then do 433 PrinterName = SysINi('SYSTEM','PM_SPOOLER_PRINTER_DESCR',printer.i) 434 parse var Printername Printername ';' . 435 leave 436 end 437 438 end 439 440 CALL VRMessage 'Main', PrinterName' ('PrinterQueue') prints to port ' Port' connected to \\'p_workgroup'\'p_prtsrv'\'p_printer, NLVGetMessage( 1 ), 'I' 441 end 442 else do 443 CALL VRMessage 'Main', NLVGetMessage( 62 ), NLVGetMessage( 5 ), 'E' 388 444 end 389 445 return … … 863 919 ok = VRset("Menu_Selected_Default_Workgroup","Visible", (Icon = "#62:PMWP.DLL")) 864 920 865 if Icon = "#65:PMWP.DLL" then do /* Printers not supported at the moment */ 921 if Icon = "#65:PMWP.DLL" then do /* Printer installation not supported at the moment */ 922 /* call _Printerinfo */ 866 923 CALL VRMessage 'Main', NLVGetMessage( 62 ), NLVGetMessage( 5 ), 'E' 867 924 return -
branches/guitools-2.0/shared/nlv.vrs
r348 r361 12 12 execPath = VRGet("Application", "Program") 13 13 if execPath = "" then parse source . . execPath 14 execDir = VRParseFileName( execPath, "DP") 14 execDir = translate(VRParseFileName( execPath, "DP")) 15 parse var execDir srchroot '\BIN' 16 15 17 say ' NLV execDir = "'execDir'"' 18 say ' NLV srchroot = "'srchRoot'"' 16 19 17 20 filestem = VRParseFileName( execPath, "N")'_' … … 19 22 say ' NLV filestem = "'filestem'"' 20 23 21 /* First, figure out what language/message file to use. 22 */ 24 /* First, figure out what language/message file to use */ 23 25 Syslang = TRANSLATE( VALUE('LANG',,'OS2ENVIRONMENT')) 24 26 SELECT 25 WHEN Syslang == 'ZH_TW' THEN nlv = ' tw'26 WHEN Syslang == 'ZH_CN' THEN nlv = ' cx'27 WHEN Syslang == 'ZH_TW' THEN nlv = 'TW' 28 WHEN Syslang == 'ZH_CN' THEN nlv = 'CX' 27 29 OTHERWISE PARSE VAR Syslang nlv '_' . 28 30 END 29 31 30 /* Find the language file */ 31 select 32 when STREAM( execDir'\'filestem||nlv'.msg', 'C', 'QUERY EXISTS') \= '' then do 33 say " Found NLV file directly!" 34 settings.!messages = strip(execdir'\'filestem||nlv'.msg','L','\') 35 settings.!helpfile = strip(execdir'\'filestem||nlv'.hlp','L','\') 36 end 37 when SysSearchPath('DPATH', filestem||nlv'.msg') \= '' THEN DO 38 execDir = VRParseFileName(SysSearchPath('DPATH', filestem||nlv'.msg'),"DP") 39 say " Found NLV file via DPATH" 40 settings.!messages = strip(execdir'\'filestem||nlv'.msg','L','\') 41 settings.!helpfile = strip(execdir'\'filestem||nlv'.hlp','L','\') 42 end 43 otherwise do 44 /* Added by Herwig Bauernfeind */ 45 say " Searching subdirectories" 46 ok = SysFileTree(execDir'\'filestem||nlv'.msg',nlvmsg.,'FOS') 47 if nlvmsg.0 = 1 then do 48 say " Found NLV file in subdirectory" 49 settings.!messages = VRParseFilename(nlvmsg.1,"DPN")'.msg' 50 settings.!helpfile = VRParseFilename(nlvmsg.1,"DPN")'.hlp' 51 say " Adding NLV file path to DPATH" 52 OldDPATH = value("DPATH",,"OS2ENVIRONMENT") 53 ok = value("DPATH",VRParseFilename(nlvmsg.1,"DP")';'OldDPATH,"OS2ENVIRONMENT") 54 say " DPATH="value("DPATH",,"OS2ENVIRONMENT") 55 /* End addition by Herwig Bauernfeind */ 56 end 57 else do 58 say " Fallback to English" 59 if STREAM( execDir'\'filestem||'en.msg', 'C', 'QUERY EXISTS') = '' then do 60 say " Found English via DPATH" 61 execDir = VRParseFileName(SysSearchPath('DPATH', filestem||'en.msg'),"DP") 62 end 63 settings.!messages = strip(execDir'\'filestem||'en.msg','L','\') 64 settings.!helpfile = strip(execDir'\'filestem||'en.hlp','L','\') 65 end 66 end 67 end 32 /* Find the messagefile and helpfile */ 33 settings.!messages = NLVsearch(nlv,'LANG','MSG','DPATH') 34 settings.!helpfile = NLVsearch(nlv,'HELP','HLP','HELP') 68 35 69 /* In case the message file exists but not the help file */ 70 if STREAM( settings.!helpfile , 'C', 'QUERY EXISTS') = "" then do 71 settings.!helpfile = strip(execDir'\'filestem||'en.hlp','L','\') 72 end 73 74 IF options.!debug == 1 THEN SAY ' NLVMessageFile = "'settings.!messages'"' 75 IF options.!debug == 1 THEN SAY ' NLVHelpFile = "'settings.!helpfile'"' 36 IF options.!debug == 1 THEN SAY ' NLV MessageFile = "'settings.!messages'"' 37 IF options.!debug == 1 THEN SAY ' NLV HelpFile = "'settings.!helpfile'"' 76 38 77 39 IF options.!debug == 1 THEN SAY time()' NLVSetup() done' 78 40 RETURN 41 42 /*:VRX NLVSearch 43 */ 44 NLVSearch: procedure expose filestem execdir srchroot 45 nlv = arg(1) 46 SubDir = arg(2) 47 Suffix = arg(3) 48 PathVar = arg(4) 49 say time()" NLVSearch() started" 50 NLVSrchDone = 0 51 NLVFile = "" 52 do until NLVSrchDone = 1 53 say ' NLV 'Suffix' file = "'filestem||nlv'.'Suffix'"' 54 select 55 when VRFileExists(srchRoot'\'SubDir'\'filestem||nlv'.'Suffix) then do 56 say " NLV "Suffix" file found directly!" 57 NLVFile = strip(srchRoot'\'SubDir'\'filestem||nlv'.'Suffix,'L','\') 58 NLVSrchDone = 1 59 end 60 when SysSearchPath(PathVar, filestem||nlv'.'Suffix) \= '' then do 61 execDir = VRParseFileName(SysSearchPath(PathVar, filestem||nlv'.'Suffix),"DP") 62 say " NLV "Suffix" file found via "PathVar 63 NLVFile = strip(execdir'\'filestem||nlv'.'Suffix,'L','\') 64 NLVSrchDone = 1 65 end 66 otherwise do 67 say " Searching subdirectories" 68 ok = SysFileTree(srchRoot'\'filestem||nlv'.'Suffix,nlvmsg.,'FOS') 69 if nlvmsg.0 = 1 then do 70 say " Found NLV "Suffix" file in subdirectory" 71 settings.!messages = VRParseFilename(nlvmsg.1,"DPN")'.msg' 72 say " Adding NLV "Suffix" path to "PathVar 73 OldPathVar = value(PathVar,,"OS2ENVIRONMENT") 74 ok = value(PathVar,VRParseFilename(nlvmsg.1,"DP")';'OldPathVar,"OS2ENVIRONMENT") 75 NLVSrchDone = 1 76 end 77 else say " NLV "Suffix" file not found in subdirectories!" 78 end 79 end 80 if NLVSrchDone = 0 then do /* Fallback to English */ 81 if nlv = "EN" then NLVSrchDone = 1 /* We give up and leave */ 82 else do 83 say " NLV "Suffix" File not found, falling back to EN." 84 nlv = "EN" 85 end 86 end 87 end 88 say time()' NLVSearch() done, returning "'NLVFile'"' 89 return NLVFile 79 90 80 91 /*:VRX NLVGetMessage -
branches/guitools-2.0/shared/smbtree.vrs
r349 r361 253 253 if left(line,5) = "Error" then ok = VRMethod('CN_smbtree', 'SetRecordAttr', smbtree.!machine, 'UserData', "SERVER|"||strip(line)) 254 254 255 do while(left(line,1) = '09'x) 255 do while(left(line,1) = '09'x) /* Share loop */ 256 256 parse var line '09'x share type comment 257 257 type = translate(strip(type)) … … 275 275 /* get next share */ 276 276 line = linein(smbmachine.I) 277 end 277 end /* Share loop */ 278 278 279 279 do until left(line,10) = '09'x||'Workgroup'
Note:
See TracChangeset
for help on using the changeset viewer.