Skip to content

Show data filename in window title#29

Merged
koldunovn merged 2 commits intomainfrom
feature/directory-in-title
Apr 8, 2026
Merged

Show data filename in window title#29
koldunovn merged 2 commits intomainfrom
feature/directory-in-title

Conversation

@koldunovn
Copy link
Copy Markdown
Collaborator

@koldunovn koldunovn commented Apr 8, 2026

Summary

  • Window title bars (control + image) and the title label now show the data source: ushow - filename.nc
  • Multi-file sets show: ushow - pattern (N files)
  • Uses strrchr for portable basename extraction

Addresses item 3 from #24.

Test plan

  • Open a single NetCDF file — title shows ushow - filename.nc
  • Open MITgcm directory data — title shows directory name
  • Open multi-file glob — title shows ushow - pattern (N files)
  • Both control window and image popup show the same title

Adds x_update_title() which sets the window manager title on both
the control and image windows, plus the title label widget, to
"ushow - <name>". Called after file open with the basename of
the data source. Multi-file sets show "name (N files)".
For glob patterns and multi-file arguments, title shows
"ushow - first_file.nc (N files)" using the first expanded filename.
@koldunovn koldunovn merged commit b6a3abe into main Apr 8, 2026
5 checks passed
@koldunovn koldunovn mentioned this pull request Apr 8, 2026
4 tasks
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