Bug 379280 - broken config system
Summary: broken config system
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Monitor widgets (show other bugs)
Version: 5.9.5
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Marco Martin
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2017-04-27 08:54 UTC by Harald Sitter
Modified: 2020-01-13 09:36 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Sitter 2017-04-27 08:54:57 UTC
- add network monitor
- configure
- deselect all interfaces

at this point the config will re-enable everything again because ConfigGeneral.qml's `onCfg_sourcesChanged` handler simply sets everything checked if no sources are configured....

This is suuuuuuuuuuuuuuuuuuuuuuuuper fucked up as obviously this makes no sense and makes the user freak out. Also it's reaching excessive levels of WTF when dealing with many interfaces (or cpus etc.) where you may only want one or two and a misclick or not knowing this bug you deselect everything and then you get to start from scratch.

From looking at the overall code I get the impression there is simply no support for "nothing was configured", making the code assume length==0==notConfigured==enableEverything. Which has backing in ConfigGeneral.qml by forcing the UI to check everything if the array is empty.
Supposedly adding a second configuration value `configured` as boolean would do the trick which is set the first time the config is written, then (!configured == enableAllSources) and (configured == enableSourcesFromArray).
Comment 1 Alexander Mentyu 2018-02-20 11:00:22 UTC
I have a couple suggestions for this issue:
1. when starting network monitor for the first time - display all interfaces in settings as enabled - they are disabled checkboxes currently.
2. allow to deselect all checkboxes - and display info text 'no interfaces are selected' in the widget with possible button 'Configure...' which will load widget interfaces settings.

There are some bugs caused by auto selecting functionality - for example - try to load the widget - go to settings select all interfaces - close settings - enter settings again and try to select one checkbox - as a result all of them are selected after clicking only on one of them

Plasma: 5.12.1
Apps: 17.12.2
Frameworks: 5.43.0
Qt: 5.10.1
Kernel: 4.14.20-2-MANJARO
OS: Netrunner Rolling
Comment 2 Nate Graham 2020-01-13 06:06:51 UTC
You can no longer deselect all interfaces; if you try to uncheck the last checked checkbox, it won't let you.

Is there still a problem here?
Comment 3 Harald Sitter 2020-01-13 09:36:46 UTC
Seems fixed indeed.