It is currently November 28th, 2021, 4:53 am

[Suggestion] Suppress !DeactivateConfig warnings in the log

Report bugs with the Rainmeter application and suggest features.
User avatar
SilverAzide
Rainmeter Sage
Posts: 1666
Joined: March 23rd, 2015, 5:26 pm

[Suggestion] Suppress !DeactivateConfig warnings in the log

Post by SilverAzide »

Hello,
I have a suggestion for a very minor enhancement to the !DeactivateConfig bang.

Sometimes folks have skins with a parent-child relationship. For example, a configuration skin with a pop-up color picker skin, or a weather skin with a pop-up "location picker" skin. It is possible in these scenarios to close the parent skin and leave the child skin active, which isn't a huge deal, but is just a little messy. The simple fix for this is when closing a parent, to deactivate all child skins to clean everything up.

Unfortunately, deactivating a skin that isn't active leaves an annoying message in the log:
!DeactivateConfig: "MySkin" not active

I'm not sure how helpful that message is, but in any case there's precedent elsewhere for suppressing unwanted log messages (like WebParser). Could a tweak be added to suppress !DeactivateConfig logging for these type of "close skin whether it's open or not" type of use cases?

I know it is possible to use the ConfigActive plug-in and some additional coding to get fancy, but the ROI for all that is pretty low. I guess for completeness, !DeactivateConfigGroup would also need this same tweak. EDIT: !DeactivateConfigGroup does not output a log message, as described below.

Thanks for listening!
Last edited by SilverAzide on November 28th, 2020, 12:33 am, edited 1 time in total.
Gadgets Wiki GitHub More Gadgets...
User avatar
balala
Rainmeter Sage
Posts: 13492
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [Suggestion] Suppress !DeactivateConfig warnings in the log

Post by balala »

SilverAzide wrote: November 27th, 2020, 8:49 pm I guess for completeness, !DeactivateConfigGroup would also need this same tweak.
!DeactivateConfigGroup is perfect, avoiding the error message.
To check, replace the !DeactivateConfig bangs with a [!DeactivateConfigGroup "MyGroup"] (use a non-existing config group name). Additionally it's easier to use such a bang, being much shorter than the numerous !DeactivateConfig bangs.
So just include the "child" configs into a group and use !DeactivateConfigGroup.
User avatar
SilverAzide
Rainmeter Sage
Posts: 1666
Joined: March 23rd, 2015, 5:26 pm

Re: [Suggestion] Suppress !DeactivateConfig warnings in the log

Post by SilverAzide »

balala wrote: November 27th, 2020, 9:37 pm !DeactivateConfigGroup is perfect, avoiding the error message.
To check, replace the !DeactivateConfig bangs with a [!DeactivateConfigGroup "MyGroup"] (use a non-existing config group name). Additionally it's easier to use such a bang, being much shorter than the numerous !DeactivateConfig bangs.
So just include the "child" configs into a group and use !DeactivateConfigGroup.
Excellent! Thanks for the tip! :thumbup:
Gadgets Wiki GitHub More Gadgets...
User avatar
balala
Rainmeter Sage
Posts: 13492
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [Suggestion] Suppress !DeactivateConfig warnings in the log

Post by balala »

SilverAzide wrote: November 27th, 2020, 9:48 pm Excellent! Thanks for the tip! :thumbup:
Did you try it out? Did it supress the message?
User avatar
SilverAzide
Rainmeter Sage
Posts: 1666
Joined: March 23rd, 2015, 5:26 pm

Re: [Suggestion] Suppress !DeactivateConfig warnings in the log

Post by SilverAzide »

balala wrote: November 27th, 2020, 9:51 pm Did you try it out? Did it supress the message?
Yep, works great and it's easier too, as you mentioned.
Gadgets Wiki GitHub More Gadgets...
User avatar
balala
Rainmeter Sage
Posts: 13492
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [Suggestion] Suppress !DeactivateConfig warnings in the log

Post by balala »

SilverAzide wrote: November 28th, 2020, 12:32 am Yep, works great and it's easier too, as you mentioned.
I'm glad. :great: