summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2009-10-12 13:29:47 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2009-10-12 13:29:47 +0200
commit7e12a45576ccd4a15f900d451854d8382d9a3c0b (patch)
treed3955446a78ad5368a417052d3cdb0687e0d9754 /components
parent4e597b775fb2f84dd4180d62ff35a73d8e114399 (diff)
downloadfpGUI-7e12a45576ccd4a15f900d451854d8382d9a3c0b.tar.xz
Fix the X11 error on application quit. Finally!
Signed-off-by: Graeme Geldenhuys <graeme@mastermaths.co.za>
Diffstat (limited to 'components')
-rwxr-xr-xcomponents/richtext/RichTextView.pas34
1 files changed, 2 insertions, 32 deletions
diff --git a/components/richtext/RichTextView.pas b/components/richtext/RichTextView.pas
index 141f9031..dc17b3c0 100755
--- a/components/richtext/RichTextView.pas
+++ b/components/richtext/RichTextView.pas
@@ -526,47 +526,16 @@ end;
Procedure TRichTextView.CreateDefaultMenu;
begin
- FDefaultMenu := TfpgPopupMenu.Create( self );
+ FDefaultMenu := TfpgPopupMenu.Create(nil);
FDefaultMenu.OnShow := @DefaultMenuPopup;
- //FSelectAllMI := TfpgMenuItem.Create( self );
- //FSelectAllMI.Text := 'Select &All';
- //FSelectAllMI.OnClick := @SelectAllMIClick;
- //FDefaultMenu.Items.Add( FSelectAllMI );
FSelectAllMI := FDefaultMenu.AddMenuItem('Select &All', '', @SelectAllMIClick);
-
- //FCopyMI := TMenuItem.Create( self );
- //FCopyMI.Caption := '&Copy';
- //FCopyMI.OnClick := CopyMIClick;
- //FDefaultMenu.Items.Add( FCopyMI );
FCopyMI := FDefaultMenu.AddMenuItem('&Copy', '', @CopyMIClick);
-
FDefaultMenu.AddMenuItem('-', '', nil);
-
- //FRefreshMI := TMenuItem.Create( self );
- //FRefreshMI.Caption := '&Refresh';
- //FRefreshMI.OnClick := RefreshMIClick;
- //FDefaultMenu.Items.Add( FRefreshMI );
FRefreshMI := FDefaultMenu.AddMenuItem('&Refresh', '', @RefreshMIClick);
-
FDefaultMenu.AddMenuItem('-', '', nil);
-
- //FSmoothScrollMI := TMenuItem.Create( self );
- //FSmoothScrollMI.Caption := '&Smooth Scrolling';
- //FSmoothScrollMI.OnClick := SmoothScrollMIClick;
- //FDefaultMenu.Items.Add( FSmoothScrollMI );
FSmoothScrollMI := FDefaultMenu.AddMenuItem('&Smooth Scrolling', '', @SmoothScrollMIClick);
-
- //FWordWrapMI := TMenuItem.Create( self );
- //FWordWrapMI.Caption := '&Word Wrap';
- //FWordWrapMI.OnClick := WordWrapMIClick;
- //FDefaultMenu.Items.Add( FWordWrapMI );
FWordWrapMI := FDefaultMenu.AddMenuItem('&Word Wrap', '', @WordWrapMIClick);
-
- //FDebugMI := TMenuItem.Create( self );
- //FDebugMI.Caption := '&Debug';
- //FDebugMI.OnClick := DebugMIClick;
- //FDefaultMenu.Items.Add( FDebugMI );
FDebugMI := FDefaultMenu.AddMenuItem('&Debug', '', @DebugMIClick);
end;
@@ -744,6 +713,7 @@ end;
Destructor TRichTextView.Destroy;
Begin
+ FDefaultMenu.Free;
// destroy the font manager NOW
// while the canvas is still valid
// (it will be freed in TControl.DisposeWnd)