Button in Settings that opens the config folder #45

Closed
opened 2026-10-09 16:06:03 +02:00 by Sansan · 1 comment
Owner

Add a button in the Settings popup that opens the folder with config.ini, settings.cfg, the cached characters and songs, so the user doesn't have to look up where ~/.config/MusicPlayer or %APPDATA%\MusicPlayer is.

Plan

  • popups/SettingsPopup.tscn: an "Open config folder" button, e.g. a row under Fullscreen. Style it with the theme like the other buttons.
  • popups/settings_popup.gd: on press, DirAccess.make_dir_recursive_absolute(Settings.config_dir()), then OS.shell_show_in_file_manager(Settings.config_dir()). Use OS.shell_open as a fallback on platforms where that fails, and log a warning on error.
  • Optional: the folder path as the tooltip.
  • _fit_to_rows() already resizes the panel for the new row.

Tests

  • Integration test that the button exists and is enabled in both server and offline mode.
  • Opening the file manager can't be checked headless. Move the call into a small function the test can replace, or only test the path it uses (Settings.config_dir(), which honours MUSICPLAYER_CONFIG_DIR).

Small, MusicPlayer only.

Add a button in the Settings popup that opens the folder with `config.ini`, `settings.cfg`, the cached characters and songs, so the user doesn't have to look up where `~/.config/MusicPlayer` or `%APPDATA%\MusicPlayer` is. ## Plan - `popups/SettingsPopup.tscn`: an "Open config folder" button, e.g. a row under Fullscreen. Style it with the theme like the other buttons. - `popups/settings_popup.gd`: on press, `DirAccess.make_dir_recursive_absolute(Settings.config_dir())`, then `OS.shell_show_in_file_manager(Settings.config_dir())`. Use `OS.shell_open` as a fallback on platforms where that fails, and log a warning on error. - Optional: the folder path as the tooltip. - `_fit_to_rows()` already resizes the panel for the new row. ## Tests - Integration test that the button exists and is enabled in both server and offline mode. - Opening the file manager can't be checked headless. Move the call into a small function the test can replace, or only test the path it uses (`Settings.config_dir()`, which honours `MUSICPLAYER_CONFIG_DIR`). Small, MusicPlayer only.
Sansan added the improvement label 2026-10-09 16:06:03 +02:00
Sansan added this to the 2.0.0 milestone 2026-10-09 17:49:01 +02:00
Author
Owner

Done in 06f457b on develop.

Done in 06f457b on develop.
Sign in to join this conversation.