helge17 / tuxguitar

Improve TuxGuitar and provide builds
Other
489 stars 43 forks source link

new default shortcuts are not considered when upgrading app #553

Closed guiv42 closed 1 month ago

guiv42 commented 1 month ago

Scenario 1, use case: install app from scratch

  1. initial situation: TuxGuitar>=1.6.0 never launched by user, no user configuration available (just delete ~/.config/tuxguitar folder)
  2. run TuxGuitar 1.6.4
  3. open a tablature file
  4. type Ctrl+w

expected and observed behavior: current tablature file is closed

Scenario 2, use case: app upgrade

  1. same initial situation as scenario 1
  2. run TuxGuitar 1.6.0
  3. Change one keyboard shortcut with menu Tools -> Shortcuts
  4. close TuxGuitar 1.6.0
  5. run TuxGuitar 1.6.4
  6. open a tablature file
  7. type Ctrl+w

expected behavior: current tablature file is closed observed behavior: nothing happens (inconsistent with user doc)

This is a consequence of new user configuration management strategy since 1.6.0: user config is kept when app is upgraded. In scenario 2, at step 4 a new user-specific configuration file is created with customized shortcuts. Once this one exists, the default shortcuts file is no more considered. And Ctrl+w default shortcut was introduced after 1.6.0. Instead of simply overriding defaults with user-defined shortcuts, both configurations should be merged (this behavior has already been implemented for tuxguitar.cfg config file). Just take care not to override user-defined shortcuts if they conflict with defaults introduced by a new version