mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 10:32:37 +02:00
gtk2 intf: TCustomListBox: fixed SetCallBack
git-svn-id: trunk@15297 -
This commit is contained in:
parent
3ef54218fb
commit
f273bde703
@ -3010,16 +3010,16 @@ begin
|
||||
// gObject
|
||||
if AGTKObject = nil then gObject := ObjectToGTKObject(ALCLObject)
|
||||
else gObject := AGTKObject;
|
||||
|
||||
if gObject = nil then Exit;
|
||||
|
||||
Info:=GetWidgetInfo(gObject, True);
|
||||
|
||||
// gFixed is the widget with the client area (e.g. TGroupBox, TCustomForm have this)
|
||||
gFixed := PGTKObject(GetFixedWidget(gObject));
|
||||
if gFixed = nil then
|
||||
gFixed := gObject;
|
||||
|
||||
// gCore is the working widget (e.g. TListBox has a scrolling widget (=main widget) and a tree widget (=core widget))
|
||||
Info:=GetWidgetInfo(gObject, True);
|
||||
gCore:=PGtkObject(Info^.CoreWidget);
|
||||
gMain:=GetMainWidget(gObject);
|
||||
if (gMain=nil) then
|
||||
|
@ -621,7 +621,8 @@ begin
|
||||
gtk_widget_show(TVWidget);
|
||||
|
||||
SetMainWidget(p, TVWidget);
|
||||
GetWidgetInfo(p, True)^.CoreWidget := TVWidget;
|
||||
WidgetInfo := GetWidgetInfo(p, false);
|
||||
WidgetInfo^.CoreWidget := TVWidget;
|
||||
|
||||
Selection := gtk_tree_view_get_selection(PGtkTreeView(TVWidget));
|
||||
|
||||
@ -630,10 +631,8 @@ begin
|
||||
False: gtk_tree_selection_set_mode(Selection, GTK_SELECTION_SINGLE);
|
||||
end;
|
||||
|
||||
WidgetInfo := GetWidgetInfo(p, False);
|
||||
|
||||
// Sets the callbacks
|
||||
SetCallbacks(TVWidget, WidgetInfo);
|
||||
SetCallbacks(p, WidgetInfo);
|
||||
end;
|
||||
|
||||
class procedure TGtk2WSCustomListBox.SetCallbacks(const AGtkWidget: PGtkWidget;
|
||||
|
Loading…
Reference in New Issue
Block a user