Index: /trunk/gui/printer/cupswiz/cupswiz.VRX =================================================================== --- /trunk/gui/printer/cupswiz/cupswiz.VRX (revision 44) +++ /trunk/gui/printer/cupswiz/cupswiz.VRX (revision 45) @@ -286,5 +286,5 @@ */ /* Creates an OS/2 printer port, queue, and desktop object which point to - * the just-created CUPS printer. Uses the RINSTPRN utility from IBM. + * the just-created CUPS printer. */ CreateOS2Printer: PROCEDURE EXPOSE globals. @@ -341,11 +341,11 @@ ok = CreatePrinterObject( prnt_drv, printer_model,, port_name, queue_name, printer_title ) - CALL LINEOUT globals.!log1, 'CreatePrinterObject(' prnt_drv',' printer_model, + CALL LINEOUT globals.!log1, 'CreatePrinterObject(' prnt_drv',' printer_model ||, ',' port_name',' queue_name',' printer_title ') RC =' ok - IF ok 0 THEN DO + IF ( ok 0 ) & ( printer_model 'Generic Postscript Printer') THEN DO CALL LINEOUT globals.!log1, 'Failed to create printer object; trying again with generic driver.' ok = CreatePrinterObject( prnt_drv, 'Generic Postscript Printer',, port_name, queue_name, printer_title ) - CALL LINEOUT globals.!log1, 'CreatePrinterObject(' prnt_drv', Generic Postscript Printer', + CALL LINEOUT globals.!log1, 'CreatePrinterObject(' prnt_drv', Generic Postscript Printer' ||, ',' port_name',' queue_name',' printer_title ') RC =' ok END @@ -412,19 +412,28 @@ END END - ELSE IF PrinterExistsInDRV( globals.!os2driver, globals.!prt_nick ) == 0 THEN DO - cups_ppd = globals.!prt_ppd - IF cups_ppd == '' THEN - cups_ppd = STREAM( globals.!cupsdir'\etc\cups\ppd\'globals.!prt_name'.ppd', 'C', 'QUERY EXISTS') - IF cups_ppd == '' THEN - CALL PromptForPMName - ELSE DO - ok = ImportPPD(globals.!os2driver, cups_ppd ) - IF ok 0 THEN DO - CALL LINEOUT globals.!log1, 'PPD import failed:' ok - CALL VRMessage VRWindow(), NLSGetMessage( 69 ), NLSGetMessage( 70 ), 'W' + ELSE DO + drv_model = PrinterExistsInDRV( globals.!os2driver, globals.!prt_nick ) + IF drv_model == '' THEN DO + cups_ppd = globals.!prt_ppd + IF cups_ppd == '' THEN + cups_ppd = STREAM( globals.!cupsdir'\etc\cups\ppd\'globals.!prt_name'.ppd', 'C', 'QUERY EXISTS') + IF cups_ppd == '' THEN DO + CALL LINEOUT globals.!log1, 'CUPS PPD for this printer ('globals.!cupsdir'\etc\cups\ppd\'globals.!prt_name'.ppd) does not exist.' + CALL LINEOUT globals.!log1, 'Cannot import PPD. Prompting user for preferred printer model.' CALL PromptForPMName - /* RETURN 1 RC=1 PPD import failed **/ + END + ELSE DO + ok = ImportPPD(globals.!os2driver, cups_ppd ) + IF ok 0 THEN DO + CALL LINEOUT globals.!log1, 'PPD import failed:' ok + CALL VRMessage VRWindow(), NLSGetMessage( 69 ), NLSGetMessage( 70 ), 'W' + CALL PromptForPMName + /* RETURN 1 RC=1 PPD import failed **/ + END END END + ELSE + /* Make sure the name matches, including case */ + globals.!prt_nick = drv_model END @@ -1121,5 +1130,5 @@ _force_remote = 0 globals.!prt_ppd = '' - IF InitArgs.0> 0 THEN + IF InitArgs.0> 0 THEN DO i = 1 TO InitArgs.0 InitArgs.i = TRANSLATE( InitArgs.i ) @@ -1357,5 +1366,5 @@ /*:VRX PB_CREATEHELP_Click */ -PB_CREATEHELP_Click: +PB_CREATEHELP_Click: CALL VRMethod 'SW_CREATE', 'InvokeHelp' return @@ -1376,5 +1385,5 @@ /*:VRX PB_HELP_Click */ -PB_HELP_Click: +PB_HELP_Click: CALL VRMethod 'WN_MAIN', 'InvokeHelp' return @@ -1402,5 +1411,5 @@ /*:VRX PB_NETHELP_Click */ -PB_NETHELP_Click: +PB_NETHELP_Click: CALL VRMethod 'SW_NETWORK', 'InvokeHelp' return @@ -1891,5 +1900,5 @@ CALL NLSSetText 'SW_ABOUT', 'Caption', 10 /* 10: Product Information */ CALL NLSSetText 'DT_ABOUT1', 'Caption', 11 /* 11: eCups Printer Install Utility */ - CALL NLSSetText 'DT_ABOUT2', 'Caption', 12, '1.04' /* 12: Version %1 */ + CALL NLSSetText 'DT_ABOUT2', 'Caption', 12, '1.05' /* 12: Version %1 */ CALL NLSSetText 'DT_ABOUT3', 'Caption', 13, '2010, 2013' /* 13: (C) %1 Alex Taylor */ CALL NLSSetText 'PB_ABOUT', 'Caption', 2 /* 10: Product Information */ Index: /trunk/gui/printer/cupswiz/readme.1st =================================================================== --- /trunk/gui/printer/cupswiz/readme.1st (revision 44) +++ /trunk/gui/printer/cupswiz/readme.1st (revision 45) @@ -1,4 +1,4 @@ CUPSWIZ - CUPS printer-creation wizard -Version 1.04 +Version 1.05 This program is simple graphical front-end for creating CUPS-based printers Index: /trunk/gui/printer/manager/readme.txt =================================================================== --- /trunk/gui/printer/manager/readme.txt (revision 44) +++ /trunk/gui/printer/manager/readme.txt (revision 45) @@ -1,4 +1,4 @@ PM Printer Manager -Version 0.44 +Version 0.45 Printer Manager is a new graphical printer management tool designed to Index: /trunk/gui/shared/PrManUtl.VRS =================================================================== --- /trunk/gui/shared/PrManUtl.VRS (revision 44) +++ /trunk/gui/shared/PrManUtl.VRS (revision 45) @@ -292,4 +292,8 @@ /* Determine if the specified PrinterPak driver already contains support * for the specified printer model. + * + * If so, return the name of the model as found in the driver (necessary in + * order to make sure the correct case is retained, which may be different + * from what was requested). Otherwise return ''. */ PrinterExistsInDRV: PROCEDURE EXPOSE globals. @@ -312,11 +316,11 @@ */ start = 1 - found = 0 + found = '' DO WHILE ( found == 0 ) & ( start < total_len ) _strend = POS('0'x, exist_models, start ) IF _strend == 0 THEN LEAVE - _model = TRANSLATE( SUBSTR( exist_models, start, _strend - start )) - IF _model == printer_name THEN - found = 1 + _model = SUBSTR( exist_models, start, _strend - start ) + IF TRANSLATE( _model ) == printer_name THEN + found = _model ELSE start = _strend + 1 Index: /trunk/gui/shared/PrintUtl.VRS =================================================================== --- /trunk/gui/shared/PrintUtl.VRS (revision 44) +++ /trunk/gui/shared/PrintUtl.VRS (revision 45) @@ -177,4 +177,8 @@ /* Determine if the specified PrinterPak driver already contains support * for the specified printer model. + * + * If so, return the name of the model as found in the driver (necessary in + * order to make sure the correct case is retained, which may be different + * from what was requested). Otherwise return ''. */ PrinterExistsInDRV: PROCEDURE EXPOSE globals. @@ -197,11 +201,11 @@ */ start = 1 - found = 0 + found = '' DO WHILE ( found == 0 ) & ( start < total_len ) _strend = POS('0'x, exist_models, start ) IF _strend == 0 THEN LEAVE - _model = TRANSLATE( SUBSTR( exist_models, start, _strend - start )) - IF _model == printer_name THEN - found = 1 + _model = SUBSTR( exist_models, start, _strend - start ) + IF TRANSLATE( _model ) == printer_name THEN + found = _model ELSE start = _strend + 1

AltStyle によって変換されたページ (->オリジナル) /