Custom MacOS changes

McFly1111's profile image McFly1111 posted 2 weeks ago in General Permalink

So I have been working with Claude and my requirements to add some customization/fixes to my favorite SQL Client.

The thing I am most happy with is the custom tab bar. I was so used to the tabs being left justified with icons, that this was important to me to get added back.

I am more than willing to post diffs or pull requests for any of these changes, or maybe this will give Ansgar some inspiration.

Patched build of the lazarus branch for macOS on Apple silicon — 61 HeidiSQL patches, 4 Lazarus patches.

Keyboard

  • Cmd+C/V/X/Z in the SQL editors (SynEdit binds Ctrl only, Cocoa reports Cmd as ssMeta)
  • Cmd for every app shortcut, Ctrl kept as secondary
  • LF line endings on clipboard copy, not CRLF
  • ⇧⌃⌥⌘ glyphs in menus instead of "Shift+ / Ctrl+ / Alt+ / Meta+"

Crashes and hangs

  • Crash dialog no longer deadlocks AppKit (was modal inside drawRect:)
  • Unkillable error-dialog loop on a failed Processes query — dangling list slot after FreeAndNil
  • Event editor crash from a missing parent window
  • Role manager crash on PostgreSQL less than 12
  • Crash after idling — hint window held a freed tree
  • Crash reports now print the dyld slide, so they symbolicate with atos

Painting

  • Blank panels after running a snippet — two deferred repaint passes
  • Tooltips appear at all (Cocoa cancelled every pending hint — affected all LCL apps)
  • Grid column-resize cursors

Tab bars

Cocoa centers tabs, drops icons, has no close buttons. ~600 lines replace it.

  • Left-aligned tabs with icons, close buttons, hover, wheel scrolling, add button
  • Applied to every page control — main, host, session manager, Preferences, all editors
  • OnChange/OnChanging now fire (LCL skips them when the page is set in code)

Appearance

  • Selected tree node text readable against the selection color
  • Filter-panel close glyph visible in dark mode
  • Sorting dialog buttons no longer pushed out of view
  • Grid lines, no-data placeholder, tree contrast, menu widths
  • Leftover design-time panel captions cleared

Amazon Redshift

Connects as PostgreSQL, answers as 8.0.2.

  • Process list on STV_RECENTS (pg_stat_activity returns no SQL text)
  • CANCEL <pid> instead of pg_cancel_backend()
  • ::regclass skipped — returns the OID as text, so grids addressed a table named after the number
  • Foreign-key detection skipped — needs LATERAL and ordered string_agg
  • No more negative table sizes — Redshift has no pg_class.relpages
  • DATEDIFF type mismatch
  • DDL menus disabled unless known to work

PostgreSQL

  • Switch database by reconnect (no USE) — context menu and toolbar dropdown
  • That tree level labelled "Schemas", not "Databases"
  • Connected database shown on the host tab

Features

  • Copy as JSON at the top of the grid menu, plus Copy all result tabs as JSON
  • JSON/XML auto-detected and pretty-printed in the text editor, via fpjson (no external jq)
  • Print says why it is unavailable instead of doing nothing
1 attachment(s):
  • image-1790886551437

Please login to leave a reply, or register at first.