From b9703b29819b619037cc282d719c187e51bacd30 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Mon, 23 Dec 2024 23:59:45 +0100 Subject: Port to g-i generated glib2 bindings Includes switch to FPC -Mobjfpc and related pointer style fixes. --- UTestPlugin.pas | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'UTestPlugin.pas') diff --git a/UTestPlugin.pas b/UTestPlugin.pas index 2d92ae2..1673103 100644 --- a/UTestPlugin.pas +++ b/UTestPlugin.pas @@ -22,9 +22,8 @@ unit UTestPlugin; interface uses - glib2, gdk2, gtk2, pango, SysUtils, Types, Classes, Variants, GTKControls, GTKForms, GTKStdCtrls, GTKExtCtrls, GTKConsts, GTKView, - GTKUtils, GTKDialogs, GTKPixbuf, GTKClasses, GTKMenus, - UCoreClasses; + SysUtils, Classes, GTKControls, GTKForms, GTKStdCtrls, GTKExtCtrls, GTKConsts, + GTKPixbuf, GTKMenus; type TFTestPlugin = class(TGTKDialog) @@ -133,7 +132,7 @@ begin Label4.FocusControl := PasswordEntry; Label4.UseUnderline := True; AnonymousCheckButton := TGTKCheckButton.CreateWithLabel(Self, LANGTestPlugin_AnonymousCheckButton); - AnonymousCheckButton.OnToggled := AnonymousCheckButtonToggled; + AnonymousCheckButton.OnToggled := @AnonymousCheckButtonToggled; AnonymousCheckButton.Checked := True; Table.AddControlEx(0, 4, 2, 1, TGTKEventBox.Create(Self), [taoShrink, taoFill], [taoExpand, taoFill], 5, 4); Table.AddControlEx(0, 5, 1, 1, Label3, [taoShrink, taoFill], [taoShrink, taoExpand, taoFill], 5, 2); @@ -157,7 +156,7 @@ begin PluginOptionMenu.Items.Add(MenuItem); end; - OnKeyDown := FormKeyDown; + OnKeyDown := @FormKeyDown; end; procedure TFTestPlugin.FormKeyDown(Sender: TObject; Key: Word; Shift: TShiftState; var Accept: boolean); -- cgit v1.2.3