eterm: fix configuration and window state persistence

- load preferences and window state from their configuration files
  - persist CLI overrides after applying them
  - capture window state before closing the native window
  - restore window position and defer maximization until initialization completes
  - avoid applying pixel density twice when restoring window dimensions
  - display active keybindings in terminal and tab context menus
  - add the New Terminal context-menu action
This commit is contained in:
Martín Lucas Golini
2026-09-09 11:35:35 -03:00
parent 71ede34599
commit 410c9ba09f
5 changed files with 94 additions and 40 deletions
+4 -4
View File
@@ -12,13 +12,13 @@ namespace eterm {
AppConfig::AppConfig( std::string configPath ) : mConfigPath( std::move( configPath ) ) {
FileSystem::dirAddSlashAtEnd( mConfigPath );
mIni.path( mConfigPath + "eterm.ini" );
mState.path( mConfigPath + "eterm.state.ini" );
mIni.path( mConfigPath + "config.cfg" );
mState.path( mConfigPath + "state.cfg" );
}
void AppConfig::load() {
mIni.readFile();
mState.readFile();
mIni.loadFromFile( mIni.path() );
mState.loadFromFile( mState.path() );
terminal.shell = mIni.getValue( "terminal", "shell", terminal.shell );
terminal.shellArguments =
mIni.getValue( "terminal", "shell_arguments", terminal.shellArguments );