From f51fc44e0d479335b68650016b40813129039322 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Fri, 14 Nov 2008 21:25:58 +0100 Subject: Disable checksum checking, creating and splitting + merging for VFS engines --- UMain.pas | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'UMain.pas') diff --git a/UMain.pas b/UMain.pas index 119e7cc..b163cb7 100644 --- a/UMain.pas +++ b/UMain.pas @@ -1691,8 +1691,8 @@ begin end else begin Ext := WideUpperCase(Trim(Copy(String(Data^.FDisplayName), LastDelimiter('.', String(Data^.FDisplayName)) + 1, Length(String(Data^.FDisplayName)) - LastDelimiter('.', String(Data^.FDisplayName))))); // Test for known internal functions - if (Ext = 'SFV') or (Ext = 'MD5') then miVerifyChecksumsClick(Self) else - if (Ext = 'CRC') or (Ext = '001') then miMergeFilesClick(Self) else + if ((Ext = 'SFV') or (Ext = 'MD5')) and (Engine is TLocalTreeEngine) then miVerifyChecksumsClick(Self) else + if ((Ext = 'CRC') or (Ext = '001')) and (Engine is TLocalTreeEngine) then miMergeFilesClick(Self) else if not ((Engine is TLocalTreeEngine) and HandleVFSArchive(String(Data^.FName), IncludeTrailingPathDelimiter(Engine.Path) + String(Data^.FName), String(Data^.FName), '/')) then if (not ConfUseURI) or ((Engine is TVFSEngine) and TVFSEngine(Engine).ArchiveMode) then RunFile(IncludeTrailingPathDelimiter(Engine.Path) + String(Data^.FName), Engine, -1) @@ -1932,17 +1932,23 @@ end; procedure TFMain.UpdateCaption; var LeftPanel: boolean; s: string; + Engine: TPanelEngine; begin if LeftListView.Focused then LeftPanel := True else if RightListView.Focused then LeftPanel := False else LeftPanel := LeftLastFocused; - if LeftPanel then begin - if LeftPanelEngine.GetPrefix <> '' then s := Format(ConstFullPathFormatStr, [LeftPanelEngine.GetPrefix, LeftPanelEngine.Path]) - else s := LeftPanelEngine.Path; - end else - if RightPanelEngine.GetPrefix <> '' then s := Format(ConstFullPathFormatStr, [RightPanelEngine.GetPrefix, RightPanelEngine.Path]) - else s := RightPanelEngine.Path; + + if LeftPanel then Engine := LeftPanelEngine + else Engine := RightPanelEngine; + + if Engine.GetPrefix <> '' then s := Format(ConstFullPathFormatStr, [Engine.GetPrefix, Engine.Path]) + else s := Engine.Path; Caption := Format('Tux Commander [%s]', [StrToUTF8(s)]); + + miVerifyChecksums.Enabled := Engine is TLocalTreeEngine; + miCreateChecksums.Enabled := Engine is TLocalTreeEngine; + miSplitFile.Enabled := Engine is TLocalTreeEngine; + miMergeFiles.Enabled := Engine is TLocalTreeEngine; end; procedure TFMain.UpdatePanelInfo; -- cgit v1.2.3