2012-05-06, 22:42
Hey folks,
I have an idea for quite a while now and I think it's time to see what you guys are thinking about
Introduction:
Currently there are quite a lot of things for XBMC that can be handled via advancedsettings.xml.
Some of these features are allday business for XBMC users.
I think there is a big BUT with the advancedsettings.xml.
I think some of these features do not belong into the advancedsettings.xml but more into the GUI settings.
For example the way how you enter the details of your MySQL server or just hiding the "all items" entry in file listing.
There are some attempts in GIT to move stuff from as.xml to GUI settings.
For example amet's attempt to handle the MySQL stuff inside of XBMC:
https://github.com/xbmc/xbmc/pull/451
or my attempt to move the "Hide All Items" button to it:
https://github.com/xbmc/xbmc/pull/819
Greatest problem here is that this might clutter the interface and confuse new users. So this seems to be the reason that this is
not merged into master.
Basically, the idea of having a pretty solid interface with only the most needed options is quite good but IMHO it makes
editing the as.xml and restarting XBMC not feel like an appliance.
And that's the point where my idea jumps in
My Proposal
Let's move certain features from the as.xml to GUI settings and control them via ONE new tag in as.xml.
That way the user has a clean interface by default and does not need to care about all advanced stuff.
More experienced users might enable "advanced GUI settings" with a
IMHO this combines the best of both worlds. You can easily edit your settings from within XBMC and it doesn't need a restart if it is enabled and no worry for new users.
Here we go with some proposals for settings to be transfered:
Of course these are not all but it might be a good start for it.
What needs to be done for this?
I only have taken a short glance at it, but this is definitely needed:
1) New variable in advancedsettings.h
Something like
inside the <gui> tag
2) The appropriate way to get this setting in advancedsettings.cpp
Like this:
and
3) Changing the internal variables where needed
Based on the PR I made for "Hide All Items" there should be a lot of changes like this:
Former variable:
New variable:
4) Showing the settings only for advancedguisetting == true
This should need some "if statements" in the GUISettings.cpp for the appropriate setting that moved
from as.xml to GUI settings. Didn't get around that, yet. Help appreciated!
NOTE: This is only an example from xbmc/filesystem/MusicDatabaseDirectory/DirectoryNode.cpp!
As I'm not that experienced in the XBMC codebase maybe a dev can enlighten us a bit more
Basically that's it...
Any opinions on this?
BTW: As you see, I already made some adjustments to the code. If this is something the team is interested in and someone gives me a hint
for 4) I might manage to make the appropriate changes.
Let's start the discussion...
mad-max
I have an idea for quite a while now and I think it's time to see what you guys are thinking about
Introduction:
Currently there are quite a lot of things for XBMC that can be handled via advancedsettings.xml.
Some of these features are allday business for XBMC users.
I think there is a big BUT with the advancedsettings.xml.
I think some of these features do not belong into the advancedsettings.xml but more into the GUI settings.
For example the way how you enter the details of your MySQL server or just hiding the "all items" entry in file listing.
There are some attempts in GIT to move stuff from as.xml to GUI settings.
For example amet's attempt to handle the MySQL stuff inside of XBMC:
https://github.com/xbmc/xbmc/pull/451
or my attempt to move the "Hide All Items" button to it:
https://github.com/xbmc/xbmc/pull/819
Greatest problem here is that this might clutter the interface and confuse new users. So this seems to be the reason that this is
not merged into master.
Basically, the idea of having a pretty solid interface with only the most needed options is quite good but IMHO it makes
editing the as.xml and restarting XBMC not feel like an appliance.
And that's the point where my idea jumps in
My Proposal
Let's move certain features from the as.xml to GUI settings and control them via ONE new tag in as.xml.
That way the user has a clean interface by default and does not need to care about all advanced stuff.
More experienced users might enable "advanced GUI settings" with a
Code:
<advancedsettings>
<gui>
<advancedguisettings>true</advancedguisettings>
</gui>
</advancedsettings>
IMHO this combines the best of both worlds. You can easily edit your settings from within XBMC and it doesn't need a restart if it is enabled and no worry for new users.
Here we go with some proposals for settings to be transfered:
- useddsfanart
- playcountminimumpercent
- splash
- enablemultimediakeys
- algorithmdirtyregions
- fullscreen
- MySQL settings
- Hide All Items
- plus many many more
Of course these are not all but it might be a good start for it.
What needs to be done for this?
I only have taken a short glance at it, but this is definitely needed:
1) New variable in advancedsettings.h
Something like
Code:
bool m_guiAdvancedGuiSettings;
2) The appropriate way to get this setting in advancedsettings.cpp
Like this:
Code:
m_guiAdvancedGuiSettings = false;
Code:
XMLUtils::GetBoolean(pElement, "advancedguisettings", m_guiAdvancedGuiSettings);
3) Changing the internal variables where needed
Based on the PR I made for "Hide All Items" there should be a lot of changes like this:
Former variable:
Code:
if (g_advancedSettings.m_bMusicLibraryHideAllItems)
Code:
if (g_guiSettings.GetBool("musiclibrary.hideallitems"))
4) Showing the settings only for advancedguisetting == true
This should need some "if statements" in the GUISettings.cpp for the appropriate setting that moved
from as.xml to GUI settings. Didn't get around that, yet. Help appreciated!
NOTE: This is only an example from xbmc/filesystem/MusicDatabaseDirectory/DirectoryNode.cpp!
As I'm not that experienced in the XBMC codebase maybe a dev can enlighten us a bit more
Basically that's it...
Any opinions on this?
BTW: As you see, I already made some adjustments to the code. If this is something the team is interested in and someone gives me a hint
for 4) I might manage to make the appropriate changes.
Let's start the discussion...
mad-max