Merged revision(s) 54697 #3081a50b7d from trunk:

Gtk2: fixed triggering selection change in TCheckListBox. issue #31697
........

git-svn-id: branches/fixes_1_8@55046 -
This commit is contained in:
maxim 2017-05-22 22:32:02 +00:00
parent 3eb545bbfd
commit a9dc1ef886

View File

@ -69,6 +69,19 @@ const
{ TGtk2WSCheckListBox }
function Gtk2WS_CheckListBoxSelectionChanged({%H-}Widget: PGtkWidget;
WidgetInfo: PWidgetInfo): gboolean; cdecl;
var
Mess: TLMessage;
begin
Result := False;
if WidgetInfo^.ChangeLock > 0 then
Exit;
FillChar(Mess{%H-},SizeOf(Mess),0);
Mess.msg := LM_SELCHANGE;
DeliverMessage(WidgetInfo^.LCLObject, Mess);
end;
procedure Gtk2WS_CheckListBoxDataFunc({%H-}tree_column: PGtkTreeViewColumn;
cell: PGtkCellRenderer; tree_model: PGtkTreeModel; iter: PGtkTreeIter; {%H-}data: Pointer); cdecl;
var
@ -214,6 +227,9 @@ begin
False: gtk_tree_selection_set_mode(Selection, GTK_SELECTION_SINGLE);
end;
g_signal_connect_after(Selection, 'changed',
G_CALLBACK(@Gtk2WS_CheckListBoxSelectionChanged), WidgetInfo);
Set_RC_Name(AWinControl, P);
SetCallbacks(p, WidgetInfo);
end;