Skip to content

[codex] Add file rename action#1856

Open
vitaly-zdanevich wants to merge 1 commit into
mltframework:masterfrom
vitaly-zdanevich:codex/files-rename-context-menu
Open

[codex] Add file rename action#1856
vitaly-zdanevich wants to merge 1 commit into
mltframework:masterfrom
vitaly-zdanevich:codex/files-rename-context-menu

Conversation

@vitaly-zdanevich

@vitaly-zdanevich vitaly-zdanevich commented Jun 27, 2026

Copy link
Copy Markdown
  • enable Rename only when exactly one file or folder is selected across all file view modes
  • reject path separators, rename in place, and reselect the renamed item after the filesystem model updates
image

Add a Rename command to the integrated file manager context menu.

The action is enabled for exactly one selected file or folder across all file view modes, rejects path separators, renames in place, and reselects the renamed item after the filesystem model updates.

Co-authored-by: OpenAI ChatGPT <noreply@openai.com>
@vitaly-zdanevich
vitaly-zdanevich marked this pull request as ready for review June 27, 2026 20:23
@ddennedy

ddennedy commented Jul 5, 2026

Copy link
Copy Markdown
Member

Files does not have Delete, Copy, Paste, Move or any change-related functions for various reasons:

  • It is easier to say "not Shotcut's fault" because Shotcut generally does not do general file modifications anywhere except for the files it makes.
  • These things need Undo and Redo.
  • People expect these to handle multiple selection (except perhaps Rename).
  • Combinations of Undo and multiple is very tricky and require progress handling, adding more work, undoing and redoing batches,.
  • On Windows, if the file is open in Shotcut it is locked, and this new feature will fail leading to confusion. You do not care about Windows, but the project maintainers and directly handle the user complaints and problem reports, not you.

Comment thread src/docks/filesdock.cpp
}

QDir dir(info.absolutePath());
if (!dir.rename(oldName, newName)) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This must be inside a class derived from QUndoCommand and pushed onto MainWindow::undoStack().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants