mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-10-01 18:50:16 +03:00
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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user