diff options
Diffstat (limited to 'UMain.pas')
| -rw-r--r-- | UMain.pas | 22 |
1 files changed, 14 insertions, 8 deletions
@@ -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; |
