mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-29 01:16:20 -05:00
Added patch from Imanuel
- Fixed base path for the external stylesteets git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5119 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
3dca71330c
commit
586e8bc042
@ -139,11 +139,26 @@ void ChatStyle::styleChanged(int styleType)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static QString getBaseDir()
|
||||||
|
{
|
||||||
|
// application path
|
||||||
|
QString baseDir = QString::fromUtf8(RsInit::RsConfigDirectory().c_str());
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
if (RsInit::isPortable ()) {
|
||||||
|
// application dir for portable version
|
||||||
|
baseDir = QApplication::applicationDirPath();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return baseDir;
|
||||||
|
}
|
||||||
|
|
||||||
bool ChatStyle::setStylePath(const QString &stylePath, const QString &styleVariant)
|
bool ChatStyle::setStylePath(const QString &stylePath, const QString &styleVariant)
|
||||||
{
|
{
|
||||||
m_styleType = TYPE_UNKNOWN;
|
m_styleType = TYPE_UNKNOWN;
|
||||||
|
|
||||||
m_styleDir.setPath(QApplication::applicationDirPath());
|
m_styleDir.setPath(getBaseDir());
|
||||||
if (m_styleDir.cd(stylePath) == false) {
|
if (m_styleDir.cd(stylePath) == false) {
|
||||||
m_styleDir = QDir("");
|
m_styleDir = QDir("");
|
||||||
m_styleVariant.clear();
|
m_styleVariant.clear();
|
||||||
@ -412,21 +427,6 @@ static bool getStyleInfo(QString stylePath, QString stylePathRelative, ChatStyle
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static QString getBaseDir()
|
|
||||||
{
|
|
||||||
// application path
|
|
||||||
QString baseDir = QString::fromUtf8(RsInit::RsConfigDirectory().c_str());
|
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
if (RsInit::isPortable ()) {
|
|
||||||
// application dir for portable version
|
|
||||||
baseDir = QApplication::applicationDirPath();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return baseDir;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*static*/ bool ChatStyle::getAvailableStyles(enumStyleType styleType, QList<ChatStyleInfo> &styles)
|
/*static*/ bool ChatStyle::getAvailableStyles(enumStyleType styleType, QList<ChatStyleInfo> &styles)
|
||||||
{
|
{
|
||||||
styles.clear();
|
styles.clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user