Changeset 46 for trunk/gui/printer


Ignore:
Timestamp:
Sep 18, 2013, 1:10:45 AM (12 years ago)
Author:
Alex Taylor
Message:

Minor improvement to allow deleting a broken printer object.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/printer/manager/PRINTOOL.VRX

    r44 r46  
    119119        IF cups_pdr == '' THEN DO
    120120            cups_pdr = STREAM( globals.!bootdrv'\OS2\DLL\CUPS.PDR', 'C', 'QUERY EXISTS')
    121             IF cups_pdr <> '' THEN CALL VRSetIni('PM_PORT_DRIVER', 'CUPS', cups_pdr, 'System')
     121            IF cups_pdr <> '' THEN CALL VRSetIni 'PM_PORT_DRIVER', 'CUPS', cups_pdr, 'System'
    122122        END
    123123        IF cups_pdr <> '' THEN
     
    158158/*:VRX         CN_DEVICES_KeyPress
    159159*/
    160 CN_DEVICES_KeyPress: 
     160CN_DEVICES_KeyPress:
    161161    IF VRGet('CN_DEVICES', 'KeyString') == '{Backtab}' THEN
    162162        CALL VRMethod 'TDL_MAIN', 'SetFocus'
     
    180180/*:VRX         CN_PORTS_KeyPress
    181181*/
    182 CN_PORTS_KeyPress: 
     182CN_PORTS_KeyPress:
    183183    IF VRGet('CN_PORTS', 'KeyString') == '{Backtab}' THEN
    184184        CALL VRMethod 'TDL_MAIN', 'SetFocus'
     
    226226/*:VRX         CN_PRINTERS_KeyPress
    227227*/
    228 CN_PRINTERS_KeyPress: 
     228CN_PRINTERS_KeyPress:
    229229    IF VRGet('CN_PRINTERS', 'KeyString') == '{Backtab}' THEN
    230230        CALL VRMethod 'TDL_MAIN', 'SetFocus'
     
    13651365/*:VRX         PB_DEVICE_REMOVE_KeyPress
    13661366*/
    1367 PB_DEVICE_REMOVE_KeyPress: 
     1367PB_DEVICE_REMOVE_KeyPress:
    13681368    IF VRGet('PB_DEVICE_REMOVE', 'KeyString') == '{Tab}' THEN
    13691369        CALL VRMethod 'TDL_MAIN', 'SetFocus'
     
    14791479/*:VRX         PB_PORT_EDIT_Click
    14801480*/
    1481 PB_PORT_EDIT_Click: 
     1481PB_PORT_EDIT_Click:
    14821482    CALL PortProperties
    14831483return
     
    14851485/*:VRX         PB_PORT_EDIT_KeyPress
    14861486*/
    1487 PB_PORT_EDIT_KeyPress: 
     1487PB_PORT_EDIT_KeyPress:
    14881488    IF VRGet('PB_PORT_EDIT', 'KeyString') == '{Tab}' THEN
    14891489        CALL VRMethod 'TDL_MAIN', 'SetFocus'
     
    16411641/*:VRX         PB_PRINTER_EDIT_Click
    16421642*/
    1643 PB_PRINTER_EDIT_Click: 
     1643PB_PRINTER_EDIT_Click:
    16441644    CALL PrinterProperties
    16451645RETURN
     
    16471647/*:VRX         PB_PRINTER_EDIT_KeyPress
    16481648*/
    1649 PB_PRINTER_EDIT_KeyPress: 
     1649PB_PRINTER_EDIT_KeyPress:
    16501650    IF VRGet('PB_PRINTER_EDIT', 'KeyString') == '{Tab}' THEN
    16511651        CALL VRMethod 'TDL_MAIN', 'SetFocus'
     
    17731773    success = 0
    17741774    _title = VRMethod('CN_PRINTERS', 'GetFieldData', record, globals.!hcfPrinters.!title )
     1775    _device= VRMethod('CN_PRINTERS', 'GetFieldData', record, globals.!hcfPrinters.!name )
    17751776    _queue = VRMethod('CN_PRINTERS', 'GetFieldData', record, globals.!hcfPrinters.!queue )
    17761777    _port  = VRMethod('CN_PRINTERS', 'GetFieldData', record, globals.!hcfPrinters.!port )
     
    17811782    _confirm = VRMessage('WN_MAIN', NLSGetMessage( 201, _title ), NLSGetMessage( 200 ), 'Q', '_btns.', 2, 2 )
    17821783    IF _confirm == 1 THEN DO
    1783         success = RPUPrinterDelete( _queue )
     1784        IF _queue == '' THEN
     1785            success = RPUDeviceDelete( _device )
     1786        ELSE
     1787            success = RPUPrinterDelete( _queue )
    17841788        CALL RPUPortInfo _port, 'port.'
    17851789        IF port.!driver == 'CUPS' THEN DO
Note: See TracChangeset for help on using the changeset viewer.