diff --git a/lcl/include/wincontrol.inc b/lcl/include/wincontrol.inc index c11d669e31..344c4f31e5 100644 --- a/lcl/include/wincontrol.inc +++ b/lcl/include/wincontrol.inc @@ -6462,6 +6462,7 @@ begin Assert((parent <> nil) or (WndParent = 0), 'TODO: find parent if parent=nil and WndParent <> 0'); end; + //DebugLn(['TWinControl.CreateWnd ',DbgSName(WidgetSetClass),' ',DbgSName(Self)]); FHandle := TWSWinControlClass(WidgetSetClass).CreateHandle(Self, Params); if not HandleAllocated then RaiseGDBException('Handle creation failed creating '+DbgSName(Self)); diff --git a/lcl/interfaces/gtk/gtkwscontrols.pp b/lcl/interfaces/gtk/gtkwscontrols.pp index 28a7a3fbeb..0669452ee0 100644 --- a/lcl/interfaces/gtk/gtkwscontrols.pp +++ b/lcl/interfaces/gtk/gtkwscontrols.pp @@ -104,9 +104,8 @@ type { TGtkWSCustomControl } TGtkWSCustomControl = class(TWSCustomControl) - private protected - class procedure SetCallbacks(const AWidget: PGtkWidget; const AWidgetInfo: PWidgetInfo); virtual; + class procedure SetCCCallbacks(const AWidget: PGtkWidget; const AWidgetInfo: PWidgetInfo); public class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): HWND; override; end; @@ -883,7 +882,7 @@ end; { TGtkWSCustomControl } -class procedure TGtkWSCustomControl.SetCallbacks(const AWidget: PGtkWidget; +class procedure TGtkWSCustomControl.SetCCCallbacks(const AWidget: PGtkWidget; const AWidgetInfo: PWidgetInfo); begin TGtkWSWinControl.SetCallbacks(PGtkObject(AWidget), TComponent(AWidgetInfo^.LCLObject)); @@ -921,7 +920,7 @@ begin Allocation.Height := AParams.Height; gtk_widget_size_allocate(Widget, @Allocation); - SetCallbacks(Widget, WidgetInfo); + SetCCCallbacks(Widget, WidgetInfo); end; initialization diff --git a/lcl/interfaces/gtk/gtkwsgrids.pp b/lcl/interfaces/gtk/gtkwsgrids.pp index 2b93cb881a..adcddff39a 100644 --- a/lcl/interfaces/gtk/gtkwsgrids.pp +++ b/lcl/interfaces/gtk/gtkwsgrids.pp @@ -88,4 +88,4 @@ initialization // RegisterWSComponent(TDrawGrid, TGtkWSDrawGrid); // RegisterWSComponent(TStringGrid, TGtkWSStringGrid); //////////////////////////////////////////////////// -end. \ No newline at end of file +end. diff --git a/lcl/interfaces/gtk2/gtk2wscontrols.pp b/lcl/interfaces/gtk2/gtk2wscontrols.pp index 38da7645b9..da5d87a790 100644 --- a/lcl/interfaces/gtk2/gtk2wscontrols.pp +++ b/lcl/interfaces/gtk2/gtk2wscontrols.pp @@ -37,6 +37,7 @@ uses //////////////////////////////////////////////////// Gtk2, Gdk2, Glib2, GtkGlobals, GtkWsControls, + gtkProc, LCLType, WSControls, WSLCLClasses, WSProc; @@ -95,7 +96,6 @@ type implementation -uses gtkproc, lcltype; { TGtk2WSWinControl } diff --git a/lcl/lclclasses.pp b/lcl/lclclasses.pp index 393db6b425..d45fef1a77 100644 --- a/lcl/lclclasses.pp +++ b/lcl/lclclasses.pp @@ -106,8 +106,11 @@ class function TLCLComponent.NewInstance: TObject; begin Result := inherited NewInstance; TLCLComponent(Result).FWidgetSetClass := FindWSComponentClass(Self); - if TLCLComponent(Result).FWidgetSetClass = nil - then TLCLComponent(Result).FWidgetSetClass := TWSLCLComponent; + if TLCLComponent(Result).FWidgetSetClass = nil then + begin + DebugLn(['TLCLComponent.NewInstance WARNING: missing FWidgetSetClass ',ClassName]); + TLCLComponent(Result).FWidgetSetClass := TWSLCLComponent; + end; end; procedure TLCLComponent.RemoveAllHandlersOfObject(AnObject: TObject);