mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-06 10:40:50 +02:00
Printers: Implement psoWarning in PageSetupDialog. Issue #33531, patch from AlexeyT.
git-svn-id: trunk@57613 -
This commit is contained in:
parent
c131224bf7
commit
96169209a1
@ -34,6 +34,7 @@ resourcestring
|
||||
p4lrsPagesPerSheet = 'Pages per sheet';
|
||||
p4lrsMargins = 'Margins';
|
||||
p4lrsAdvanced = 'Advanced';
|
||||
p4lrsNoDefaultPrinter = 'No default printer found';
|
||||
|
||||
implementation
|
||||
|
||||
|
@ -27,7 +27,10 @@ interface
|
||||
{$ENDIF}
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Dialogs, LResources, Printers, OsPrinters;
|
||||
Classes, SysUtils, Forms, Controls, Dialogs,
|
||||
LResources,
|
||||
Printer4LazStrConst,
|
||||
Printers, OsPrinters;
|
||||
|
||||
type
|
||||
TPageMeasureUnits = (
|
||||
|
@ -88,6 +88,13 @@ var
|
||||
NDigits, NScale: integer;
|
||||
NInc: double;
|
||||
begin
|
||||
if Printer.PrinterIndex<0 then
|
||||
begin
|
||||
if psoWarning in Options then
|
||||
MessageDlg(Title, p4lrsNoDefaultPrinter, mtWarning, [mbOk], 0);
|
||||
exit(false);
|
||||
end;
|
||||
|
||||
// w/o SetPrinter, list of paper names is different
|
||||
// (Letter / US Letter, EnvMonarch / Envelope Monarch),
|
||||
// and list of sources is empty
|
||||
|
Loading…
Reference in New Issue
Block a user