Proposed changes to Skin.CurrentTheme and Skin.CurrentColourTheme labels

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,289
Joined: Jun 2006
Reputation: 57
Location: Earth
Post: #1
Hi guys I was wondering what you all think about changing the info labels Skin.CurrentTheme and Skin.CurrentColourTheme to not show a localized label.
Right now the code is so if the default theme is used then it gets translated out to "Skin Default" which means that it shows different things in different languages. I was wondering if anybody actually used it as a proper info label in the skin and would care about it?

The issue here is I currently use it in confluence to set a background image like so
PHP Code:
<texture fallback="special://skin/backgrounds/background.jpg">special://skin/backgrounds/$INFO[Skin.CurrentTheme].jpg</texture> 
Now this works all fine and dandy but it puts a crappy error in the log file about not being able to find "Skin Default.jpg" (for English) and then falls back to background.jpg when renaming it to skindefault.jpg would mean you don't need the fallback.

So in conclusion I was wondering do people actually use this info label and if they do what do they use it for? because seems to me like it could be used as a nice adding to themeing if used proper and not translated out. like showing certain items only if a specific theme was chosen

P.S. I don't actually need this change because I have worked about it with a "stringcompare(Skin.CurrentTheme,$LOCALIZE[15109])" so don't agree just because you think I need it agree because you think its a better idea and don't actually use it as a text label
find quote
Hitcher Offline
Skilled Skinner
Posts: 11,074
Joined: Aug 2007
Reputation: 103
Location: Eastleigh, UK
Post: #2
I'm glad you posted this because I'm using it for Alaska HD and didn't think about the string being translated.

I'm using folders for the theme background images with the default one named 'Skin default' and this as the code to display them -

PHP Code:
special://skin/backgrounds/$INFO[Skin.CurrentTheme]/background.png 

So in answer to your question I would rather it wasn't localised.
find quote
Mudislander Offline
Skilled Skinner
Posts: 1,684
Joined: Jun 2009
Reputation: 39
Post: #3
I noticed that in Confluence_Lite, and changed it without thinking about translations to 'Skin default.jpg' which obviously is a problem when translated.
So +1 for Jezz_X's proposal "to not show a localized label."

Noli illegitimi carborundum
find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,289
Joined: Jun 2006
Reputation: 57
Location: Earth
Post: #4
Yeah see this is the issue if you go and change to another language you will see your backgrounds don't load anymore and I think being able to use it as a constant like this is more beneficial that showing a label in the GUI
BTW this only affects the info label the actual label in Appearance settings will still be translated out so it only is an issue if anyone displays it off location
find quote
pecinko Offline
Donor
Posts: 3,838
Joined: Dec 2008
Reputation: 52
Location: Prague / Belgrade
Post: #5
Alternative would be to keep localization but to introduce ID numbers:

special://skin/backgrounds/$INFO[Skin.CurrentThemeID].jpg</texture>

My skins:

Amber
Quartz

find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,289
Joined: Jun 2006
Reputation: 57
Location: Earth
Post: #6
But where and how would you get the idea number from ? Since its not something that currently exist and users may create full custom one themselves

And since you have an alternative are you saying you don't want the change?
find quote
pecinko Offline
Donor
Posts: 3,838
Joined: Dec 2008
Reputation: 52
Location: Prague / Belgrade
Post: #7
(2012-05-14 09:11)Jezz_X Wrote:  But where and how would you get the idea number from ? Since its not something that currently exist and users may create full custom one themselves

And since you have an alternative are you saying you don't want the change?

No, no, no.

I was just trying to say that IF, for whatever reason, localization needs to stay, theme IDs could be used.

Theme ID would be defined by skinner, very similar to container ID stays the same while viewtype label changes as it is localized. I'm fine with either.

My skins:

Amber
Quartz

find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,289
Joined: Jun 2006
Reputation: 57
Location: Earth
Post: #8
Did a pull request for this too add it to june release https://github.com/xbmc/xbmc/pull/990
find quote
SpaceMonkey Offline
Posting Freak
Posts: 1,162
Joined: Aug 2008
Reputation: 24
Location: Finland
Post: #9
Stupid question but i have to ask.. where is the actual value for the Skin.CurrentTheme defined?

In Confluence the default theme is named SKINDEFAULT, does this mean that texturepacker was ran with something like this:

Code:
START /B /WAIT C:\SkinBuilder\TexturePacker -dupecheck -input SKINDEFAULT\media -output BUILD\SKINDEFAULT\media\Textures.xbt

And why the colors file can be named defaults.xml if the skin theme is named SKINDEFAULT?
Huh

It would be easy to test IF i had a Windows machine laying around.
(This post was last modified: 2013-01-12 12:14 by SpaceMonkey.)
find quote