mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-16 01:40:37 +01:00
gtk3: added gtk3wsextdlgs. Fixed crash with TOpenPictureDialog. issue #27216
git-svn-id: trunk@47268 -
This commit is contained in:
parent
9cd3560b15
commit
342c235c66
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -6948,6 +6948,7 @@ lcl/interfaces/gtk3/gtk3wscomctrls.pp svneol=native#text/plain
|
||||
lcl/interfaces/gtk3/gtk3wscontrols.pp svneol=native#text/plain
|
||||
lcl/interfaces/gtk3/gtk3wsdialogs.pp svneol=native#text/plain
|
||||
lcl/interfaces/gtk3/gtk3wsextctrls.pp svneol=native#text/plain
|
||||
lcl/interfaces/gtk3/gtk3wsextdlgs.pp svneol=native#text/plain
|
||||
lcl/interfaces/gtk3/gtk3wsfactory.pas svneol=native#text/plain
|
||||
lcl/interfaces/gtk3/gtk3wsforms.pp svneol=native#text/plain
|
||||
lcl/interfaces/gtk3/gtk3wsimglist.pp svneol=native#text/plain
|
||||
|
||||
@ -1215,7 +1215,7 @@ begin
|
||||
|
||||
FileChooser := PGtkFileChooser(SelWidget);
|
||||
|
||||
PreviewWidget := {%H-}PGtkWidget(AControl.Handle);
|
||||
PreviewWidget := TGtk3CustomControl(AControl.Handle).Widget;
|
||||
|
||||
g_object_set_data(PGObject(PreviewWidget),'LCLPreviewFixed',
|
||||
PreviewWidget);
|
||||
|
||||
101
lcl/interfaces/gtk3/gtk3wsextdlgs.pp
Normal file
101
lcl/interfaces/gtk3/gtk3wsextdlgs.pp
Normal file
@ -0,0 +1,101 @@
|
||||
{
|
||||
*****************************************************************************
|
||||
* Gtk3WSExtDlgs.pp *
|
||||
* ---------------- *
|
||||
* *
|
||||
* *
|
||||
*****************************************************************************
|
||||
|
||||
*****************************************************************************
|
||||
This file is part of the Lazarus Component Library (LCL)
|
||||
|
||||
See the file COPYING.modifiedLGPL.txt, included in this distribution,
|
||||
for details about the license.
|
||||
*****************************************************************************
|
||||
}
|
||||
unit Gtk3WSExtDlgs;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
////////////////////////////////////////////////////
|
||||
// I M P O R T A N T
|
||||
////////////////////////////////////////////////////
|
||||
// To get as little as posible circles,
|
||||
// uncomment only when needed for registration
|
||||
////////////////////////////////////////////////////
|
||||
// ExtDlgs,
|
||||
////////////////////////////////////////////////////
|
||||
Controls, LCLType,
|
||||
gtk3int, gtk3widgets,
|
||||
WSExtDlgs, WSLCLClasses;
|
||||
|
||||
type
|
||||
|
||||
{ TGtk3WSPreviewFileControl }
|
||||
|
||||
TGtk3WSPreviewFileControl = class(TWSPreviewFileControl)
|
||||
published
|
||||
class function CreateHandle(const AWinControl: TWinControl;
|
||||
const AParams: TCreateParams): TLCLIntfHandle; override;
|
||||
end;
|
||||
|
||||
{ TGtk3WSPreviewFileDialog }
|
||||
|
||||
TGtk3WSPreviewFileDialog = class(TWSPreviewFileDialog)
|
||||
published
|
||||
end;
|
||||
|
||||
{ TGtk3WSOpenPictureDialog }
|
||||
|
||||
TGtk3WSOpenPictureDialog = class(TWSOpenPictureDialog)
|
||||
published
|
||||
end;
|
||||
|
||||
{ TGtk3WSSavePictureDialog }
|
||||
|
||||
TGtk3WSSavePictureDialog = class(TWSSavePictureDialog)
|
||||
published
|
||||
end;
|
||||
|
||||
{ TGtk3WSCalculatorDialog }
|
||||
|
||||
TGtk3WSCalculatorDialog = class(TWSCalculatorDialog)
|
||||
published
|
||||
end;
|
||||
|
||||
{ TGtk3WSCalculatorForm }
|
||||
|
||||
TGtk3WSCalculatorForm = class(TWSCalculatorForm)
|
||||
published
|
||||
end;
|
||||
|
||||
{ TGtk3WSCalendarDialogForm }
|
||||
|
||||
TGtk3WSCalendarDialogForm = class(TWSCalendarDialogForm)
|
||||
published
|
||||
end;
|
||||
|
||||
{ TGtk3WSCalendarDialog }
|
||||
|
||||
TGtk3WSCalendarDialog = class(TWSCalendarDialog)
|
||||
published
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
{ TGtk3WSPreviewFileControl }
|
||||
|
||||
class function TGtk3WSPreviewFileControl.CreateHandle(
|
||||
const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle;
|
||||
var
|
||||
Gtk3CustomControl: TGtk3CustomControl;
|
||||
begin
|
||||
Gtk3CustomControl := TGtk3CustomControl.Create(AWinControl, AParams);
|
||||
Result := TLCLIntfHandle(Gtk3CustomControl);
|
||||
end;
|
||||
|
||||
end.
|
||||
@ -139,7 +139,7 @@ uses
|
||||
uses
|
||||
Gtk3WSImgList, Gtk3WSControls, Gtk3WSForms, Gtk3WSButtons, Gtk3WSStdCtrls,
|
||||
Gtk3WSComCtrls, Gtk3WSExtCtrls, Gtk3WSSpin, Gtk3WSMenus, Gtk3WSCalendar,
|
||||
Gtk3WSDialogs, Gtk3WSCheckLst;
|
||||
Gtk3WSDialogs, Gtk3WSCheckLst, Gtk3WSExtDlgs;
|
||||
|
||||
// imglist
|
||||
function RegisterCustomImageList: Boolean; alias : 'WSRegisterCustomImageList';
|
||||
@ -467,8 +467,8 @@ end;
|
||||
function RegisterPreviewFileControl: Boolean; alias : 'WSRegisterPreviewFileControl';
|
||||
begin
|
||||
// RegisterWSComponent(TPreviewFileControl, TGtk2WSPreviewFileControl); { GTK1 }
|
||||
// RegisterWSComponent(TPreviewFileControl, TGtk2WSPreviewFileControl);
|
||||
Result := False;
|
||||
RegisterWSComponent(TPreviewFileControl, TGtk3WSPreviewFileControl);
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
function RegisterPreviewFileDialog: Boolean; alias : 'WSRegisterPreviewFileDialog';
|
||||
|
||||
@ -129,7 +129,7 @@ end;"/>
|
||||
<License Value="modified LGPL-2
|
||||
"/>
|
||||
<Version Major="1" Minor="3"/>
|
||||
<Files Count="436">
|
||||
<Files Count="438">
|
||||
<Item1>
|
||||
<Filename Value="carbon/agl.pp"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
@ -2167,6 +2167,16 @@ end;"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="qtsystemtrayicon"/>
|
||||
</Item436>
|
||||
<Item437>
|
||||
<Filename Value="gtk3/gtk3wsdialogs.pp"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="Gtk3WSDialogs"/>
|
||||
</Item437>
|
||||
<Item438>
|
||||
<Filename Value="gtk3/gtk3wsextdlgs.pp"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="Gtk3WSExtDlgs"/>
|
||||
</Item438>
|
||||
</Files>
|
||||
<LazDoc Paths="../../docs/xml/lcl"/>
|
||||
<i18n>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user