mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 00:02:23 +00:00
feat(windows): add optional windows explorer context menus (#310)
* add CLI support for opening directories in new tabs f * feat(windows): add optional windows explorer context menus f * fix(gui): restore missing windows and reject lossy paths * fix(windows): harden explorer menu registration and native path handling * fix(cli): preserve native GUI paths on Windows --------- Co-authored-by: thomas <thomas@gmail.com> Co-authored-by: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com>
This commit is contained in:
@@ -176,8 +176,27 @@ begin
|
||||
RegWriteStringValue(HKEY_CURRENT_USER, 'Environment', 'Path', Rebuilt);
|
||||
end;
|
||||
|
||||
(* Remove the optional Explorer verbs if this user enabled them in Settings.
|
||||
|
||||
The application owns only the final `tty7` subkeys. Deleting those trees
|
||||
removes their command children without touching another application's verb
|
||||
or a shared `shell` parent. Missing keys are the normal default and make both
|
||||
calls harmless no-ops. This cleanup is uninstall-only: upgrades keep the
|
||||
user's explicit registration, and the next app launch reports "Needs update"
|
||||
if an install path ever changes. *)
|
||||
procedure RemoveExplorerContextMenu();
|
||||
begin
|
||||
RegDeleteKeyIncludingSubkeys(
|
||||
HKEY_CURRENT_USER, 'Software\Classes\Directory\shell\tty7');
|
||||
RegDeleteKeyIncludingSubkeys(
|
||||
HKEY_CURRENT_USER, 'Software\Classes\Directory\Background\shell\tty7');
|
||||
end;
|
||||
|
||||
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
|
||||
begin
|
||||
if CurUninstallStep = usUninstall then
|
||||
begin
|
||||
RemoveAppDirFromUserPath();
|
||||
RemoveExplorerContextMenu();
|
||||
end;
|
||||
end;
|
||||
|
||||
Reference in New Issue
Block a user