Merged revision(s) 63897 #a3272084cf, 63902 #6c19136b97, 63926 #317b7088a4, 63939 #6fddd1aaf4 from trunk:

LCL-GTK2: Improve setting a shaped form. Issue #30385, patch from Anton Kavalenka.
........
LCL-GTK2: Initialize a record in LCLIntfCellRenderer_CellDataFunc. Prevents a crash. Issue #37781, patch from Cyrax.
........
LCL: Fix ofAutoPreview of TOpenPictureDialog. Issue #37820, patch from Anton Kavalenka.
........
IDE: Fix a crash if IDE is aborted before updating configuration.
........

git-svn-id: branches/fixes_2_0@64610 -
This commit is contained in:
martin 2021-02-18 01:09:47 +00:00
parent 9b78caaf21
commit 7c386df181
4 changed files with 14 additions and 3 deletions

View File

@ -1638,8 +1638,9 @@ end;
destructor TMainIDE.Destroy;
begin
ToolStatus:=itExiting;
IDECommandList.RemoveCustomUpdateEvent(@UpdateMainIDECommands);
// IDECommandList may be Nil if the IDE is aborted before updating configuration.
if Assigned(IDECommandList) then
IDECommandList.RemoveCustomUpdateEvent(@UpdateMainIDECommands);
if Assigned(ExternalTools) then
ExternalTools.TerminateAll;

View File

@ -50,6 +50,7 @@ type
TPreviewFileDialog = class(TOpenDialog)
private
FPreviewFileControl: TPreviewFileControl;
function GetPreviewFileControl:TPreviewFileControl;
protected
class procedure WSRegisterClass; override;
procedure CreatePreviewControl; virtual;
@ -57,7 +58,7 @@ type
function DoExecute: boolean; override;
public
constructor Create(TheOwner: TComponent); override;
property PreviewFileControl: TPreviewFileControl read FPreviewFileControl;
property PreviewFileControl: TPreviewFileControl read GetPreviewFileControl;
end;
{ TOpenPictureDialog }
@ -275,6 +276,13 @@ end;
{ TPreviewFileDialog }
function TPreviewFileDialog.GetPreviewFileControl: TPreviewFileControl;
begin
if not Assigned(fPreviewFileControl) then
Self.CreatePreviewControl;
Result:=fPreviewFileControl;
end;
class procedure TPreviewFileDialog.WSRegisterClass;
begin
inherited WSRegisterClass;

View File

@ -425,6 +425,7 @@ var
ListItem: TListItem;
Value: TGValue;
begin
FillByte(Value{%H-},SizeOf(Value),0);
if G_IS_OBJECT(cell) = false then
exit;

View File

@ -4112,6 +4112,7 @@ function GetControlWindow(Widget: Pointer) : PGDKWindow;
begin
if Widget <> nil then
begin
gtk_widget_realize(Widget); // associate with window
If not GTKWidgetIsA(PGTKWidget(Widget), GTK_Layout_Get_Type) then
Result := PGTKWidget(Widget)^.Window
else