It is currently August 19th, 2022, 8:10 pm

Improvements to warnings: Activate/Deactivate/ToggleConfig and sending bangs to other skins

Report bugs with the Rainmeter application and suggest features.
User avatar
Active Colors
Moderator
Posts: 1173
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Improvements to warnings: Activate/Deactivate/ToggleConfig and sending bangs to other skins

Post by Active Colors »

I certainly don't like the way the log shows the warnings related to the cases like deactivating an inactive skin or sending bangs to an inactive skin.

There were several reports about this as well:
https://forum.rainmeter.net/viewtopic.php?t=36450
https://forum.rainmeter.net/viewtopic.php?t=38328
https://forum.rainmeter.net/viewtopic.php?t=40917


When deactivating an inactive skin, Rainmeter shows: !DeactivateConfig: "illustro\Clock" not active
When sending bangs to an inactive skin, Rainmeter shows: !UpdateMeter: Skin "illustro\Clock" not found

These two log messages are confusing and inconsistent because:
  1. !DeactivateConfig: "illustro\Clock" not active → By not active the log means the skin is not running. However, when you try to deactivate a skin that does NOT exist then the error will be again not active. But when you try to activate a skin that does not exist it will show again not active. Logically, if a skin does not exist, then the warning should show not found instead of not active. But there is a confusion with not found too.
  2. !UpdateMeter: Skin "illustro\Clock" not found → By not found the log can imply that the config does not exist, but in reality it does exist. For example, when you try using !WriteKeyValue to write into a file that does not exist - it will show that the file is not found: !WriteKeyValue: File not found: E:\Rainmeter\Skins\illustro\Block\Clock.ini. But when you try to update a skin that is not running but does exist - it will show not found too. So, two different cases but the same wording.

I explored other cases and found some more inconsistencies:
  • - deactivate inactive config: [!DeactivateConfig "illustro\Clock"]!DeactivateConfig: "illustro\Clock" not active
    - deactivate inexisting config: [!DeactivateConfig "illustro\Block"]!DeactivateConfig: "illustro\Block" not active
    - activate inexisting config: [!ActivateConfig "illustro\Block"]!ActivateConfig: Invalid parameters
    - activate inexisting skin: [!ActivateConfig "illustro\Clock" "Block.ini"]!ActivateConfig: Invalid parameters

    - activate active skin: [!ActivateConfig "illustro\Clock" "Clock.ini"]!ActivateConfig: "illustro\Clock" already active
    - activate active config: [!ActivateConfig "illustro\Clock"]Nothing

    - toggle inexisting config: [!ToggleConfig "illustro\Block"]!ActivateConfig: Invalid parameters (why !ActivateConfig if it is !ToggleConfig?)
    - toggle inexisting skin within inactive skin: [!ToggleConfig "illustro\Clock" "Block.ini"]!ActivateConfig: Invalid parameters
    - toggle inexisting skin within active config: [!ToggleConfig "illustro\Clock" "Block.ini"]Deactivates the active skin if the config exists!

    - send bang to inactive config: [!SetOption meterDay FontSize "20" "illustro\Clock\"]!SetOption: Skin "illustro\Clock" not found
    - send bang to inactive skin: [!SetOption meterDay FontSize "20" "illustro\Clock\" "Clock.ini"]!SetOption: Skin "illustro\Clock" not found
    - send bang to inexisting config: [!SetOption meterDay FontSize "20" "illustro\Block\"]!SetOption: Skin "illustro\Block\" not found
    - send bang to inexisting skin within inactive config: [!SetOption meterDay FontSize "20" "illustro\Clock\" "Block.ini"]!SetOption: Skin "illustro\Clock\" not found
    - send bang to inexisting skin within active config: [!SetOption meterDay FontSize "20" "illustro\Clock\" "Block.ini"]Sends bang to the active skin if the config exists!

The following steps could be taken to resolve the inconsistencies and make the logs better:
1. The hardest part: Make Rainmeter actually verify if a config folder or skin file actually exist.
2. Then, make the wordings to be consistent. Make it clear when a config/skin is "not active" and when it is "not found".
3. Make "not active" to be a Notice because if a skin/config exists but is inactive, there is nothing wrong. But make "not found" to be an Error because if a specified config/skin does not exist, there is something indeed wrong.

And only then, additionally, there could be a skin-level option that would let you hide the "not active" errors. For example in a skin's [Rainmeter] section it could be something like WarnOnNotFoundConfig=0.


Overall, if Rainmeter learns whether a file or config actually exist, it will be able to judge better whether something is a fatal error or not, and provide a better logs.
What do you think?

Rainmeter 4.5.13.3632 (64-bit)
Language: English (1033)
Build time: 2022-03-23 15:23:40
Windows 7 Professional 64-bit (build 7601) Service Pack 1 - English (1033)
Path: C:\Program Files\Rainmeter\
SkinPath: E:\Custo\Rainmeter\Skins\
SettingsPath: C:\Users\Focus\AppData\Roaming\Rainmeter\
IniFile: C:\Users\Focus\AppData\Roaming\Rainmeter\Rainmeter.ini