Changeset 58 for trunk/gui/printer/manager
- Timestamp:
- Jul 15, 2017, 1:19:09 PM (8 years ago)
- Location:
- trunk/gui/printer/manager
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/printer/manager/PRINTOOL.VRP
r57 r58 4 4 MacroPath: VRM:E:\DEVELOPMENT\VXREXX\Projects\PrintTool 5 5 EXEPath: E:\Development\VXREXX\Projects\PrintTool\PRINTMAN.EXE 6 RunParameters: 6 RunParameters: /D 7 7 RunDirectory: 8 VRXWindow: __VREMainWindow,1, 506,4095,6697,80469 VRXWindow: __VRESectionListWindow,1, 614,16044,4204,405910 VRXWindow: __VREToolsWindow,1, 638,14309,5469,166511 VRXWindow: __VREWindListWindow,1, 4854,16044,3505,40598 VRXWindow: __VREMainWindow,1,687,4192,6697,8046 9 VRXWindow: __VRESectionListWindow,1,795,16044,4204,4059 10 VRXWindow: __VREToolsWindow,1,819,14309,5469,1661 11 VRXWindow: __VREWindListWindow,1,5035,16044,3505,4059 12 12 UserFile: 1 13 13 UserWindow: WN_MAIN,1 -
trunk/gui/printer/manager/PRINTOOL.VRX
r57 r58 277 277 */ 278 278 DDCB_DEVICE_3RDPARTY_Click: PROCEDURE EXPOSE globals. shipped. 279 IF VRGet('DDCB_DEVICE_3RDPARTY', 'Enabled') == 0 THEN RETURN 280 279 281 new_path = TRANSLATE( STRIP( VRGet('DDCB_DEVICE_3RDPARTY', 'SelectedString'))) 280 282 IF new_path == '' THEN RETURN … … 289 291 */ 290 292 DDCB_DEVICE_3RDPARTY_Verify: PROCEDURE EXPOSE globals. shipped. 293 IF VRGet('DDCB_DEVICE_3RDPARTY', 'Enabled') == 0 THEN RETURN 294 291 295 old_path = VRGet('DDCB_DEVICE_3RDPARTY', 'UserData') 292 296 new_path = TRANSLATE( STRIP( VRGet('DDCB_DEVICE_3RDPARTY', 'Value'))) … … 363 367 IF _confirm == 1 THEN DO 364 368 success = DeletePrintDriver( _driver, _name ) 369 CALL LINEOUT globals.!log1, 'Deleting installed driver' device_name':' success 365 370 IF success == 1 THEN CALL RefreshDevices 371 366 372 /* TODO check if any other _driver definitions exist and if not, offer to delete _driver files & profile */ 367 373 END … … 382 388 IF globals.!prdrv == '' THEN RETURN 0 383 389 384 IF globals.!is_ecs == 1 THEN _osname = 'eComStation' 390 IF globals.!oem_os == 1 THEN _osname = 'eComStation' 391 ELSE IF globals.!oem_os == 2 THEN _osname = 'ArcaOS' 385 392 ELSE _osname = 'OS/2' 386 393 … … 499 506 shipped.0 = count 500 507 CALL VRSortStem 'shipped.' 508 509 CALL LINEOUT globals.!log1, 'Enumerated' count 'shipped printer devices.' 501 510 502 511 RETURN count … … 902 911 LoadSettings: PROCEDURE EXPOSE globals. 903 912 904 globals.!version = '0. 61'913 globals.!version = '0.7' 905 914 globals.!copyright = '2013-2017' 906 915 … … 960 969 /* Determine the OS. 961 970 */ 971 globals.!oem_os = 0 972 oem_osdir = VALUE('OSDIR',,'OS2ENVIRONMENT') 973 IF oem_osdir == '' THEN oem_osdir = globals.!os2dir 962 974 IF VRFileExists( globals.!os2dir'\INSTALL\SYSLEVEL.ECS') THEN 963 globals.!is_ecs = 1 964 ELSE 965 globals.!is_ecs = 0 975 globals.!oem_os = 1 976 IF VRFileExists( oem_osdir'\INSTALL\INSTALL.FLG') THEN DO 977 PARSE VALUE LINEIN( oem_osdir'\INSTALL\INSTALL.FLG') WITH p_os p_release p_nlv . 978 CALL STREAM oem_osdir'\INSTALL\INSTALL.FLG', 'C', 'CLOSE' 979 IF p_os == 'ArcaOS' THEN globals.!oem_os = 2 980 END 966 981 967 982 globals.!create_mode = '' … … 1801 1816 _confirm = VRMessage('WN_MAIN', NLSGetMessage( 202, _name ), NLSGetMessage( 200 ), 'Q', '_btns.', 2, 2 ) 1802 1817 IF _confirm == 1 THEN DO 1818 CALL LINEOUT globals.!log1, 'Deleting port' _name 1803 1819 success = RPUPortDelete( _name ) 1804 IF success == 1 THEN CALL RefreshPorts 1820 IF success <> 1 THEN CALL LINEOUT globals.!log1, 'Error deleting port:' RPUERROR 1821 CALL RefreshPorts 1805 1822 END 1806 1823 … … 1851 1868 _confirm = VRMessage('WN_MAIN', NLSGetMessage( 201, _title ), NLSGetMessage( 200 ), 'Q', '_btns.', 2, 2 ) 1852 1869 IF _confirm == 1 THEN DO 1853 IF _queue == '' THEN 1870 1871 IF _queue == '' THEN DO 1872 CALL LINEOUT globals.!log1, 'Printer' _device '(no queue) will be deleted.' 1854 1873 success = RPUDeviceDelete( _device ) 1855 ELSE 1874 END 1875 ELSE DO 1876 CALL LINEOUT globals.!log1, 'Printer' _device 'with queue' _queue 'will be deleted.' 1856 1877 success = RPUPrinterDelete( _queue ) 1878 END 1879 CALL LINEOUT globals.!log1, 'Deletion status:' success 1880 1857 1881 CALL RPUPortInfo _port, 'port.' 1858 1882 IF port.!driver == 'CUPS' THEN DO … … 1866 1890 PARSE VAR _cups_queue cups_queue '00'x . 1867 1891 IF ( TRANSLATE( cups_host ) == 'LOCALHOST') | cups_host = '127.0.0.1' THEN DO 1892 CALL LINEOUT globals.!log1, 'Printer points to local CUPS queue' cups_queue 'via port:' _port 1868 1893 _confirm = VRMessage('WN_MAIN', NLSGetMessage( 204, _title, cups_queue, _port ),, 1869 1894 NLSGetMessage( 200 ), 'Q', '_btns.', 2, 2 ) 1870 1895 IF _confirm == 1 THEN DO 1896 CALL LINEOUT globals.!log1, 'Deleting CUPS printer' cups_queue 'on host' cups_host'.' 1871 1897 success = CupsDeletePrinter( cups_host, cups_queue ) 1898 CALL LINEOUT globals.!log1, 'CUPS deletion status:' success 1872 1899 IF success == 0 THEN DO 1873 1900 CALL RPUPortDelete _port … … 2040 2067 2041 2068 ok = RPUEnumDrivers('drivers.') 2069 CALL LINEOUT globals.!log1, 'Enumerating drivers:' ok 2070 2071 CALL VRSet 'CN_DEVICES', 'Painting', 0 2072 CALL VRMethod 'CN_DEVICES', 'RemoveRecord', 'All' 2073 2042 2074 IF rc <> 0 THEN DO 2043 CALL VRSet 'CN_DEVICES', 'Painting', 0 2044 CALL VRMethod 'CN_DEVICES', 'RemoveRecord', 'All' 2075 CALL LINEOUT globals.!log1, drivers.0 'drivers found.' 2045 2076 DO i = 1 TO drivers.0 2046 2077 PARSE VAR drivers.i _pdrv'.'_model … … 2056 2087 DROP drivers. 2057 2088 DROP driverinfo. 2058 CALL VRSet 'CN_DEVICES', 'Painting', 12059 END2089 END 2090 CALL VRSet 'CN_DEVICES', 'Painting', 1 2060 2091 2061 2092 RETURN … … 2066 2097 2067 2098 ok = RPUEnumPorts('ports.') 2099 CALL LINEOUT globals.!log1, 'Enumerating ports:' ok 2100 2101 CALL VRSet 'CN_PORTS', 'Painting', 0 2102 CALL VRMethod 'CN_PORTS', 'RemoveRecord', 'All' 2103 2068 2104 IF rc <> 0 THEN DO 2069 CALL VRSet 'CN_PORTS', 'Painting', 0 2070 CALL VRMethod 'CN_PORTS', 'RemoveRecord', 'All' 2105 CALL LINEOUT globals.!log1, ports.0 'ports found.' 2071 2106 DO i = 1 TO ports.0 2072 2107 PARSE VAR ports.i _name _driver _path … … 2096 2131 DROP ports. 2097 2132 DROP portinfo. 2098 CALL VRSet 'CN_PORTS', 'Painting', 12099 END2133 END 2134 CALL VRSet 'CN_PORTS', 'Painting', 1 2100 2135 2101 2136 RETURN … … 2105 2140 RefreshPrinters: PROCEDURE EXPOSE globals. 2106 2141 ok = RPUEnumPrinters('printers.') 2142 CALL LINEOUT globals.!log1, 'Enumerating printers:' ok 2143 2144 CALL VRSet 'CN_PRINTERS', 'Painting', 0 2145 CALL VRMethod 'CN_PRINTERS', 'RemoveRecord', 'All' 2146 2107 2147 IF ok <> 0 THEN DO 2108 CALL VRSet 'CN_PRINTERS', 'Painting', 0 2109 CALL VRMethod 'CN_PRINTERS', 'RemoveRecord', 'All' 2148 CALL LINEOUT globals.!log1, printers.0 'printers found.' 2110 2149 2111 2150 DO i = 1 TO printers.0 … … 2145 2184 DROP details. 2146 2185 2147 CALL VRSet 'CN_PRINTERS', 'Painting', 12148 END2186 END 2187 CALL VRSet 'CN_PRINTERS', 'Painting', 1 2149 2188 2150 2189 RETURN … … 2159 2198 2160 2199 IF VRGet('RB_DEVICE_SHIPPED', 'Set') == 1 THEN DO 2200 CALL LINEOUT globals.!log1, 'Refreshing shipped driver list ('shipped.0' devices).' 2161 2201 CALL VRMethod 'CN_DEVICE_LIST', 'AddRecordList',,, 'shipped.' 2162 2202 END … … 2165 2205 driver_path = TRANSLATE( STRIP( VRGet('DDCB_DEVICE_3RDPARTY', 'Value'))) 2166 2206 IF driver_path <> '' THEN DO 2207 CALL LINEOUT globals.!log1, 'Refreshing third-party driver list for' driver_path'.' 2167 2208 drivers.0 = 0 2168 2209 _total = 0 … … 2209 2250 */ 2210 2251 execPath = VRGet('Application', 'Program') 2211 execDir = VRParseFileName( execPath, 'DP') 2252 IF execPath <> '' THEN 2253 execDir = VRParseFileName( execPath, 'DP') 2254 ELSE 2255 execDir = DIRECTORY() 2212 2256 2213 2257 /* … … 2320 2364 SW_ABOUT_Init: PROCEDURE EXPOSE globals. 2321 2365 2322 IF globals.! is_ecs == 1 THEN2366 IF globals.!oem_os == 1 THEN 2323 2367 _platform = 'eComStation' 2324 2368 ELSE … … 2383 2427 fld_driver = VRMethod('CN_DEVICE_LIST', 'AddField', 'String', NLSGetMessage( 266 ), 'DRIVER') 2384 2428 2385 IF globals.! is_ecs == 1 THEN2429 IF globals.!oem_os == 1 THEN 2386 2430 _platform = 'eComStation' 2431 ELSE IF globals.!oem_os == 2 THEN 2432 _platform = 'ArcaOS' 2387 2433 ELSE 2388 2434 _platform = 'OS/2' … … 2430 2476 2431 2477 IF GetShippedDrivers() > 0 THEN DO 2432 /* CALL VRMethod 'CN_DEVICE_LIST', 'AddRecordList',,, 'shipped.' */ 2478 /* 2479 CALL VRSet 'RB_DEVICE_SHIPPED', 'Set', 1 2480 */ 2481 CALL VRMethod 'CN_DEVICE_LIST', 'AddRecordList',,, 'shipped.' 2433 2482 END 2434 2483
Note:
See TracChangeset
for help on using the changeset viewer.