mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-03 06:07:41 +00:00
chore(developer): strip out defunct printing support
Printing has not been supported from Keyman Developer for quite some time. This does not appear to have been raised as a user issue. Remove printing support, and cleanup user interface. As a side-effect, this will fix #11249, as Delphi's printer support will no longer poll for default printer on start. Fixes: #11249
This commit is contained in:
parent
f8a5164c57
commit
3d3a5ca1fb
10 changed files with 7985 additions and 8148 deletions
|
|
@ -45,17 +45,6 @@ type
|
|||
function CanClearSelection: Boolean;
|
||||
end;
|
||||
|
||||
IKMDPrintActions = interface
|
||||
['{C6F05AD6-42A3-404F-944C-904393A51837}']
|
||||
//function PageSetup: Boolean;
|
||||
function PrintFile: Boolean;
|
||||
end;
|
||||
|
||||
IKMDPrintPreviewActions = interface(IKMDPrintActions)
|
||||
['{B5879BC4-7A0C-4E00-AAE3-E2D48489152A}']
|
||||
function PrintPreview: Boolean;
|
||||
end;
|
||||
|
||||
IKMDViewExpandEditorActions = interface
|
||||
['{680A172E-A221-4CDA-B68C-1E2AF8487510}']
|
||||
procedure ExpandContractEditor;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -78,9 +78,6 @@ type
|
|||
actFileSaveAs: TFileSaveAs;
|
||||
actFileSaveCopyAs: TAction;
|
||||
actFileRevert: TAction;
|
||||
actFilePageSetup: TFilePageSetup;
|
||||
actFilePrint: TAction;
|
||||
actFilePrintPreview: TAction;
|
||||
actFileExit: TFileExit;
|
||||
actEditCut: TKMDEditCut;
|
||||
actEditCopy: TKMDEditCopy;
|
||||
|
|
@ -144,15 +141,10 @@ type
|
|||
procedure actFileSaveExecute(Sender: TObject);
|
||||
procedure actFileSaveCopyAsExecute(Sender: TObject);
|
||||
procedure actFileRevertExecute(Sender: TObject);
|
||||
procedure actFilePrintPreviewExecute(Sender: TObject);
|
||||
procedure actFilePrintExecute(Sender: TObject);
|
||||
procedure actFilePrintPreviewUpdate(Sender: TObject);
|
||||
procedure actFilePrintUpdate(Sender: TObject);
|
||||
procedure actFileSaveAsAccept(Sender: TObject);
|
||||
procedure actFileSaveCopyAsUpdate(Sender: TObject);
|
||||
procedure actFileSaveAsUpdate(Sender: TObject);
|
||||
procedure actFileRevertUpdate(Sender: TObject);
|
||||
procedure actFilePageSetupUpdate(Sender: TObject);
|
||||
procedure actFileSaveUpdate(Sender: TObject);
|
||||
procedure actFileSaveAsBeforeExecute(Sender: TObject);
|
||||
procedure actViewCharacterMapExecute(Sender: TObject);
|
||||
|
|
@ -256,7 +248,6 @@ uses
|
|||
Graphics,
|
||||
Messages,
|
||||
Keyman.Developer.UI.TikeOnlineUpdateCheck,
|
||||
Printers,
|
||||
Vcl.Clipbrd,
|
||||
Keyman.System.KeyboardUtils,
|
||||
Keyman.Developer.System.Project.Project,
|
||||
|
|
@ -348,34 +339,6 @@ begin
|
|||
actFileOpen.Enabled := IsGlobalProjectUIReady;
|
||||
end;
|
||||
|
||||
procedure TmodActionsMain.actFilePageSetupUpdate(Sender: TObject);
|
||||
begin
|
||||
with frmKeymanDeveloper do
|
||||
actFilePageSetup.Enabled := IsGlobalProjectUIReady and Assigned(ActiveChild) and Supports(ActiveChild, IKMDPrintActions) and (Printer.Printers.Count > 0);
|
||||
end;
|
||||
|
||||
procedure TmodActionsMain.actFilePrintExecute(Sender: TObject);
|
||||
begin
|
||||
(frmKeymanDeveloper.ActiveChild as IKMDPrintActions).PrintFile;
|
||||
end;
|
||||
|
||||
procedure TmodActionsMain.actFilePrintUpdate(Sender: TObject);
|
||||
begin
|
||||
with frmKeymanDeveloper do
|
||||
actFilePrint.Enabled := IsGlobalProjectUIReady and Assigned(ActiveChild) and Supports(ActiveChild, IKMDPrintActions) and (Printer.Printers.Count > 0);
|
||||
end;
|
||||
|
||||
procedure TmodActionsMain.actFilePrintPreviewExecute(Sender: TObject);
|
||||
begin
|
||||
(frmKeymanDeveloper.ActiveChild as IKMDPrintPreviewActions).PrintPreview;
|
||||
end;
|
||||
|
||||
procedure TmodActionsMain.actFilePrintPreviewUpdate(Sender: TObject);
|
||||
begin
|
||||
with frmKeymanDeveloper do
|
||||
actFilePrintPreview.Enabled := IsGlobalProjectUIReady and Assigned(ActiveChild) and Supports(ActiveChild, IKMDPrintPreviewActions) and (Printer.Printers.Count > 0);
|
||||
end;
|
||||
|
||||
procedure TmodActionsMain.actFileRevertExecute(Sender: TObject);
|
||||
begin
|
||||
if MessageDlg('Are you sure you want to revert to the last saved version?',
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -41,7 +41,7 @@ uses
|
|||
System.UITypes,
|
||||
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||
StdCtrls, ExtCtrls, Menus, ToolWin, ComCtrls, ImgList, ErrorControlledRegistry,
|
||||
RegistryKeys, UfrmMDIChild, MenuImgList, Printers,
|
||||
RegistryKeys, UfrmMDIChild, MenuImgList,
|
||||
UfrmKeyTest,
|
||||
|
||||
Keyman.Developer.System.Project.ProjectFile, UfrmMDIEditor,
|
||||
|
|
@ -54,11 +54,9 @@ type
|
|||
TUPCOptions = set of (upcSetError, upcClearError, upcSetBreakPoint, upcClearBreakPoint,
|
||||
upcSetExecutionPoint, upcClearExecutionPoint);
|
||||
|
||||
TfrmEditor = class(TfrmTikeEditor, IKMDPrintActions {TODO:, IKMDPrintPreviewActions})
|
||||
TfrmEditor = class(TfrmTikeEditor)
|
||||
lstImages: TMenuImgList;
|
||||
dlgFonts: TFontDialog;
|
||||
dlgPrint: TPrintDialog;
|
||||
dlgPrintSetup: TPrinterSetupDialog;
|
||||
dlgFind: TFindDialog;
|
||||
dlgReplace: TReplaceDialog;
|
||||
lstImagesDisabled: TImageList;
|
||||
|
|
@ -73,10 +71,6 @@ type
|
|||
procedure SetTextFileFormat(const Value: TTextFileFormat);
|
||||
procedure UpdateEditorFormat;
|
||||
|
||||
{ IKMDPrintActions }
|
||||
function PrintFile: Boolean;
|
||||
{ IKMDPrintPreviewActions }
|
||||
//TODO: function PrintPreview: Boolean;
|
||||
procedure EditorChanged(Sender: TObject);
|
||||
function GetEditorFormat: TEditorFormat;
|
||||
function GetTextFileFormat: TTextFileFormat;
|
||||
|
|
@ -300,11 +294,6 @@ begin
|
|||
Modified := False;
|
||||
end;
|
||||
|
||||
function TfrmEditor.PrintFile: Boolean;
|
||||
begin
|
||||
Result := FEditorFrame.PrintFile(FileName);
|
||||
end;
|
||||
|
||||
{-------------------------------------------------------------------------------
|
||||
- Interface functions -
|
||||
-------------------------------------------------------------------------------}
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ type
|
|||
Filename: string;
|
||||
end;
|
||||
|
||||
TfrmKeymanWizard = class(TfrmTikeEditor, IKMDPrintActions {TODO:, IKMDPrintPreviewActions})
|
||||
TfrmKeymanWizard = class(TfrmTikeEditor)
|
||||
dlgBrowseBitmap: TOpenPictureDialog;
|
||||
dlgSaveExport: TSaveDialog;
|
||||
dlgSaveBitmap: TSavePictureDialog;
|
||||
|
|
@ -524,11 +524,6 @@ type
|
|||
function CanChangeView(FView: TCodeDesignView): Boolean; override; // I4678
|
||||
procedure ChangeView(FView: TCodeDesignView); override; // I4678
|
||||
|
||||
{ IKMDPrintActions }
|
||||
function PrintFile: Boolean;
|
||||
{ IKMDPrintPreviewActions }
|
||||
//TODO: function PrintPreview: Boolean;
|
||||
|
||||
function CanReloadAsTextFileFormatClick: Boolean; override; // I3637
|
||||
procedure ReloadAsTextFileFormatClick(TextFileFormat: TTextFileFormat); // I3637
|
||||
override;
|
||||
|
|
@ -1508,16 +1503,6 @@ begin
|
|||
Result := True;
|
||||
end;
|
||||
|
||||
function TfrmKeymanWizard.PrintFile: Boolean;
|
||||
begin
|
||||
Result := frameSource.PrintFile(FileName);
|
||||
end;
|
||||
|
||||
{TODO: function TfrmKeymanWizard.PrintPreview: Boolean;
|
||||
begin
|
||||
Result := frameSource.PrintPreview(FileName);
|
||||
end;}
|
||||
|
||||
function TfrmKeymanWizard.GetCurrentRule: TKeyboardParser_LayoutRule;
|
||||
var
|
||||
i: Integer;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -37,7 +37,6 @@ type
|
|||
TframeTextEditor = class(TTIKEForm, IKMDEditActions, IKMDSearchActions, IKMDTextEditorActions)
|
||||
lstImages: TMenuImgList;
|
||||
dlgFonts: TFontDialog;
|
||||
dlgPrintSetup: TPrinterSetupDialog;
|
||||
lstImagesDisabled: TImageList;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
|
|
@ -162,9 +161,6 @@ type
|
|||
|
||||
procedure SyntaxColourChange;
|
||||
|
||||
function PrintFile(Header: WideString = ''): Boolean;
|
||||
function PrintPreview(Header: WideString = ''): Boolean;
|
||||
|
||||
procedure LoadFromFile(AFileName: WideString); overload; // I4034
|
||||
procedure LoadFromStream(AStream: TStream); overload; // I2964
|
||||
procedure SaveToFile(AFileName: WideString);
|
||||
|
|
@ -658,18 +654,6 @@ begin
|
|||
frmKeymanDeveloper.barStatus.Panels[1].Text := AMode;
|
||||
end;
|
||||
|
||||
function TframeTextEditor.PrintFile(Header: WideString): Boolean;
|
||||
begin
|
||||
ExecuteCommand('print');
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
function TframeTextEditor.PrintPreview(Header: WideString): Boolean;
|
||||
begin
|
||||
// TODO: print preview
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
procedure TframeTextEditor.SetCharFont(const Value: TFont);
|
||||
begin
|
||||
FCharFont.Assign(Value);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -171,8 +171,6 @@ type
|
|||
ToolButton2: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
ToolButton4: TToolButton;
|
||||
ToolButton5: TToolButton;
|
||||
ToolButton6: TToolButton;
|
||||
ToolButton7: TToolButton;
|
||||
ToolButton8: TToolButton;
|
||||
ToolButton9: TToolButton;
|
||||
|
|
@ -202,12 +200,8 @@ type
|
|||
N5: TMenuItem;
|
||||
Close1: TMenuItem;
|
||||
N6: TMenuItem;
|
||||
PageSetup1: TMenuItem;
|
||||
PrintPreview1: TMenuItem;
|
||||
Print1: TMenuItem;
|
||||
N8: TMenuItem;
|
||||
Exit1: TMenuItem;
|
||||
N9: TMenuItem;
|
||||
mnuFileRecent: TMenuItem;
|
||||
Undo1: TMenuItem;
|
||||
Redo1: TMenuItem;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue