mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 12:12:47 +02:00
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:
parent
3eb545bbfd
commit
a9dc1ef886
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user