Skip to content

Add "Set up like Subtitle Edit 4" action (Ctrl/Cmd+4)#11670

Merged
niksedk merged 2 commits into
mainfrom
feature/setup-like-se4
Jun 17, 2026
Merged

Add "Set up like Subtitle Edit 4" action (Ctrl/Cmd+4)#11670
niksedk merged 2 commits into
mainfrom
feature/setup-like-se4

Conversation

@niksedk

@niksedk niksedk commented Jun 17, 2026

Copy link
Copy Markdown
Member

What

A single action — Set up like Subtitle Edit 4 — that makes the new app feel like classic SE 4 in one keypress. Bound to Ctrl+4 (⌘+4 on macOS) by default; rebindable in the Shortcuts settings page (category General).

What it does

When invoked it:

  1. Replace rules — imports Multiple Replace groups from SE 4's %AppData%\Subtitle Edit\Settings.xml, merged into existing categories (skips exact-duplicate rules).
  2. Shortcuts — imports SE 4 keyboard shortcuts (reusing Se4ShortcutsImporter), merged (only direct action-conflicts overwritten).
  3. Theme + toolbar icons — switches to the Classic theme + Classic icon set.
  4. Waveform — applies the SE 4 look (see table below).

If no Settings.xml is found (always the case off Windows — SE 4 is Windows-only), it falls back to SE 4 default values: the default keymap is merged in and the theme/waveform are still applied. A summary dialog reports which path was taken and the counts. Everything applies live via ApplySettings() (no restart).

Waveform palette (from the se4-legacy AudioVisualizer.cs defaults)

Property Value
Draw mode Classic (non-fancy)
Waveform color GreenYellow
Selected subtitle line Red
Background Black
Text Gray
Paragraph edges LimeGreen
Grid / vertical lines On

Notable changes

  • New Se4SettingsXmlReplaceImporter parses the <MultipleSearchAndReplaceGroups> section of SE 4's Settings.xml. The existing Se4XmlImporter only handled the stand-alone export shape; the new one is tolerant of SE 4's naming variants (Group/MultipleSearchAndReplaceGroup, Enabled/IsActive, etc.).
  • New Se4SetupApplier orchestrates the merge + theme/waveform application.
  • Bare-digit shortcut fix: MigrateLegacyOemKeys now normalizes top-row digit tokens ("4""D4"). Avalonia reports the top-row 4 as D4 at dispatch time, so a literal "4" binding never matched — this self-heals any such persisted/imported binding on load.

Tests

Se4SettingsXmlReplaceImporterTests covers the real SE 4 Settings.xml shape, the naming variants, and invalid/empty input. Full UI test suite green.

Notes / possible follow-ups

  • Grid-line color is hardcoded in the control (_paintGridLines = new Pen(Brushes.DarkGray, 0.2)), so it renders DarkGray rather than SE 4's exact #141412. Adding a WaveformGridColor setting would make it exact.
  • Invocation is hotkey-only by design; a menu entry / first-run wizard could be added if wanted.

🤖 Generated with Claude Code

niksedk and others added 2 commits June 17, 2026 08:08
One shortcut that makes the new app feel like classic SE 4:

- Imports Multiple Replace rules + keyboard shortcuts from SE 4's
  Settings.xml (merge: existing kept, only direct conflicts overwritten).
  When no Settings.xml is found, falls back to SE 4 default values.
- Switches theme + toolbar icons to "Classic".
- Applies the SE 4 waveform look from the se4-legacy AudioVisualizer
  defaults: classic draw style, GreenYellow waveform on black, red
  selected line, lime-green paragraph edges, grey text, grid lines on.

New Se4SettingsXmlReplaceImporter parses the <MultipleSearchAndReplaceGroups>
section of SE 4's Settings.xml (the existing Se4XmlImporter only handled the
stand-alone export shape); it is tolerant of SE 4's naming variants.

Also normalize bare top-row digit shortcut tokens ("4" -> "D4") in
MigrateLegacyOemKeys: Avalonia reports the key as "D4" at dispatch time,
so a literal "4" binding never matched.

Bound to Ctrl+4 (Cmd+4 on macOS) by default; rebindable in the Shortcuts
settings page.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tweaks; fix waveform edge-click selection

- Se4SetupApplier: hide the edit-box Italic button and show the toolbar
  encoding selector to match SE 4 (scoped to the setup action only).
- Classic theme: strip the 1px border from toolbar buttons (toolbar only)
  so they render flat like SE 4.
- SE4 waveform: draw the paragraph end marker red (start stays green) and
  stop tinting the paragraph background when selected.
- Prompt Yes/No before applying the SE 4 setup.
- Waveform: only suppress the follow-up Tapped (select/seek) when the
  pointer actually dragged, so a plain click near a paragraph edge selects
  it instead of being treated as a no-op resize.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@niksedk niksedk merged commit ac9c980 into main Jun 17, 2026
1 of 3 checks passed
@niksedk niksedk deleted the feature/setup-like-se4 branch June 17, 2026 07:16
pull Bot pushed a commit to matrixer2306/subtitleedit that referenced this pull request Jun 17, 2026
Document the new Ctrl+4 "Set up like Subtitle Edit 4" action (PR SubtitleEdit#11670)
in the keyboard shortcuts reference, then fix issues surfaced by a docs
review:

- index: link the orphaned features/seconv.md page into the nav
- ocr: fix broken zoom shortcut cells (Ctrl++ / Ctrl+-)
- edit: reconcile collapse/expand prose with table (Ctrl+Shift++ / Ctrl+Shift+-),
  matching the code default
- supported-formats: clarify 380+ count covers text, binary and image formats
- shortcuts: remove duplicated key-capture instruction
- assa-override-tags: drop mislabeled "n (close B-spline)" drawing command,
  close alpha example values with trailing &, remove duplicated Notes bullets,
  fix "See Also" link text
- webvtt: clarify WHATWG origin / W3C standardization; drop non-standard
  "green" cue color class
- faq + sync feature pages: standardize menu name on "Synchronization" and
  "ASSA tools" to match the actual UI

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant