Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: remove magic numbers in configuration #125

Open
wxl opened this issue Jul 15, 2019 · 3 comments
Open

feature request: remove magic numbers in configuration #125

wxl opened this issue Jul 15, 2019 · 3 comments

Comments

@wxl
Copy link
Member

wxl commented Jul 15, 2019

In the configuration file, shortcuts are appended with a period and a number, indicating its sequence in the list. These numbers change, however, and are ultimately pointless. They further complicate modifying configuration files by hand rather than from the GUI.

Expected Behavior

There's no magic numbers in the configuration file.

Current Behavior

Magic numbers create all sorts of madness.

Possible Solution

Remove the numbers in the configuration file and merely let the code create the enumeration in the GUI based on some default sorting methodology. In this case, where the definitions appeared in the file wouldn't matter.

The one case where it seems to make sense to indicate a difference between shortcuts (perhaps through numbers) is if there are two definitions for the same shortcut. This wouldn't make sense if they were both enabled but one could be enabled and one could be disabled. In this case, it would be good to append a number to the shortcut. There could be logic to check for duplicates and renumber them as needed.

System Information
  • Distribution & Version: Lubuntu 19.10
  • Kernel: 5.0.0
  • Qt Version: 5.12.2
  • liblxqt Version: 0.14.1
  • lxqt-build-tools Version: 0.6.0
  • Package version: 0.14.1
@agaida
Copy link
Member

agaida commented Aug 22, 2019

Second that with my whole heart :D, reason in the next bug.

@tsujan
Copy link
Member

tsujan commented Aug 22, 2019

I agree too.

@tsujan
Copy link
Member

tsujan commented Aug 23, 2019

I changed my mind because the code allows a key sequence to be repeated but decides which one should be activated. IMO, that's acceptable. The appended numbers are needed for such a design.

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

No branches or pull requests

3 participants