gtk2 intf: TCustomListBox: fixed SetCallBack

git-svn-id: trunk@15297 -
This commit is contained in:
mattias 2008-06-03 11:16:16 +00:00
parent 3ef54218fb
commit f273bde703
2 changed files with 5 additions and 6 deletions

View File

@ -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

View File

@ -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;