Kodi Community Forum

Full Version: <visible> based on font selected in settings
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there anyway to use a <visible> based on what font has been selected in Settings > Appearance > Skin > Font?

I'm guessing not, but thought I would throw the question out there.
I took the RSS feed (in Home.xml) in Confluense (that has Fontsets) and tried a load of combinations just in case and none worked, just for the kicks, as I cant imagine a way with the listed infolabels or other.

I used this boolean with id=Arial and XXX=Fonts/Font/Fontset (without cap also)

Skin.HasXXX(id)

Skin.HasSetting(id) / Skin.HasSetting(XXX,id)

SubString(XXX,id)

System.XXX.id


The problem is I don't really know how the "conditions are set" in XBMC, if there has to be an explicit instruction for the "tag" or you can probably use a "condition tag" in combination with an "instructuion tag" and i missing the "tag" for Fontset. Don't know squat about programming per se, so don't mind my words if I don't make sense or I'm rumbling nonsense.



Not very helpful post, I know.
stoli Wrote:Is there anyway to use a <visible> based on what font has been selected in Settings > Appearance > Skin > Font?

I'm guessing not, but thought I would throw the question out there.

I would guess you can use lookandfeel.font from guisettings.xml, not sure how though. I tried using conditionals based on what shutdown action was set, but couldn't figure it out. The wiki page for infolabels says:
Quote:System.GetBool(boolean)
Returns the value of any standard system boolean setting. Will not work with settings in advancedsettings.xml

but since my value wasn't a boolean that didn't work, and neither is lookandfeel.font ... it works for lookandfeel.enablerssfeeds though, but that is a boolean so. Smile

And, AFAIK, there's only Skin.HasSetting() so ... anyone with more insight? Smile
Already tried the GetBool when I see it in the condition for the RSS, didn't knew about the guisettings.xml, anyway didn`t work in any variation.

filigran Wrote:but since my value wasn't a boolean that didn't work, and neither is lookandfeel.font ... it works for lookandfeel.enablerssfeeds though, but that is a boolean so. Smile

Where do you get that enablerssfeeds is a boolean? and font isn't? Because neither are listed as such, the only difference is one is a variable with 2 (false or true) options and the other is infinite. The only thing I can think off why this might not work is because the rssfeed is set (input) through the xbmc engine and the font is an option (input) read from the files of the skin and the system.getbool instruction doesn't really look in the guisettings. Fuck I hate being so freaking clueless and don't have time to learn Phyton or XBMC "engine" if that's what is needed.


From the guisettings.xml I get that no matter what variable I try it always returns false or empty, but don't know if this is relevant or that lines there are a mistake of my own:

Code:
    Line 1802:         <setting type="bool" name="skin.confluence.arial">false</setting>
    Line 1804:         <setting type="bool" name="skin.confluence.arial based">false</setting>
    Line 1805:         <setting type="bool" name="skin.confluence.font,arial">false</setting>
    Line 1806:         <setting type="bool" name="skin.confluence.fontset,arial">false</setting>
    Line 1807:         <setting type="bool" name="skin.confluence.fonts,arial">false</setting>
    Line 2624:         <setting type="string" name="skin.confluence.arial"></setting>

And from Debug i get this with every variation:

