GUI Toggle option and Adding config option#129
Conversation
|
INFO: No unicode characters found in PR's commits (source) |
Excellent question. I think having it apply on the next app start is fine. Because, you're right, otherwise it would be a very complicated implementation. And it's not worth the effort. We should just notify the user that, when they change this setting, it won't apply until the app is restarted. For this, you might want to implement the option as a BusKillSettingsComplexOption, defined in |
|
INFO: No unicode characters found in PR's commits (source) |
|
Should I change the wordings used ? |
|
somewhat related: I broke the builds by signing the dependencies with the wrong key when trying to work on another ticket. But I just fixed it. |
|
@Raihan93-coder did you test clicking the "Reset" button on the top-right of the Settings screen? I'm getting some crashes when I try |
|
Also, we should add some icons to the json. You can view the available material design icons here: In the browser, you can click on an icon to view its Perhaps you could use article ( |
|
INFO: No unicode characters found in PR's commits (source) |
|
I’ve made the changes you requested. Also, I didn’t test the reset button earlier (my bad 😅), but the issue is resolved now. The crash was happening because the new Kivy config setting for persistent_log didn’t have a default value defined. So when the user clicked Reset, Kivy tried to restore a default value that didn’t exist, which caused the crash. I've fixed it by adding persistent_log to the default settings in the GUI, and the reset functionality is working as expected now. |
|
INFO: No unicode characters found in PR's commits (source) |
|
INFO: No unicode characters found in PR's commits (source) |
|
INFO: No unicode characters found in PR's commits (source) |
1) Adding persistent log variable to the config file ( easier user understanding )
I have made the small change of adding the config option persistent log to config.ini
The implementation is using just string concatenation in line
contents = "[buskill]\npersistent_log = False\n" # Updating the config optionAs I didn't find any existing architecture that writes to the config file. This works for both GUI and CLI
In the past when we run CLI only
[buskill]option will be available ( The rest of the config was actually of kivy )
I hope this implementation is fine
2) GUI toggle option in setting
I have a question about the expected behavior.
Since logging is initialized very early in main.py before the GUI is launched, should changing the persistent_log setting in the GUI only affect future launches of BusKill?
Or would you like the logging destination to be reconfigured immediately when the user toggles the option in Settings? ( Which I think will be really hard to implement )
Same Question