diff options
| -rw-r--r-- | UConnectionManager.pas | 12 | ||||
| -rw-r--r-- | UConnectionProperties.pas | 2 | ||||
| -rw-r--r-- | UMain.pas | 14 | ||||
| -rw-r--r-- | UQuickConnect.pas | 10 | ||||
| -rw-r--r-- | USearch.pas | 4 | ||||
| -rw-r--r-- | UTestPlugin.pas | 2 | ||||
| -rw-r--r-- | vfs/UVFSCore.pas | 34 | ||||
| -rw-r--r-- | vfs/uVFSprototypes.pas | 10 |
8 files changed, 44 insertions, 44 deletions
diff --git a/UConnectionManager.pas b/UConnectionManager.pas index 026a975..e441b24 100644 --- a/UConnectionManager.pas +++ b/UConnectionManager.pas @@ -335,7 +335,7 @@ begin ConnMgrItem.Password := PasswordEntry.Text; ConnMgrItem.TargetDir := TargetDirEntry.Text; ConnMgrItem.PluginID := ''; - if PluginOptionMenu.ItemIndex <> 0 then ConnMgrItem.PluginID := TVFSPlugin(PluginList[PluginOptionMenu.ItemIndex - 1]).VFSName; + if PluginOptionMenu.ItemIndex <> 0 then ConnMgrItem.PluginID := TVFSPlugin(PluginList[PluginOptionMenu.ItemIndex - 1]).ModuleID; end; ConnectionMgrList.Add(ConnMgrItem); Item := ListView.Items.Add; @@ -367,7 +367,7 @@ begin FConnectionProperties.ServiceTypeOptionMenuChanged(Sender); // Find the plugin by PluginID for i := 0 to PluginList.Count - 1 do - if TVFSPlugin(PluginList[i]).VFSName = ConnMgrItem.PluginID then begin + if TVFSPlugin(PluginList[i]).ModuleID = ConnMgrItem.PluginID then begin FConnectionProperties.PluginOptionMenu.ItemIndex := i + 1; Break; end; @@ -381,7 +381,7 @@ begin ConnMgrItem.Password := PasswordEntry.Text; ConnMgrItem.TargetDir := TargetDirEntry.Text; ConnMgrItem.PluginID := ''; - if PluginOptionMenu.ItemIndex <> 0 then ConnMgrItem.PluginID := TVFSPlugin(PluginList[PluginOptionMenu.ItemIndex - 1]).VFSName; + if PluginOptionMenu.ItemIndex <> 0 then ConnMgrItem.PluginID := TVFSPlugin(PluginList[PluginOptionMenu.ItemIndex - 1]).ModuleID; end; Item.SetValue(1, ConnMgrItem.ConnectionName); Item.SetValue(2, FConnectionProperties.MakeURI(True)); @@ -408,7 +408,7 @@ begin FConnectionProperties.ServiceTypeOptionMenuChanged(Sender); // Find the plugin by PluginID for i := 0 to PluginList.Count - 1 do - if TVFSPlugin(PluginList[i]).VFSName = ConnMgrItem.PluginID then begin + if TVFSPlugin(PluginList[i]).ModuleID = ConnMgrItem.PluginID then begin FConnectionProperties.PluginOptionMenu.ItemIndex := i + 1; Break; end; @@ -423,7 +423,7 @@ begin ConnMgrItem.Password := PasswordEntry.Text; ConnMgrItem.TargetDir := TargetDirEntry.Text; ConnMgrItem.PluginID := ''; - if PluginOptionMenu.ItemIndex <> 0 then ConnMgrItem.PluginID := TVFSPlugin(PluginList[PluginOptionMenu.ItemIndex - 1]).VFSName; + if PluginOptionMenu.ItemIndex <> 0 then ConnMgrItem.PluginID := TVFSPlugin(PluginList[PluginOptionMenu.ItemIndex - 1]).ModuleID; end; ConnectionMgrList.Add(ConnMgrItem); Item := ListView.Items.Add; @@ -550,7 +550,7 @@ begin VFSPlugin := nil; if Length(FActiveConnInfo.PluginID) > 0 then for i := 0 to PluginList.Count - 1 do - if TVFSPlugin(PluginList[i]).VFSName = FActiveConnInfo.PluginID then begin + if TVFSPlugin(PluginList[i]).ModuleID = FActiveConnInfo.PluginID then begin VFSPlugin := PluginList[i]; Break; end; diff --git a/UConnectionProperties.pas b/UConnectionProperties.pas index 9899585..3e68080 100644 --- a/UConnectionProperties.pas +++ b/UConnectionProperties.pas @@ -191,7 +191,7 @@ begin PluginOptionMenu.Items.Add(MenuItem); for i := 0 to PluginList.Count - 1 do begin MenuItem := TGTKMenuItem.CreateTyped(Self, itImageText); - MenuItem.SetCaptionPlain(Format('%s [%s]', [TVFSPlugin(PluginList[i]).VFSName, + MenuItem.SetCaptionPlain(Format('%s [%s]', [TVFSPlugin(PluginList[i]).ModuleName, ExtractFileName(TVFSPlugin(PluginList[i]).FullPath)])); PluginOptionMenu.Items.Add(MenuItem); end; @@ -5359,7 +5359,7 @@ begin end else for i := 0 to PluginList.Count - 1 do begin MenuItem1 := TGTKMenuItem.CreateTyped(Self, itImageText); - MenuItem1.Caption := TVFSPlugin(PluginList[i]).VFSName; + MenuItem1.Caption := TVFSPlugin(PluginList[i]).ModuleName; MenuItem2 := TGTKMenuItem.CreateTyped(Self, itImageText); MenuItem2.Caption := LANGPluginAbout; MenuItem2.Tag := i; @@ -5406,9 +5406,9 @@ begin VFSItem := PluginList[(Sender as TGTKMenuItem).Tag]; InternalLock; if (libGnomeUI2Handle = nil) or (@gnome_about_new = nil) then - Application.MessageBox(Format(LANGPluginAboutInside, [VFSItem.VFSName, VFSItem.VFSAbout, VFSItem.VFSCopyright])) + Application.MessageBox(Format(LANGPluginAboutInside, [VFSItem.ModuleName, VFSItem.ModuleAbout, VFSItem.ModuleCopyright])) else begin - AboutBox := gnome_about_new(VFSItem.VFSName, nil, VFSItem.VFSCopyright, VFSItem.VFSAbout, @Authors, nil, nil, nil); + AboutBox := gnome_about_new(PChar(VFSItem.ModuleName), nil, PChar(VFSItem.ModuleCopyright), PChar(VFSItem.ModuleAbout), @Authors, nil, nil, nil); gtk_window_set_transient_for(GTK_WINDOW(AboutBox), GTK_WINDOW(FMain.FWidget)); gtk_dialog_run(GTK_DIALOG(AboutBox)); end; @@ -6015,10 +6015,10 @@ begin else Engine := RightPanelEngine; if Engine is TLocalTreeEngine then begin - DebugMsg(['Found plugin ''', Plugin.VFSName, ''', trying to open the file ''', FullPath, '''']); + DebugMsg(['Found plugin ''', Plugin.ModuleID, ''', trying to open the file ''', FullPath, '''']); ChangingDir(LeftPanel, TargetPath, FullPath, HighlightItem, False, False, Plugin); end else begin - DebugMsg(['Found plugin ''', Plugin.VFSName, ''', archive is nested in another archive, extracting first.']); + DebugMsg(['Found plugin ''', Plugin.ModuleID, ''', archive is nested in another archive, extracting first.']); NewPath := ''; Result := ExtractFromArchive(NewPath, Engine, FullPath, False); if Result then begin @@ -6096,7 +6096,7 @@ begin AFConnectionProperties.URIEntry.Text := URI; if (Engine.CustomPluginIDSave <> '') and (AFConnectionProperties.PluginOptionMenu.Items.Count > 0) then for i := 0 to PluginList.Count - 1 do - if TVFSPlugin(PluginList[i]).VFSName = Engine.CustomPluginIDSave + if TVFSPlugin(PluginList[i]).ModuleID = Engine.CustomPluginIDSave then AFConnectionProperties.PluginOptionMenu.ItemIndex := i + 1; if AFConnectionProperties.Run = mbOK then begin ReadConnections; @@ -6109,7 +6109,7 @@ begin ConnMgrItem.TargetDir := AFConnectionProperties.TargetDirEntry.Text; ConnMgrItem.PluginID := ''; if AFConnectionProperties.PluginOptionMenu.ItemIndex <> 0 then - ConnMgrItem.PluginID := TVFSPlugin(PluginList[AFConnectionProperties.PluginOptionMenu.ItemIndex - 1]).VFSName; + ConnMgrItem.PluginID := TVFSPlugin(PluginList[AFConnectionProperties.PluginOptionMenu.ItemIndex - 1]).ModuleID; ConfConnMgrActiveItem := ConnectionMgrList.Add(ConnMgrItem); WriteConnections; end; diff --git a/UQuickConnect.pas b/UQuickConnect.pas index 91be256..2e22148 100644 --- a/UQuickConnect.pas +++ b/UQuickConnect.pas @@ -149,7 +149,7 @@ begin PluginOptionMenu.Items.Add(MenuItem); for i := 0 to PluginList.Count - 1 do begin MenuItem := TGTKMenuItem.CreateTyped(Self, itImageText); - MenuItem.SetCaptionPlain(Format('%s [%s]', [TVFSPlugin(PluginList[i]).VFSName, + MenuItem.SetCaptionPlain(Format('%s [%s]', [TVFSPlugin(PluginList[i]).ModuleName, ExtractFileName(TVFSPlugin(PluginList[i]).FullPath)])); PluginOptionMenu.Items.Add(MenuItem); end; @@ -157,7 +157,7 @@ begin // Find last used plugin if Length(Trim(ConfQuickConnectPluginID)) > 0 then for i := 0 to PluginList.Count - 1 do - if TVFSPlugin(PluginList[i]).VFSName = ConfQuickConnectPluginID then begin + if TVFSPlugin(PluginList[i]).ModuleID = ConfQuickConnectPluginID then begin PluginOptionMenu.ItemIndex := i + 1; Break; end; @@ -237,7 +237,7 @@ begin if Length(Trim(URIComboBox.Entry.Text)) > 0 then SaveItemToHistory(URIComboBox.Entry.Text, QuickConnectHistory); if PluginOptionMenu.ItemIndex <> 0 - then ConfQuickConnectPluginID := TVFSPlugin(PluginList[PluginOptionMenu.ItemIndex - 1]).VFSName + then ConfQuickConnectPluginID := TVFSPlugin(PluginList[PluginOptionMenu.ItemIndex - 1]).ModuleID else ConfQuickConnectPluginID := ''; end; @@ -282,11 +282,11 @@ begin // Find VFS module to use for this connection VFSPlugin := nil; - if PluginOptionMenu.ItemIndex <> 0 then ConfQuickConnectPluginID := TVFSPlugin(PluginList[PluginOptionMenu.ItemIndex - 1]).VFSName + if PluginOptionMenu.ItemIndex <> 0 then ConfQuickConnectPluginID := TVFSPlugin(PluginList[PluginOptionMenu.ItemIndex - 1]).ModuleID else ConfQuickConnectPluginID := ''; if Length(ConfQuickConnectPluginID) > 0 then for i := 0 to PluginList.Count - 1 do - if TVFSPlugin(PluginList[i]).VFSName = ConfQuickConnectPluginID then begin + if TVFSPlugin(PluginList[i]).ModuleID = ConfQuickConnectPluginID then begin VFSPlugin := PluginList[i]; Break; end; diff --git a/USearch.pas b/USearch.pas index 4339f5e..808027d 100644 --- a/USearch.pas +++ b/USearch.pas @@ -592,7 +592,7 @@ begin if b then Break; end; if b then begin - DebugMsg(['Found plugin ''', Plugin.VFSName, ''', trying to open the archive ''', archive, '''']); + DebugMsg(['Found plugin ''', Plugin.ModuleID, ''', trying to open the archive ''', archive, '''']); AEngine := TVFSEngine.Create(Plugin); (AEngine as TVFSEngine).ArchiveMode := True; b := b and ((AEngine as TVFSEngine).VFSOpenEx(archive, nil, nil, nil, nil) = 0); @@ -988,7 +988,7 @@ begin if (not Data^.IsDir) and FSearchArchives and (not (FEngine is TVFSEngine)) then begin Plugin := FindVFSPlugin(FileName); if Plugin <> nil then begin - DebugMsg(['Found plugin ''', Plugin.VFSName, ''', trying to open the archive ''', FileName, '''']); + DebugMsg(['Found plugin ''', Plugin.ModuleID, ''', trying to open the archive ''', FileName, '''']); xEngine := TVFSEngine.Create(Plugin); xEngine.ParentEngine := FEngine; xEngine.ArchiveMode := True; diff --git a/UTestPlugin.pas b/UTestPlugin.pas index 7991e32..9f8b369 100644 --- a/UTestPlugin.pas +++ b/UTestPlugin.pas @@ -152,7 +152,7 @@ begin end else for i := 0 to PluginList.Count - 1 do begin MenuItem := TGTKMenuItem.CreateTyped(Self, itImageText); - MenuItem.SetCaptionPlain(Format('%s [%s]', [TVFSPlugin(PluginList[i]).VFSName, + MenuItem.SetCaptionPlain(Format('%s [%s]', [TVFSPlugin(PluginList[i]).ModuleName, ExtractFileName(TVFSPlugin(PluginList[i]).FullPath)])); PluginOptionMenu.Items.Add(MenuItem); end; diff --git a/vfs/UVFSCore.pas b/vfs/UVFSCore.pas index 7c85b02..7c98303 100644 --- a/vfs/UVFSCore.pas +++ b/vfs/UVFSCore.pas @@ -76,10 +76,10 @@ type destructor Destroy; override; function VFSVersion: integer; - function VFSName: PChar; - function VFSDescription: PChar; - function VFSAbout: PChar; - function VFSCopyright: PChar; + function ModuleID: string; + function ModuleName: string; + function ModuleAbout: string; + function ModuleCopyright: string; end; @@ -257,40 +257,40 @@ begin else Result := -1; end; -function TVFSPlugin.VFSName: PChar; +function TVFSPlugin.ModuleID: string; var Info: TVFSInfo; begin if @FVFSGetInfo <> nil then begin Info := FVFSGetInfo; - Result := Info.Name; - end else Result := nil; + Result := String(Info.ID); + end else Result := ''; end; -function TVFSPlugin.VFSDescription: PChar; +function TVFSPlugin.ModuleName: string; var Info: TVFSInfo; begin if @FVFSGetInfo <> nil then begin Info := FVFSGetInfo; - Result := Info.Description; - end else Result := nil; + Result := String(Info.Name); + end else Result := ''; end; -function TVFSPlugin.VFSAbout: PChar; +function TVFSPlugin.ModuleAbout: string; var Info: TVFSInfo; begin if @FVFSGetInfo <> nil then begin Info := FVFSGetInfo; - Result := Info.About; - end else Result := nil; + Result := String(Info.About); + end else Result := ''; end; -function TVFSPlugin.VFSCopyright: PChar; +function TVFSPlugin.ModuleCopyright: string; var Info: TVFSInfo; begin if @FVFSGetInfo <> nil then begin Info := FVFSGetInfo; - Result := Info.Copyright; - end else Result := nil; + Result := String(Info.Copyright); + end else Result := ''; end; (********************************************************************************************************************************) @@ -963,7 +963,7 @@ end; (********************************************************************************************************************************) function TVFSEngine.GetPluginID: string; begin - if FSourcePlugin <> nil then Result := FSourcePlugin.VFSName + if FSourcePlugin <> nil then Result := FSourcePlugin.ModuleID else Result := ''; end; diff --git a/vfs/uVFSprototypes.pas b/vfs/uVFSprototypes.pas index 5f0106c..b454769 100644 --- a/vfs/uVFSprototypes.pas +++ b/vfs/uVFSprototypes.pas @@ -144,12 +144,12 @@ type {$ENDIF} end; - // This structure contains basic informations about the plugin (Name is used to identify the module in the application) + // This structure contains basic informations about the plugin TVFSInfo = record - Name: PChar; - Description: PChar; - About: PChar; - Copyright: PChar; + ID: PChar; // unique identifier, not shown in GUI + Name: PChar; // plugin name, GUI string (UTF-8) + About: PChar; // GUI string (UTF-8) + Copyright: PChar; // GUI string (UTF-8) end; type |