Code:
16:02:20 T:244 M:2887495680   DEBUG: Activating window ID: 10019
16:02:20 T:244 M:2887499776   DEBUG: Checking if window ID 10019 is locked.
16:02:20 T:244 M:2887499776   DEBUG: ------ Window Deinit (SettingsCategory.xml) ------
16:02:20 T:244 M:2887475200   DEBUG: ------ Window Init (SettingsCategory.xml) ------
16:02:20 T:244 M:2887499776    INFO: Loading skin file: SettingsCategory.xml
16:02:20 T:4964 M:2887491584   DEBUG: thread start, auto delete: 1
16:02:20 T:4964 M:2887491584   DEBUG: Win32DllLoader::Load(special://xbmcbin/system/ImageLib.dll)
16:02:22 T:244 M:2885959680   DEBUG: SDLKeyboard: scancode: 77, sym: 275, unicode: 0, modifier: 0
16:02:22 T:244 M:2885959680   DEBUG: CApplication::OnKey: 61479 pressed, action is Right
16:02:23 T:244 M:2886103040   DEBUG: SDLKeyboard: scancode: 80, sym: 274, unicode: 0, modifier: 0
16:02:23 T:244 M:2886103040   DEBUG: CApplication::OnKey: 61480 pressed, action is Down
16:02:23 T:244 M:2886217728   DEBUG: SDLKeyboard: scancode: 80, sym: 274, unicode: 0, modifier: 0
16:02:23 T:244 M:2886217728   DEBUG: CApplication::OnKey: 61480 pressed, action is Down
16:02:23 T:244 M:2886250496   DEBUG: SDLKeyboard: scancode: 80, sym: 274, unicode: 0, modifier: 0
16:02:23 T:244 M:2886250496   DEBUG: CApplication::OnKey: 61480 pressed, action is Down
16:02:23 T:244 M:2886324224   DEBUG: SDLKeyboard: scancode: 80, sym: 274, unicode: 0, modifier: 0
16:02:23 T:244 M:2886324224   DEBUG: CApplication::OnKey: 61480 pressed, action is Down
16:02:24 T:244 M:2886254592   DEBUG: SDLKeyboard: scancode: 77, sym: 275, unicode: 0, modifier: 0
16:02:24 T:244 M:2886254592   DEBUG: CApplication::OnKey: 61479 pressed, action is Right
16:02:24 T:244 M:2886225920   DEBUG: SDLKeyboard: scancode: 72, sym: 273, unicode: 0, modifier: 0
16:02:24 T:244 M:2886225920   DEBUG: CApplication::OnKey: 61478 pressed, action is Up
16:02:25 T:244 M:2886139904   DEBUG: SDLKeyboard: scancode: 77, sym: 275, unicode: 0, modifier: 0
16:02:25 T:244 M:2886139904   DEBUG: CApplication::OnKey: 61479 pressed, action is Right
16:02:25 T:244 M:2886189056   DEBUG: SDLKeyboard: scancode: 28, sym: 13, unicode: 13, modifier: 0
16:02:25 T:244 M:2886189056   DEBUG: CApplication::OnKey: 61453 pressed, action is Select
16:02:28 T:244 M:2887946240    INFO:   delete old skin...
16:02:28 T:244 M:2887946240   DEBUG: CGUIAudioManager::DeInitialize
16:02:28 T:244 M:2887946240   DEBUG: ------ Window Deinit (SettingsCategory.xml) ------
16:02:28 T:244 M:2887778304   DEBUG: ------ Window Deinit (Pointer.xml) ------
16:02:28 T:244 M:2887778304   DEBUG: ------ Window Deinit (DialogMuteBug.xml) ------
16:02:28 T:244 M:2891169792    INFO:   load skin from:D:\Programas\XBMC\addons\skin.confluence
16:02:28 T:244 M:2892902400    INFO: Default 4:3 resolution directory is D:\Programas\XBMC\addons\skin.confluence\720p
16:02:28 T:244 M:2892898304    INFO: Default 16:9 resolution directory is D:\Programas\XBMC\addons\skin.confluence\720p
16:02:28 T:244 M:2893254656    INFO: Loading skin includes from D:\Programas\XBMC\addons\skin.confluence\720p\includes.xml
16:02:28 T:244 M:2892988416    INFO:   load fonts for skin...
16:02:28 T:244 M:2892976128    INFO: Loading fonts from D:\Programas\XBMC\addons\skin.confluence\720p\Font.xml
16:02:28 T:244 M:2887307264    INFO:   load new skin...
16:02:28 T:244 M:2887307264    INFO: Loading skin file: Home.xml
[b]16:02:28 T:244 M:2886565888   DEBUG: Error: Requested setting (font.arial) was not found.  It must be case-sensitive[/b]
16:02:28 T:244 M:2886565888    INFO: Loading user windows, path D:\Programas\XBMC\addons\skin.confluence\720p
16:02:28 T:244 M:2885509120   DEBUG: Load Skin XML: 27.88ms
16:02:28 T:244 M:2885509120    INFO:   initialize new skin...
16:02:28 T:244 M:2885509120    INFO: Loading skin file: Pointer.xml
16:02:28 T:244 M:2885308416    INFO: Loading skin file: DialogVolumeBar.xml
16:02:28 T:244 M:2885304320    INFO: Loading skin file: DialogSeekBar.xml
16:02:28 T:244 M:2884931584    INFO: Loading skin file: DialogKaiToast.xml
16:02:28 T:244 M:2884894720    INFO: Loading skin file: DialogMuteBug.xml
16:02:28 T:244 M:2884874240   DEBUG: CGUIAudioManager::Initialize
16:02:28 T:244 M:2884874240    INFO: Loading D:\Programas\XBMC\addons\skin.confluence\sounds\sounds.xml
16:02:28 T:244 M:2884853760    INFO:   skin loaded...

Tried changing the Font id as it is in cap and no luck, tried every variation that I could think off and no luck.

So I don´t know, logic tells me it should work, but...
KiSUAN Wrote:Already tried the GetBool when I see it in the condition for the RSS, didn't knew about the guisettings.xml, anyway didn`t work in any variation.



Where do you get that enablerssfeeds is a boolean? and font isn't?

Well, in my guisettings.xml I have this for enablerssfeeds:
Code:
...
    <enablerssfeeds>false</enablerssfeeds>
...
While the font is a string:
Code:
...
    <font>Default</font>
...
A boolean = true or false, 0 or 1 etc. Hence, system.getbool cannot fetch the value (which to me makes it odd that it's an infolabel, and not a builtin function, anyhoo...) of <font>. There should be a System.GetString. Found this when googling a bit: http://forum.xbmc.org/showthread.php?p=282705 - not much activity on the ticket: http://trac.xbmc.org/ticket/5894

But atleast someone else requested the same thing. Smile
Ok, thanks, I´ll move on as it seems impossible.