mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-26 11:56:16 +02:00
The skin.conf file will now be loaded/written from/to the user-specific directory.
It will also be loaded from the system dir if missing on the user-specific directory (For instance, when using a default theme of gmenu2x).
This commit is contained in:
parent
cf42f7d192
commit
ead9706ffd
@ -673,7 +673,8 @@ void GMenu2X::writeConfigOpen2x() {
|
|||||||
|
|
||||||
void GMenu2X::writeSkinConfig() {
|
void GMenu2X::writeSkinConfig() {
|
||||||
ledOn();
|
ledOn();
|
||||||
string conffile = path+"skins/"+confStr["skin"]+"/skin.conf";
|
|
||||||
|
string conffile = getHome() + "/skins/" + confStr["skin"] + "/skin.conf";
|
||||||
ofstream inf(conffile.c_str());
|
ofstream inf(conffile.c_str());
|
||||||
if (inf.is_open()) {
|
if (inf.is_open()) {
|
||||||
ConfStrHash::iterator endS = skinConfStr.end();
|
ConfStrHash::iterator endS = skinConfStr.end();
|
||||||
@ -1242,8 +1243,12 @@ void GMenu2X::setSkin(const string &skin, bool setWallpaper) {
|
|||||||
skinConfColors[COLOR_MESSAGE_BOX_BORDER] = (RGBAColor){80,80,80,255};
|
skinConfColors[COLOR_MESSAGE_BOX_BORDER] = (RGBAColor){80,80,80,255};
|
||||||
skinConfColors[COLOR_MESSAGE_BOX_SELECTION] = (RGBAColor){160,160,160,255};
|
skinConfColors[COLOR_MESSAGE_BOX_SELECTION] = (RGBAColor){160,160,160,255};
|
||||||
|
|
||||||
//load skin settings
|
/* Load skin settings from user directory if present,
|
||||||
string skinconfname = "skins/"+skin+"/skin.conf";
|
* or from the system directory. */
|
||||||
|
string skinconfname = getHome() + "/skins/" + skin + "/skin.conf";
|
||||||
|
if (!fileExists(skinconfname))
|
||||||
|
skinconfname = GMENU2X_SYSTEM_DIR "/skins/" + skin + "/skin.conf";
|
||||||
|
|
||||||
if (fileExists(skinconfname)) {
|
if (fileExists(skinconfname)) {
|
||||||
ifstream skinconf(skinconfname.c_str(), ios_base::in);
|
ifstream skinconf(skinconfname.c_str(), ios_base::in);
|
||||||
if (skinconf.is_open()) {
|
if (skinconf.is_open()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user