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. --- UQuickConnect.pas | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'UQuickConnect.pas') diff --git a/UQuickConnect.pas b/UQuickConnect.pas index 903add4..18725fc 100644 --- a/UQuickConnect.pas +++ b/UQuickConnect.pas @@ -22,9 +22,9 @@ unit UQuickConnect; interface uses - glib2, gdk2, gtk2, pango, SysUtils, Types, Classes, GTKControls, GTKForms, GTKStdCtrls, GTKExtCtrls, GTKConsts, GTKView, - GTKUtils, GTKDialogs, GTKPixbuf, GTKClasses, GTKMenus, - UCore, UCoreClasses, UVFSCore, UEngines, UConnectionManager; + lazglib2, gtk2, SysUtils, Classes, GTKControls, GTKForms, GTKStdCtrls, GTKExtCtrls, GTKConsts, + GTKPixbuf, GTKClasses, GTKMenus, + UCore, UVFSCore, UEngines, UConnectionManager; type TFQuickConnect = class(TGTKDialog) @@ -63,7 +63,7 @@ var implementation -uses ULocale, UCoreUtils, UConfig, UConnectionProperties, UGnome, UError, uVFSprototypes; +uses ULocale, UCoreUtils, UConfig, UConnectionProperties, UGnome, UError; procedure TFQuickConnect.FormCreate(Sender: TObject); @@ -170,14 +170,14 @@ begin Table.AddControlEx(0, 2, 1, 1, Label2, [taoShrink, taoFill], [taoShrink], 10, 5); Table.AddControlEx(1, 2, 1, 1, PluginOptionMenu, [taoExpand, taoFill], [taoShrink], 0, 5); - CloseButton.OnClick := CloseButtonClick; - ConnectButton.OnClick := ConnectButtonClick; - StopButton.OnClick := StopButtonClick; - OnKeyDown := FormKeyDown; - OnClose := FormClose; - OnResponse := FormResponse; - URIComboBox.Entry.OnKeyDown := ComboBoxKeyDown; - URIComboBox.Entry.OnChanged := ComboBoxChanged; + CloseButton.OnClick := @CloseButtonClick; + ConnectButton.OnClick := @ConnectButtonClick; + StopButton.OnClick := @StopButtonClick; + OnKeyDown := @FormKeyDown; + OnClose := @FormClose; + OnResponse := @FormResponse; + URIComboBox.Entry.OnKeyDown := @ComboBoxKeyDown; + URIComboBox.Entry.OnChanged := @ComboBoxChanged; ComboBoxChanged(Sender); end; @@ -286,7 +286,7 @@ begin // Find VFS module to use for this connection VFSPlugin := nil; if (PluginOptionMenu.ItemIndex <> 0) and (PluginOptionMenu.Items[PluginOptionMenu.ItemIndex].Data <> nil) then begin - VFSPlugin := PluginOptionMenu.Items[PluginOptionMenu.ItemIndex].Data; + VFSPlugin := TVFSPlugin(PluginOptionMenu.Items[PluginOptionMenu.ItemIndex].Data); ConfQuickConnectPluginID := VFSPlugin.ModuleID; end else ConfQuickConnectPluginID := ''; if VFSPlugin = nil then begin @@ -297,12 +297,12 @@ begin if Length(TVFSPlugin(PluginList[i]).Services) > 0 then for j := 0 to Length(TVFSPlugin(PluginList[i]).Services) - 1 do if WideCompareText(TVFSPlugin(PluginList[i]).Services[j], Scheme) = 0 then begin - VFSPlugin := PluginList[i]; + VFSPlugin := TVFSPlugin(PluginList[i]); Break; end; if VFSPlugin <> nil then Break; end; - if VFSPlugin = nil then VFSPlugin := PluginList[0]; // Fallback in hope some other plugin can handle it + if VFSPlugin = nil then VFSPlugin := TVFSPlugin(PluginList[0]); // Fallback in hope some other plugin can handle it end; if (SourcePanelEngine is TVFSEngine) and ConfReplaceConnectionWarning then begin -- cgit v1.2.3