• All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.
Issue Details (XML | Word | Printable)

Key: VWR-457
Type: New Feature New Feature
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Christian Prior
Votes: 2
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
1. Second Life Viewer - VWR

Add a 'skin selector' and supporting logic to allow a user to select an xul skin to use for an SL session

Created: 16/Apr/07 10:01 AM   Updated: 25/Jun/08 12:24 PM
Return to search
Component/s: User Interface
Affects Version/s: Source code
Fix Version/s: None

File Attachments: None
Image Attachments:

1. newui.jpg
(104 kB)
Environment: (All)
Issue Links:
Duplicate
Relates
 


 Description  « Hide
Change the structure of the skins/XUL directory for the viewer from:

/skins
/xui
/en_us
/es
/fr
etc etc etc...

/skins
/xui
/default
/en_us
/es
/fr
etc etc etc...
/skin1
/en_us
/es
/fr
etc etc etc...
/skin2
/en_us
/es
/fr
etc etc etc...

The file paths.xml, residing in the /skins directory in the application package used to contain 2 elements. One pointed to /skins/xui/en_us, the other to /skin/xui/[Language]. This was modified to always perform localization, but allow any number of custom skins to choose from. Each element in the file contains a skinname attribute (what we want to call our skin). We also provide an enabled attribute for each skin element, which can hold a value of either "true" or "false". At any time, only one of the directory elements should have enabled set to "true".

<paths>
<directory enabled="true" skinname="Default">/skins/xui/default/[Language]/</directory>
<directory enabled="false" skinname="Skin 1">/skins/xui/skin1/[Language]/</directory>
<directory enabled="false" skinname="Skin 2">/skins/xui/skin2/[Language]/</directory>
</paths>

  • Modifications to lluictrlfactory.cpp, lluictrlfactory.h

LLUICtrlFactory::LLUICtrlFactory()

This is where the paths.xml file is parsed and the mXUIPaths vector is populated with each directory element. Made some minor code tweaks here to allow the new file format to be parsed correctly.

LLUICtrlFactory::getLayeredXMLNode(const LLString &filename, LLXMLNodePtr& root)

Tweaked code to read the paths which were parsed, and find the enabled one. This string is then suffixed with the filename (e.g. mypanel.xml) and we get the correct skin for the component.

  • Modifications to panel_login.xml

Added a button used to trigger skin selector floater dialog pop up.

  • Modifications to llpanellogin.cpp, llpanellogin.h

Added callback functionality for skin selection button mentioned above.

  • Addition of floater_skin_selector.xml

Provide a combo box enabling the user to select a new skin. The skinname attribute for each of the <directory> elements in paths.xml are displayed in the combo box.
Addition of llfloaterskinselector.cpp, llfloaterskinselector .h

Added callback functionality for the widgets defined in floater_skin_selector.xml. Added functionality to populate combo with data from the XMLNodePtr objects stored in the mXUIPaths vector as well.

  • Modified alerts.xml

Modified alerts.xml to add a skin selection success dialog to display to the user after applying a skin change.

Can provide patch; seeking feedback on method first.

Christian Prior
christian@electricsheepcompany.com



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Lex Neva added a comment - 18/Apr/07 08:37 AM
How much utility do you think you'll be able to get out of this kind of thing? What can we do with the XML UI? As far as I could tell from my brief poking in it (pre-open source SL) most of the UI structure is still, to some degree, written into the client, in that it's looking for specific UI elements in specific places in the XML tree. I noticed you called it an "XUL skin" in the issue short-description, but I think that SL's skin system is nowhere near as flexible as, say, Firefox's XUL system.

Smiley Barry added a comment - 27/Apr/07 09:04 AM
Lex is right, although if skinning a motorola phone (which is binary, and not even one word displayed) is quite easy for us modders, i think we'll find a way into this.

Smiley Barry added a comment - 20/May/07 12:17 PM
Lol, sorry. *"because," instead of Although

Grazer Kline added a comment - 23/Jul/07 05:28 PM
This task is superceded by issue 1875.

Revolution Perenti added a comment - 06/Sep/07 10:41 AM
this has been talked about with myself and Benjamin Linden the theme system is going to be rewrote, already the theem system is based on Mozilla source code so yes plugin themes are going to be happening in near future, also extesions have been talked about but not confired yet unless some linden knows more please comment below.
themes will be just like firefox in near future so for now this is W.I.P lets get windlight and mono established then we can start thinking about redeign

Revolution Perenti