MikeSiLVO / script.skinshortcuts

GNU General Public License v2.0
18 stars 21 forks source link

[Bug/Request] Pass InfoLabel as Widget Label #19

Closed drinfernoo closed 4 years ago

drinfernoo commented 4 years ago

I'm currently working on add-on which populates a window property in order to have a dynamic title for one of its menu items. The title for the item looks something like $INFO[WIndow(10000).Property(my_property)]. Unfortunately, since this InfoLabel is evaluated during the time that the Skin Shortcuts dialog is building the list of items, the "evaluated" label appears to get passed through as widgetName.

If there any way to have this InfoLabel remain intact when set as widgetName? Ideally, the folder inside the selector dialog would show the value of the InfoLabel (as is accomplished on https://github.com/mikesilvo164/script.skinshortcuts/blob/a849e64a56aae7eebd3207583dc9954cae3b77b9/resources/lib/library.py#L548-549), but the final widgetName that gets used as the label for the widget would be the "unparsed" InfoLabel.

Is this possible?

drinfernoo commented 4 years ago

After poking around in the code quite a bit this afternoon, I've come to the realization that I just don't understand what a lot of this codebase does 😅 The lines I linked to in my previous comment do appear to be where the "logic" is happening in order to parse the InfoLabel, but it also appears to be the sole place where that label is set, as far as I can tell. This means that whatever the value of displayLabel is after those lines will be propagated into the widgetName parameter... somewhere. I just can't find where...

In any case, my proposed solution would be to build the explorer dialog using the parsed path, but set the property as the unparsed version.