Skip to content

GUI Toggle option and Adding config option#129

Open
Raihan93-coder wants to merge 2 commits into
BusKill:devfrom
Raihan93-coder:GUI-toggle-option
Open

GUI Toggle option and Adding config option#129
Raihan93-coder wants to merge 2 commits into
BusKill:devfrom
Raihan93-coder:GUI-toggle-option

Conversation

@Raihan93-coder

Copy link
Copy Markdown

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 option

As 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

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

INFO: No unicode characters found in PR's commits

(source)

@maltfield

Copy link
Copy Markdown
Member

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 )

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 settings_buskill.json -- making use of the "confirmation" key in the json, where you can add a notice to the user that a restart is required before they confirm. For more info, see this json file how I've implemented the trigger option

@github-actions

Copy link
Copy Markdown

INFO: No unicode characters found in PR's commits

(source)

@Raihan93-coder

Copy link
Copy Markdown
Author

Should I change the wordings used ?

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

Successfully merging this pull request may close these issues.

2 participants