ADD: CSV/TSV Table Grid Lister Plugin with Inline Find & Replace#37
Open
pplupo wants to merge 45 commits into
Open
ADD: CSV/TSV Table Grid Lister Plugin with Inline Find & Replace#37pplupo wants to merge 45 commits into
pplupo wants to merge 45 commits into
Conversation
…ete row editing, TSV support, and context menu - Display CSV/TSV files in an interactive QTableWidget grid - Auto-detect separator (comma, semicolon, tab); fall back to file extension - Header Row toggle button: interprets first line as header or data row, reloads file on toggle; controls whether copies include the header line - Ctrl+C: copy selection as TSV (includes header when Header Row is on) - Right-click context menu: Copy as TSV, Copy as CSV, Delete Selected Rows, Insert from Clipboard - Ctrl+V: insert clipboard rows at selected position; validates column count; skips clipboard header line when it matches the current header (Header Row on) - Delete: remove selected rows - Ctrl+S: save file; correctly handles editing vs non-editing state without disturbing Double Commander focus - Inline cell editing with Save / Save As / Reload toolbar actions - Enca encoding auto-detection with Glib conversion fallback - Double-quoted field parsing per CSV RFC - F7 search support - Full README with screenshots, feature docs, and configuration reference - Attribution to original author j2969719
This makes the plugin standalone by compiling and linking libenca statically, removing the need for users to manually install libenca.so.0.
Adds ability to insert empty rows or clipboard rows above/below current selection or clicked row.
… monochrome variation selector
…correcting click-activation focus stealing
…ion of arrow/delete keys
# Conflicts: # build.sh
…et focus restoration and using nullptr parent for modal dialogs
…ing double click in Quick View mode
…storeViewFocus focus-steal
- Reverted FocusManager to use single-arg setActive(bool) to fix focus redirection back to Double Commander after deactivation. - Updated csvview's lc_focus handler to use the reverted setActive(false) method.
…ss and restoreViewFocus
- Add createEditor/setEditorData/setModelData/updateEditorGeometry to WrapAnywhereDelegate so all grid cells edit with QPlainTextEdit, preserving newlines correctly - Let Enter/Return and Up/Down pass through to QPlainTextEdit so they work as expected within multi-line text - Ctrl+Enter commits and closes the editor - Remove the temporary MultiLineDelegate from StructViewWidget.cpp now that the fix lives in the shared delegate
- Enter: commit and close the editor (was Ctrl+Enter) - Ctrl+Enter: insert a newline (was plain Enter)
Move QPlainTextEdit Enter handling to WrapAnywhereDelegate::eventFilter. Qt installs the delegate as event filter on the editor widget, so that is the correct interception point — not EditableGridWidget::eventFilter which only sees events on m_view (never reached during editing). Qt's QAbstractItemDelegate::eventFilter deliberately skips the Enter→commit behavior for QPlainTextEdit, so we must override it here. - Enter: commit and close - Ctrl+Enter: insert newline
Instead of calling insertPlainText() from the event filter (which was silently failing in dbview with AnyKeyPressed + proxy model), simply do not intercept Ctrl+Enter at all. QAbstractItemDelegate::eventFilter already skips the commit behavior for QPlainTextEdit editors, so the event falls through to QPlainTextEdit::keyPressEvent which inserts a newline naturally. This approach is robust regardless of edit trigger or model setup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates the CSV plugin for Double Commander built with Qt6 to visualize, navigate, edit, and export CSV and TSV files in an interactive spreadsheet-like grid (
QTableWidget). It also includes a fully integrated, focus-safe Find & Replace utility panel.Key Features
1. Spreadsheet Grid View & Visuals
2. Auto-Detection & RFC Parsing
3. Edit & Undo/Redo Stack
QUndoStackfor complete Undo (Ctrl+Z) and Redo (Ctrl+shift+ZorCtrl+Y`) capability.✓/*) showing unsaved history changes.4. Inline Find & Replace Panel
Press
Ctrl+F,Ctrl+R, or click the toolbar🔍 Find/Replacebutton in the grid view to open a collapsible search panel at the bottom of the layout:QRegularExpression) patterns.QUndoStackmacro so that they can be undone/redone in a single action.5. Focus & DC Pane Coordination
🛠 Build & Installation
build.shto compile and packagecsvview_qt6.wlxalong with translation files into the release archive underrelease/wlx/csvview/.j2969719.ini.